1 Attachment(s)
Need variable to take value during animation
I'm trying to do a modest walking script.
At this point, if you press the down key quickly and let go, the character will complete the animation of one stride and then stop, which is what I wanted to do.
The character will move whenever "vertMove" contains a value, and will stop moving if it goes to zero.
Inside the "WalkD" movie clip I've set vertMove=2 at the beginning of the animation, and then made it zero at the end of the stride. So in theory, he should keep moving at a speed of 2 until the stride animation completes.
This isn't true though. If you tap the down key once he sometimes just moves a little bit and stop while the animation completes. Adding dynamic text to watch the vertMove variable shows that it returns to zero before the animation is over, even though I ONLY mess with the value inside of that animation...
Any idea what I'm doing wrong?