Game Development Reference
In-Depth Information
Now just go into the
Sludge
actor and create a new rule, change it to
Actor
receives event
|
overlaps or collides
|
with
|
actor of type
|
Kevin
, then drag
in a Destroy behavior.
But I made this other guy, and he doesn't shoot. He lashes out with a swipe to attack.
How would we do this? Create a new actor from the
Walker
images in this chapter's
resource section. The animations are quite crude, but it's alright.
In the new
Walker
actor, copy and paste all the fun moving behaviors we had for the
last bad guy. There are a few ways we could get him to attack. We could either have
him spawn an actor that will detect collision with Kevin when he's attacking, or you
could even have an invisible actor following in front of the walker to detect collision.
The second option works well, but if you have more than one
Walker
on the scene, it
won't work properly because the detector will be confused as to which Walker actor
to follow.