Home   Help Search Login Register  

Author Topic: music doesn't fade out  (Read 463 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
music doesn't fade out
« 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

Code: [Select]
#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?






Search or search or search before you ask.

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re:music doesn't fade out
« Reply #1 on: 29 Mar 2005, 09:35:03 »
Problem: 5 seconds after you fade the sound out (using 5 fadeMusic 0) you fade it back in again using (5 fadeMusic 1).
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Blanco

  • Former Staff
  • ****
Re:music doesn't fade out
« Reply #2 on: 29 Mar 2005, 10:05:42 »
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 :)
« Last Edit: 29 Mar 2005, 10:17:33 by Blanco »
Search or search or search before you ask.

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re:music doesn't fade out
« Reply #3 on: 29 Mar 2005, 11:36:03 »
Well, I guess it's sorted out then. I didn't notice the fadeSound-syntax either  :P
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Blanco

  • Former Staff
  • ****
Re:music doesn't fade out
« Reply #4 on: 29 Mar 2005, 12:56:23 »
indeed, topic solved
Search or search or search before you ask.