Animation help 2
alexm92
Member Posts: 16
Ok i got the astroid to animate. I had to turn on the rule i had turned off and remove a destroy actor behaviour. But when its finished animating the 1st picture of the animation doesnt dissapear. How do I make it dissapear when the animation is finished? Sorry for all the questions. Beginner here. http://www.mediafire.com/view/ab9xh7njbjv4yjt/Screenshot_(4).png
Comments
I like to use a rule that says something like this . . . .
When self.image is 'name of the final image' - then Destroy.
So when the animation gets to the final image the actor will be destroyed.
For example if your image sequence is numbered like this Explosion01, Explosion02, Explosion03, Explosion04, Explosion05 (Explosion05 being the last image in the sequence) then the above rule should look like this . . . .
When self.image is "Explosion05" - then Destroy.
You can also use 'contains' instead of 'is' if you are feeling lazy, in this case the rule will look like this . . . .
When self.image contains "5" - then Destroy.
. . . . . . .
One caveat, as soon as your sequence gets to Explosion05 the actor will immediately be destroyed, so the image will only be on screen for a tiny fraction of a second, but you'd probably want it to be on screen as long as the other images in the sequence - you are running your animation at 10 fps, which means each image is on screen for 1/10th of a second - so you'd ideally want to keep your final image in screen for 1/10th of a second too . . . . to do this, add a timer to the rule to only destroy the actor after the final image has been on screen for 1/10th of second.
Which should look like this . . . .
When self.image is "Explosion05"
Timer: After 0.1 seconds
Destroy
Thanks a lot socks. Much appreciated