hello i am dev… a 2D Game but i get stuck.
i maked 2D door in Blender and added a texture.
and i maked a javascript in MonoDevelop.
and this is the Script :
#pragma strict
function OnTriggerEnter (Player : Collider) {
if(Input.GetButton("e"))
{
if(Player.tag=="Player")
GameObject.Find("Door");
Application.LoadLevel("Floor1");
}
}
and this script means if im in the box collider of the Door that i go to the next level or 1 floor higher.
but this script doesnt work.
can some one help me with this and work. thx