Hello, I need some help here, I’m trying to stop this script after the player has clicked on the “Steam_valve”, so that clicking on the “Steam_valve” again won’t do anything. Can someone help?
function OnMouseOver()
{
var hit : RaycastHit;
var ray : Ray = Camera.main.ScreenPointToRay (Input.mousePosition);
if (Physics.Raycast (ray, hit, 2.0))
if(Input.GetMouseButtonDown(0))
{
GameObject.Find("Steam_valve").transform.Rotate(0,0,90);
GameObject.Find("Steam_wall").SetActiveRecursively(false);
}