Door Movement Animation

This is a simple question it seems like but when it comes to unity am i allowed to just make a script that rotates a door while playing a sound or do i have to make the animation?

You can rotate and play a sound... If you want, make the model of the door, make the pivot at the right spot, then you can just rotate, very easy to do!

Good luck!

Unless the movement is complex enough to be authored (animated with key frames), you might want to look into the 'RotateTo' function. I like that as it lets you adjust how far it rotates, you can easily interrupt, reverse, etc. Use something like what MC HALO has to play the sound simultaneously. You might want to have different sounds for 'open' and 'close' for added fun. Close, for example, might sound more 'slammy' and Open more 'creaky'.

i think its easier if you make the door animation and then make a script play it in unity or just run it automatically when you run the game. Here is a simple script that allows you to open a door and play a sound the same time:

this script is using Java:

var DoorOpen : AnimationClip;
var DoorSound : AudioClip;

function Update (){

if(Input.GetKey(KeyCode.A)){

animation.Play("DoorOpen"); // This is playing the animation which will be stored in the Animation variable above this will be your door animation.

AudioSource.PlayClipAtPoint(DoorSound,transform.position); // Plays your sound when the door opens

 }
}

By the way you don't need to make the animation variable you can also put the animation name in there if you like. putting a variable make things a lot neater. This is probably what i would do if want to play a door animation.