[solved]How do I :Choose randomly between 2 animation cycles

0 favourites
  • 5 posts
From the Asset Store
Perfect for your zombie game! Animated from motion capture data Left, Right, Top Down!
  • Hi,

    Please help me out with this issue.

    I have a character with 2 animations for idle namely "idle1" and "idle2". This a basic platformer game.

    "idle2" basically has a blink and "idle1" doesn't.

    I want make it so that C2 plays either one of these animations at random so it feels like the character blinks randomly and not in a predictable pattern.

    I have used the condition

    when platform not moving- choose("idle1',idle2") play from beginning.

    My understanding after looking through the forums is that this will make C2 choose between one of these cycles randomly.

    But right now all it is doing is stuttering in place like its trying to play a frame again and again.

    Please take a look at my capx from this link if you are able...i have stripped it down so we can focus on the problem.

    https://www.dropbox.com/s/4b2dv03k1cllf ... .capx?dl=0

    Thanks muchly in advance

  • when platform not moving..................choose("idle1',idle2")

    Trigger once....

  • Hi..

    Thanks for the response...

    Trigger once will have it repeat what ever animation was chosen.If it choses idle2 then idle 2 will be repeated until another input is provided.

    I want it like the below scenario..

    lets say idle1 was chosen first ...after the animation is played once i want it to choose either idle2 or idle1 again after that animation has played once.. it again chooses between idle2 or 1....so on and so forth..every time the player is not moving.

    I hope that made it more clear...

    Thanks again.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • yeap... <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    http://s000.tinyupload.com/index.php?fi ... 1774199659

  • That does it wonderfully..

    Thank you soo much...

    And sorry to trouble you for something this straight forward..

    -cheers

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