Animation with Timer Problem
Kamazar
Member Posts: 287
Ok, so basically all I'm doing is having an actor animate blinking every so-and-so seconds. The thing is, if I set up the timer to do so, it won't. If I set it up just to animate though, without a timer, it will. Even if I set up the time as "for" or "after" but not for "every". My bandaid solution for now is to create a new actor that blinks, but it takes up resources, and everytime my character blinks, it stops dead in it's track. The momentum doesn't carry over since I'm deleting and respawning actors. Little help? Thanks
- A Perfectionist
- A Perfectionist
Comments
http://gamesalad.com/wiki/how_tos:gsc_blinking_image
You have run to completion on i assume as well??
I'm having trouble making my character brings in intervals with a timer. It just won't animate.
Edit: And another question. When I'm destroying and respawning an actor, how do I get the momentum the first actor had to the new actor?
Create actor attribute called "BlinkingAnim" (Boolean)
Timer: every 3-8 (just for randomness) secs change self.BlinkingAnim to true
Rule:
When BlinkingAnim = True
Animation (blinking animation goes here of course)
Timer: After 1-2 secs change self.BlinkingAnim to false.
Otherwise:
Normal animation goes here.
This works UNLESS you will have multiple animations. So for instance if you have an animation for attacking, this will mess it up b/c of the OTHERWISE part. Easy fix though:
Create actor attribute called "BlinkingAnim" (Integer)
Timer: every 3-8 (just for randomness) secs change self.BlinkingAnim to 1
Rule:
When BlinkingAnim = 1
Animation (blinking animation goes here of course)
Timer: After 1-2 secs change self.BlinkingAnim to 0
Rule:
When BlinkingAnim = 0
Animation (normal one)
This way you could also through in attack animations by using different values.
Did not test this, but SHOULD (yes that frightening word) work.