x


switch > door animation

hi i need a door animation to play when i hit a switch, i put my script on the switch but it keeps telling me that the player has no animation attached to it when i hit the button.. here is my script. thank you

public GameObject door;

// Use this for initialization void Start () {

}

// Update is called once per frame
void OnTriggerStay (Collider door) {
if(Input.GetKey ("v")){
       door.animation["Door"].speed=1;
}

} }

more ▼

asked Jul 01 '12 at 11:19 AM

omarrob gravatar image

omarrob
36 2 3 7

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3795
x237
x193

asked: Jul 01 '12 at 11:19 AM

Seen: 297 times

Last Updated: Jul 01 '12 at 11:19 AM