try using a variable.. the repeat X times.. its just gonna respawn as many missile as you tell it to multiplied by 4
in order to stop spawning it... after it spawned 4 times.. considering there are no other similar sprites on screen... you can do a condition check... that counts how many sprites of the same type are on screen... Example :
Condition - when mouse click -(or every 1 second how you want to be)
- if sprite.count<4
Action create actor sprite at x y
that means every 1 second if the missle count is less then 4 will automatically create another 1 till are 4 on screen... hope it helped you...
you can disable the condition triggering by placing it in a group and enable the group when you want it to happen...
lets say if Spacebar is pressed Set group shootmissile active
if sprite.count - greater or equal with 4 ... Set group shootmissile disabled
you can also do it by using a boolean its same thing.. just you'd have to say when spacebar is pressed set boolean to true...
and when the count of the sprites is equal or greater to 4 set boolean to false
now if you want the sprite when spawned to have a delayed space between them if you dont know how to count the space in pixel.. you could calculate it visual by adding a wait period... of 0.5 lets say and let the whole creating system you just created to happen every tick.. with a delay of 0.5 between each creation of a sprite... that way youl have all sprites spawning at different spaces from each other... and you wont have to worrie about them overlapping...
hope it helped you, and i hope i was in the area of your question. please add [ Solved ] in title of the topic if its already Solved laoniustudio