Not the game sadly...
When a special bullet goes past the center of my screen it is supposed to destroy itself and then kill all enemies in a certain radius.
Heres my script for the bullet so far. (took out UN-related parts to be smaller)
var bulletSpeed: int;
var explosion: Transform;
function Update () {
if(transform.position.y >= 6){
Destroy(gameObject);
}
}
function OnTriggerEnter( otherObject: Collider ){
if(otherObject.gameObject.tag == "enemy"){
playerScript.playerScore += 100;
otherObject.gameObject.transform.position.y = 16;
otherObject.gameObject.transform.position.x = Random.Range(16,19);
var tempExplosion: Transform;
tempExplosion = Instantiate(explosion, transform.position, transform.rotation);
Destroy(gameObject);
}
}
how can i make it so that the bullet kills all enemies in a certain area, or even just killing all enemies? thanks :D