Monday 7 May 2012

Scripting and Sound

annabeth showed us the basics of scripting such as getting closer to an object and you've set it to get louder as you get closer, when you click an object in your unity environment it makes a sound, when you throw an object thats had it mass created and it hits the floor it makes a sound. This was quite interesting to explore if somewhat a little frustrating, it doesn't look too technical and i'm sure with a little practise it wouldn't be too hard at all. You just gotta remember to type in obsoletely the correct keys into the script or else it won't work. I'm definitely going to try and include all the scripts we learnt into my virtual environment if i have time, but i'm definitely going to put in that you press a button on the vending machine and a dropping of a can sound noise is put in, if i have time too i'd like to animate a small can model and have it pop out of the machine onto the floor.
Here's some of the screenshots from the lesson, how to script etc -

remove component

 make box collision size bigger

 create a script

 caps sensative - on button is enter and off button is exit - end with two ( )

 whats happening between the bread? - think of it as a sandwich



make sure you click 3D sound settings to see the graph. turn play awake off - is trigger on. 


script for entering green box - creates sound when you enter the green area

script for mouse click shift

makes it a physical object - it now has a mass. 

 next drag rigidbody 

 picking up objects

No comments:

Post a Comment