Hi guys,
im having a problem with my script, Unity keeps telling me BCE0044: expecting (, found ‘OnTriggerEnter’. I am following along with a book and doing exactly what they say but it doesnt seem to want to work. heres the code
#pragma strict
public var shotspeed : float = 5.0;
function Update () {
{
transform.Translate (0, shotspeed * Time.deltaTime, 0);
}
function OnTriggerEnter (other: Collider) {
if (other.tag == "terrain")
{
Destroy (gameobject);
}
}
}
Thank you for any help you could give.