subtracting live from slashing another actor

kesh17akikesh17aki Member Posts: 8
edited August 2012 in Working with GS (Mac)
how do i subtract the life of a pig when slashed by another actor?

example.. i have here a child bringing an umbrella, and he met a pig.. he tried to slash it.. i tried using replicate behavior. i set 4 lives for the pig, but then it only subtracted to only one.
heres the code:

when an actor(pig) overlaps or collied with actor (child)
change attribute pig_life to pig_life-1

and another rule if life is<0 it will destroy the pig actor.


how can i solve this problem.. i really need help.. thanks
Sign In or Register to comment.