Hi.
I’m trying to get my script to play a sound when a certain variable equals 1. but when it plays it sounds really glitchy, with it trying to play the first part of the sound over and over again with a short pause inbetween.
I don’t know what is causing this so i hope someone here will know what the problem is.
Here is my code:
var CeaseSFX : AudioSource;
var Music : AudioSource;
function Update(){
if(ActiveRobots.numberofrobots == 1)
{
CeaseSFX.Play();
Music.mute = true;
}
else{
CeaseSFX.PlayDelayed(183);
}
}