OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Blanco on 29 Mar 2005, 07:32:48
-
Hello,
I have a short static cutscene with some music playing on the background, during the cutscene a dialog shows up with a menu where the player can select his role in the mission.
A jukebox script runs and when the player has made his decision the camera is destroyed, the dialog closes and the music should fade out... but it doesn't...
Here is that jukebox script
#start
_songs = ["Seigline","Lilli_Marlene"]
0 fadesound 1
_c = count _songs
_totaltime = 0
#randomise
_r = random count _songs
_r = _r - _r % 1
_song = _songs select _r
?_song == "Seigline" : _totaltime = 165
?_song == "Lilli_Marlene" : _totaltime = 215
#song
_songs = _songs - [_song]
_t = 0
playmusic _song
#p
?situation != -1 : goto "fadeout"
~1
_t = _t + 1
?_t < _totaltime : goto "p"
?count _songs == 0 : goto "START"
goto "randomise"
#fadeout
hint "ok"
5 fadesound 0
~5
5 fadesound 1
enableradio false
exit
When the player has made his decision the variable situation is equal to 1 so the script should jump to label #fadeout and it does because I see the "ok" hint. The only thing that doesn't work is the fade out.
Why?
-
Problem: 5 seconds after you fade the sound out (using 5 fadeMusic 0) you fade it back in again using (5 fadeMusic 1).
-
yes, I know the music fade out when the dialog closes and fades in when the mission starts.
Omg , now I see it!
I've used fadesound instead of fademusic :beat:
thx :)
-
Well, I guess it's sorted out then. I didn't notice the fadeSound-syntax either :P
-
indeed, topic solved