i need a script where the character dies when it touches the object right away..please help me!
2 Answers
2http://unity3d.com/support/documentation/ScriptReference/Collider.OnCollisionEnter.html
Touches object.
http://unity3d.com/support/documentation/ScriptReference/Object.Destroy.html
Destroy...
If you have health, you gotta do that stuff yourself.
Good luck!
i have the death script but i dont know how to do the collision one...
function Destroy (Person)
{
// Kills the game object
Destroy (Person);
// Removes this script instance from the game object
Destroy (this);
// Removes the rigidbody from the game object
Destroy (rigidbody);
}
if you're not that good at scripting take a moment to have a look at the script and understand what it does before pilfering it. Also do you know if you're trying to make javascript or c#. Batman would know how to do these things being the CEO of Wayne Enterprises, you sir are clearly not Batman
– anon61858128