So I know I cannot grab the transform of a game object but here is the Code I currently have. I want to to turn on gravity from the rigidbody for all of these objects with the same tag. Any Ideas? I am thinking I will have to use arrays but I may be wrong.
Code is (JS)
var Camerashake : Camerashake;//script
var rumblesound : AudioSource;
var rumblesoundstop : AudioSource;
var stalagtite = GameObject.FindGameObjectsWithTag ("Fracture1");
function Start () {
}
function Update () {
}
function OnTriggerEnter (other : Collider) { //T
if (other.gameObject.CompareTag ("Player")){
print("Collision!");
stalagtite.rigidbody.useGravity = true;
Camerashake.enabled = true;
audio.Play();
yield WaitForSeconds(9) ;
audio.Stop();
}
}