Hello everyone.
While working on a fun project I noticed my experience with auido is limited. I just couldn't do what I describe below. I checked audio manual entry and some tutorials and forum posts, but still keep failing. Would like to ask for your help, ladies and gentlemen...
Here is what I want to do. I have a variable that changes during gameplay from 0 to 4. I have a loop playing in the background, it's fine. Now while the variable is 1, I want to ad another looping sound on top of it... and if the variable is 2, I want to play yet another loop on top of the previous tiers, and if the variable is 3, yet one more loop to add. And when the variable drops back to 2, the top two layers will stop.
variable=0 only "background" sound playing
variable=1 "background" + "eerieloop"
variable=2 "background" + "eerieloop" + "windloop"
variable=3 "background" + "eerieloop" + "windloop" + "rainloop"
variable=4 "background" + "eerieloop" + "windloop" + "rainloop" + "screamsloop"
I tried this:
variable=1
trigger once while true --> play "eerieloop" looping
but it doesn't start to play.
Then I tried addinga global var "previous_variable" and checking each tick for "varieble=1 & previous_variable=0" and play if true, and yet failed again. It just doesn't start playing.
Using chrome, C2 ver 142. All sounds are ogg only. I deleted the wav and the other ones.
Any ideas on how I should aproach this?