Why don't you use a Conditional Action for this?
Here's what I mean: have it so when musicvol (music volume) reaches 0, load the next level.
1. Have musicvol decreased to 0 in some event. E.g., use a Draw Actor event for an actor and enter
- Code: Select all
musicvol-=0.1;
(Change the number to how fast you want it to fade. A higher number means a faster fadeout.)
2. Next, on another Draw Actor event for an\the same actor, choose Conditional Action. For Expression 1, enter musicvol, then select the "Less or equal to" button, then in Expression 2 type 0.
3. Go to Script Editor and type:
- Code: Select all
LoadGame(nameofyourlevel.ged);
I hope you understand, it can be quite confusing for anyone not used to it.
(It was for me at one time...)