Trent123's Forum Posts

  • Ah ... you got me thinking and I figured out a way that works for me. What I did was define a global variable (which I called LoopRun with initial value of 0) whose value I changed after each spawn.

    Here's the code.

    I'm sure its not the best or most efficient way of doing it, but it works!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi all

    Working on my first game and learning as I go along. The forums have been very useful, along with the tuts. I've searched, and though I have found many questions and answers on spawning sprites, I've not been able to find a solution for this problem I have:

    I have 5 spawn positions: A B C D E

    Spawn location A will spawn a sprite. Once this sprite stops moving, location B will spawn a sprite. Once this sprite stops moving, location C will spawn a sprite and so on. Once the Sprite spawned by location E has stopped moving, the spawning cycle must go back to location A, and start all over again, until a certain condition is met.

    I have tried a variant of the answer given here : https://www.scirra.com/forum/every-seconds_t69711 , but I find that location A keeps spawning over and over, and the other locations do not spawn at all. The solution in that post is also time dependent. I would prefer to spawn a new sprite once the previously spawned one has stopped moving.

    Thanks to anyone offering some help or guidance.