Copy link to clipboard
Copied
good days community, I have a question.
What would be the expression to make a loop stop?
What I want to do is the following, I have a character who walks, but I want him to walk for 10 or 20 seconds and then stop in the resting position.
I do not know if I make myself understood.
someone would be so kind to be able to solve this doubt, thank you.
Copy link to clipboard
Copied
In general, you could do this with an if statement like this
if(time < 10){
// PUT YOUR ORIGINAL LOOP EXPRESSION HERE
}
else {
value
}
Now the loop is only active for the first 10 seconds (due to the condition "time < 10") and after that the normal keyframes are used
In the special case of a walk cycle, you can use the iExpressions walk cycle (part of the iExpressions Physics Bundle).
Then the character walks automatically when you move the character or the ground and stops walking when it does not move anymore. And you can still keyframe it on top of this walk cycle easily.
See these tutorials:
Finally, Expression Timeline is a very flexible and general solution to start, stop and fade expressions:
Expression Timeline 2 - aescripts + aeplugins - aescripts.com