I need someone to help me understand how I would script something… I have a basic understanding of scripting with java script, I know what variables are (private and public) and I know a few functions, but there’s really nothing on the web for what I’m looking for. I know what it’s going to involve but just don’t know how to write it. So In the beginning of my game, under function start I need a small delay and then an audioclip to play (phone ringing) and then from my understanding I would need a trigger around my phone in order to answer it, Iv’e done this before with a door script and even managed to get a GUI of the letter “E” to pop up when you are in the trigger, that’s exactly what I want to do with the phone and when you press “E” it picks up the phone. Now I think with a little help wording I could script that… But the phone conversation is where I get lost. In my head it should work by playing a small animation of the player picking up the phone.(although not important now) Then the person on the phone says for example “hello”, at this point I would like two GUI buttons to appear one for a reply and one to end the conversation and then depending on if you press either button the conversation will either move on or end. I know this seems like a lot to ask but If someone could help me understand how to write this, I would be very grateful! Thanks.
http://docs.unity3d.com/Documentation/ScriptReference/index.Coroutines_26_Yield.html
these doc pages should point you in a general direction for your problems.