Destroy Actor when hitted by fast block
Guys iam having a hard time to figure that out.
I need an actor to by destroyed only, when hitted by a block who is moving at certain velocity.
I have create a rule that says, when actor BLOCK is FASTER THAN 30, and HIT the CAT, Change Attribute Kill Cat to 1.
Them a put a rule in the cat that says when KILL CAT = 1, Destroy this Actor.
The problem if that, it was that every time a hit 1 cat, all cats in the scene dies, how can a fix that?
I need an actor to by destroyed only, when hitted by a block who is moving at certain velocity.
I have create a rule that says, when actor BLOCK is FASTER THAN 30, and HIT the CAT, Change Attribute Kill Cat to 1.
Them a put a rule in the cat that says when KILL CAT = 1, Destroy this Actor.
The problem if that, it was that every time a hit 1 cat, all cats in the scene dies, how can a fix that?
Answers
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
In the rule in your actor code, use the attribute from the actor in the Attribute Browser, rather than your game level Kill Cat attribute.
Then your kill cat code will operate within the individual actor.
You might not need the attribute at all though, destroying the actor might work for you.