I just started trying to learn how to script and started off with javascript and really don’t know how to make a script but i have decided to take a crack at making my first script:
var triggerEnter = false;
if triggerEnter = true();
{
function OnTriggerEnter(gameObject : Transform)
{
Application.LoadLevel(levelToLoad);
}
}
else if triggerEnter = false
{
do nothing
}
in my game Im trying to have a death screen load quickly when you get inside the trigger
Can you please explain to me how this can be done
also if you know any websites or good videos where i can learn javascript for unity please tell me.