How do I spawn a batch of objects, then wait

  • Hi all,

    First time poster, complete newby Constructor. This is probably a really simple question as well, but I'm struggling to get my head around the events for it.

    So, I want to spawn a certain object every 2 seconds, four times. After this happens, I want there to be a gap in spawning for four seconds, then resume the normal spawning every 2 seconds.

    So: Object X spawns every 2 seconds.

    When this happens four times, wait four seconds.

    After four second wait, resume from start.

    Thanks for the help in advance I'm probably missing this really obvious thing as I'm pretty tired but oh well.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I guess using the timer behaviour for this would be the easiest choice:

    Create a variable spawns and set it to 4

    set timer for two seconds

    on timer

    --if spawns > 0

    spawn objectX

    subtract 1 from spawns

    et timer for 2 seconds

    --else

    set timer for 2 seconds

    set spawns to 4

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)