How do I Apply 'For Each' to all sprites...

  • I'm having a problem and I can't figure it out. I have an event set up so that 'For Each Bunny' - 'every - random(1, 2) seconds' a bunny will jump.

    The problem is, only one bunny out of the 4 on screen will jump. They're all the same sprites, all their stats are the same, nothing is different. Yet this event only seems to influence one of them!

    Here are the events:

    System - For Each Bunny

    Every - random(1,2)seconds / Bunny Simulate Platform pressing jump.

    That's all there is. Only one bunny will jump and I have no idea why.

    If I do;

    Every - random(1,2)seconds

    System - For Each Bunny / Bunny Simulate Platform pressing jump

    It will make all the bunnies jump at the same time and I don't want that. I want them to jump at random intervals, not at the same time.

    Thanks in advance, hopefully I made sense.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • use Timer behavior

  • You're not picking anything. Just using 'Pick random Bunny instance > Bunny jump' will work. 'For each' isn't always needed and it doesn't mean 'Do action to each', you need to pick the instances it applies to with a condition.

  • use Timer behavior

    Thank you so much, told me exactly what I needed! Wonderful demonstration too ^-^ Works perfectly.

  • our korbaach is very intelligent person

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