How do I randomize idle animations with families

  • I now understand why this is not working- but just showing what I was trying to do...

    I wanted to make it so each NPC on screen plays a quick idle animation but at different times- this still has them doing the animation in unison which looks wrong.

    Any help or suggestions for this artist trying to "code" I would greatly appreciate it! Thanks-

  • This is setting them all at the same time. Use a for each loop. Also could use the timer behavior.

  • This is setting them all at the same time. Use a for each loop. Also could use the timer behavior.

    The for each sounds like a great idea- maybe I just dont understand well enough how they work- i did a little reading but no matter what I try I am unable to see it work how I am hoping. Perhaps you could give me an idea? This is the mess I am trying to make work...

  • Why do you have the repeat 10 times? The for loop will run it for each so you are running it 10 times for each.

    This is how I was thinking.

    On start of layout

    -for each npc

    --start timer "idleAnimation" random seconds

    On timer "idleAnimation"

    -for each npc

    --Idle animation

    --restart timer

    The for each on the timer is due to if two timers go off at once they will be separated.

    Let me know if you have any more questions.

    ...and thanks for trying my project! And don't worry, no one has found any of the eggs yet

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • On start of layout

    -for each npc

    --start timer "idleAnimation" random seconds

    On timer "idleAnimation"

    -for each npc

    --Idle animation

    --restart timer

    That worked perfectly- thanks so much!

    Now I feel challenged to find an easter egg... Ill have to try again after work tonight

  • That worked perfectly- thanks so much!

    Now I feel challenged to find an easter egg... Ill have to try again after work tonight

    Great! (to both)

    Hint: two of them require very detailed observation to surroundings. The other, a little creative thinking, but most likely luck in discovering it.

    Happy hunting!

  • Good post, I need this solution Y

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