Character Animations to play randomly? Please Help!

KillerPenguinStudiosKillerPenguinStudios Member Posts: 1,291
edited August 2012 in Working with GS (Mac)
So I have a character and I want it's animation to play randomly. I tried using a timer and saying every: random(0.5,5) animate but it only flickers and doesn't animate. Is there another way to go about achieving this?

Thanks in advance!

Comments

  • ChobbifaceChobbiface PRO Posts: 491
    edited August 2012
    The problem here is that using an 'every timer' alone, the animate behaviour doesn't have a specified duration for how long to run for, when it's triggered to run randomly (between 0.5,5secs).

    In other words, you need a 'for timer' as well. So 1 Timer with Every X (random 0.5,5 secs), then inside that, another Timer with For X seconds (run to completion). Then inside that Timer behavior, add your Animate behavior.
  • KillerPenguinStudiosKillerPenguinStudios Member Posts: 1,291
    The problem here is that using an 'every timer' alone, the animate behaviour doesn't have a specified duration for how long to run for, when it's triggered to run randomly (between 0.5,5secs).

    In other words, you need a 'for timer' as well. So 1 Timer with Every X (random 0.5,5 secs), then inside that, another Timer with For X seconds (run to completion). Then inside that Timer behavior, add your Animate behavior.
    So I did that and it is animating now but the random function is not working. The animation timer is triggering the same time every time and not randomly.
  • ChobbifaceChobbiface PRO Posts: 491
    How long are you running the 'for' timer?
  • KillerPenguinStudiosKillerPenguinStudios Member Posts: 1,291
    How long are you running the 'for' timer?
    I am running the for timer for 0.3 seconds to completion and the every timer for random(1,5)
Sign In or Register to comment.