OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Kampfkobold on 06 Feb 2005, 23:16:21

Title: How to get music to stop
Post by: Kampfkobold on 06 Feb 2005, 23:16:21
Hello,

I've started some music to play otherwise it would be too boring the whole Filght from base to targetarea. But how to get the music stop, if I arrive at this area? With a trigger I think, but what I have to write in that?

Thx from Germany,
Kampfkobold
Title: Re:How to get music to stop
Post by: THobson on 06 Feb 2005, 23:20:28
0 fadeMusic 0  will turn it off immediately.


From comref:

time fadeMusic volume

Operand types:
time: Number
volume: Number
Type of returned value:
Nothing
Description:
Smooth change in music volume. Change duration is given by time, target volume by volume. Default music volume is 0.5.

Example:
5 fadeMusic 0
Title: Re:How to get music to stop
Post by: Planck on 06 Feb 2005, 23:21:07
Try something like:

10 fademusic 0

10 is the time that the music will fade over....so put in your preferred time here.

0 is the target volume.....in this case 0

Default volume in OFP is 0.5

EDIT.......Hmmmmm.........39 seconds THobson

Planck
Title: Re:How to get music to stop
Post by: Kampfkobold on 07 Feb 2005, 13:49:47
Alright, thanks it's that what I'm searching for.
But now I have another, almost similar problem. I have a Vehicle with a driver. This Vehicle, I've called "V1", has at the Initialize "V1 say "Music1"" and it worked. But how to get that to stop. It isn't music in that sense you can stop it whith your codes, isn't it? So how I can get s.o./s.th. stop to talk without kill him?

Kampfkobold