I am trying to make a hit box script. How do I tell a script that when a certain block gets hit, it does X damage to a central element? Then I hook multiple boxes up to a character and when the characters health = 0, so and so happens.
What you need is a collision or trigger hub. Basically, you create a simple script with your trigger/ collision event, that consequently relays the event to a central script.
There's a working example of this in the urgent actuator class in our free ragdoll tool: http://forum.unity3d.com/threads/107501-Release-URG!-The-ultimate-ragdoll-generator?p=713290#post713290
You can find it in the root and any body part of the running soldier that gets hit by the cannonball.
answered Aug 07 '12 at 06:45 AM
The Arc Games