Hey guys!
So I’m almost done making my first game but I left all the audio to do last and, well, now I’m stuck. I know its an easy fix I’m just having trouble figuring it out.
Basically I have the following piece of script for my cash register opening/closing script:
function changeRegisterState ()
{
if (registerIsClosed)
{
theRegister.animation.CrossFade(“RegisterOpen”);
theRegister.audio.PlayOneShot(“CashRegisterOpen”);
registerIsClosed = false;
}
else
{
theRegister.animation.CrossFade(“RegisterClose”);
theRegister.audio.PlayOneShot(“CashRegisterClose”);
registerIsClosed = true;
}
}
Everything works fine I just don’t know what to attach the audio source to, or how to get it to hold the 2 audio files (one for opening one for closing).
Please help. Thanks!