Walk then attack function and animation
chuckdarocker
Member Posts: 3
How do I make 2 characters walk up to each other, pause as soon as they both collide, and then start attacking (punching) each other? I also would like this to be automatic and have seamless animation.
Thanks!
Thanks!
Comments
Each actor would then have the rule, when it receives event, collides with (the name of the other actor):
-> Change Velocity to speed of 0, so they can stop.
-> Animate (Their punching animation)
Brainstorm:
What you could do is setup some invisible actors to act as short range detectors and event senders.
Each time your actor throws a punch, you can spawn one of the invisible actors in front of it to collide with the opponent. When the opponent collides with the invisible actor, it takes the specified amount of damage as set in the rule that check the collision with that invisible actor. That actor is destroyed when it collides with another actor.
When the opponent takes enough damage, it can send a different actor ahead of it signifying that the path is clear to continue moving. When your actor collides with that invisible actor, it changes its move state to moving again.