Play different frame animated loops on action?
oram
Member Posts: 2
Hi there,
I m new here, so I m trying to work on a sample where I created two different animated frame sequences for a character action.
I want to have on idle mode the fist loop playing, and by hitting the character to play the second sequence once.
Which is the best way to resolve this?
I m new here, so I m trying to work on a sample where I created two different animated frame sequences for a character action.
I want to have on idle mode the fist loop playing, and by hitting the character to play the second sequence once.
Which is the best way to resolve this?
Best Answer
-
SlickZero Houston, TexasPosts: 2,870You can create 2 boolean attributes, and for the sake of this conversation we'll call them idleCharacter and movingCharacter. Set the default to true for idleCharacter and set the default to false for movingCharacter. Inside of the character actor, set up 3 rules. One rule that says -
When "touch" is pressed (or whatever other method you are using to trigger the animations)
*Drop in 2 Change Attribute behaviors*
Change Attribute "idleCharacter" to false
Change Attribute "movingCharacter" to true
In the "Otherwise" section -
*Drop in 2 Change Attribute behaviors*
Change Attribute "idleCharacter" to true
Change Attribute "movingCharacter" to false
In the second rule -
when attribute.idleCharacter is "true"
*Drop in an Animate behavior*
Put the animation frames you have for the idle character into the behavior, and figure out a good framerate to achieve the desired results.
In the third rule -
when attribute.movingCharacter is "true"
*Drop in an Animate behavior*
Put the animation frames you have for the moving character into the behavior, and figure out a good framerate to achieve the desired results.
Answers