Advice needed. Rustler test
stanimation
Member Posts: 406
I put up a rough game test on the "Shared Projects" This gives you an idea of the problem i'm having. The rustler keep moving. I want him to stop once the ball hits him. I didnt add any of my unsuccessful rules to stop him to keep the confusion factor low. Also, if you change the game.Fire to false, the animation works better but the rustler pops back up. I think I have been looking at this too long cause I now this is an easy fix. Any suggestions??
http://gamesalad.com/game/play/30970
http://gamesalad.com/game/play/30970
Comments
when killed:
self.Linear.X = 0
self.Linear.Y = 0
Thanks!
The other thread was the one you posted about spawned actors keep moving...
So i opened your project.
I see what is going wrong...
You need to create a Boolean attribute in the Rustler called "killed".
Then, you need to wrap your Move behavior in a Rule.
(You can do this easily by selecting the Move Behavior, so it turns blue, the click Create Rule at the top. That will wrap it for you)
The Rule needs to say this:
When self.killed = FALSE
Move
In the Rule where you collide with the bullet, you need to add a Change Attribute which says:
Change Attribute: self.killed To: TRUE
Right now, The Move behavior is always on, that's why he always moves. You just need to make it conditional.
Hope this helps!
Joe