Game Development Reference
In-Depth Information
If it does work, it should look like the immediately preceding screenshot. Now we
have to make Kevin take damage. To do this, open up our
Kevin
actor, create a new
rule (or copy the one from our
Sludge
collision rule) and change it to
Actor receives
event
|
overlaps or collides
|
with
|
actor of type
| (insert spawn actor name here),
and insert a Change Attribute behavior into this rule, change it to
Change Attribute:
|
game.Health
|
game.Health -20
. Ouch!
Change the
Alpha
on the spawn object back to zero and everything should be
working perfectly! We have to give these baddies some health now!