Hi, I'm trying to make triggers for a game so that when the player enters it something happens. Instead of making whole new scripts for all the triggers in the game, I'm trying to make a single script that contains all data of all triggers in game and attach it to the player. This is my current script,
var t1 : GameObject;
var t2 : GameObject;
function OnTriggerEnter (other : Collider)
{
if(other.gameObject == "t1")
{
Destroy(other.gameObject);
}
}
I assigned this...
Destry on TriggerEnter
var t1 : GameObject;
var t2 : GameObject;
function OnTriggerEnter (other : Collider)
{
if(other.gameObject == "t1")
{
Destroy(other.gameObject);
}
}
I assigned this...
Destry on TriggerEnter