- Home /
This question was
closed Mar 07, 2015 at 04:18 PM by
FatalVitality for the following reason:
Problem is not reproducible or outdated
Question by
FatalVitality · Feb 19, 2014 at 05:04 PM ·
playerreload
Death trigger
Hello, I wish to create a death trigger that will kill the player upon collision and reload the game (Application.LoadLevel(0)) Does anyone have a script for this?
Comment
Can't quite figure it out. I made a reload button that works, but I'm not sure how to apply that to an object.
Best Answer
Answer by TheDonkeyQueen · Feb 19, 2014 at 05:30 PM
I have one, but it doesn't function properly for me
void OnTriggerEnter(Collider other)
{
if (other.tag == "Player")
{
// Player entered red zone, reload game.
Application.LoadLevel(0);
}
}
}
Follow this Question
Related Questions
Dying Problem! 1 Answer
Death script problem 2 Answers
Help with InstantDeath Collider Script? 1 Answer
Kill the Player? 1 Answer
How to approach DLC for standalone and web build games? 1 Answer