my StarFighter game is almost finished but i’m hung up on the is one script my Radar script it needs to put a marker over the AlienShips not every object in the scene, I need the script to put a marker above the object with the tag AI. How would I write that in this script?
here is the Game if you would like to see how it works.
press #1 and left click to fire a black hole. press #2 And Left click to fire a Rocket or Right click To fire a WormHole.
http://dl.dropbox.com/u/21120930/StarFighter/WebPlayer/WebPlayer.html
var AIE : GameObject;
function OnTriggerEnter (col : Collider) {
//var AlienShip =col.GameObject.Tag==("AI");
var position: Vector3 = Vector3(Random.Range(-150.0, 150.0), 0, Random.Range(-150.0, 150.0));
Instantiate(AIE, position, Random.rotation);
var Label=GameObject.FindGameObjectWithTag("Label");
Label.GetComponent(DistensLabel).Target=col.gameObject.transform;
Label.GetComponent(ObjectLabel).target=col.gameObject.transform;
Label.tag="Untagged";
}
var x = 0;
var y = 10;
var z = 0;
function Update () {
transform.Rotate(x, y, z*Time.deltaTime);
}