Frictional Games Forum (read-only)

Full Version: Music questions...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi there i made a script to play a music after a event... but i have written an other script to stop that music but it gives me errors... i copied from the script from the wiki:

void StopMusic(float afStepSize)

but still no resolts :/ eny help?
The StopMusic function has a different syntax.

void StopMusic(float afFadeTime, int alPrio);

So, I usually put a 2 second fade time and the priority should be 0.
What you copied does not even exist in the script functions!
Are you sure you used the right page?
(04-02-2011, 07:43 PM)Pandemoneus Wrote: [ -> ]What you copied does not even exist in the script functions!
Are you sure you used the right page?

i donĀ“t know... well what ever the the real code is here so thank you Big Grin
ok it did not gave error but the music still does not stop :/

my code StopMusic(25, 0); (it activates wend i pick up a key.
That's because the first number is how long it takes to fade out. In seconds. You have it set to fade out over the course of 25 seconds. Set it to something like 2.
but i did that the first time and it did not worked :/ i thought that was the amout of volume it loses per second... so tried to make the number bigger...
Change the second number to whatever priority the music is.

Are you sure the function is being called correctly?
(04-02-2011, 08:08 PM)Anxt Wrote: [ -> ]Change the second number to whatever priority the music is.

Are you sure the function is being called correctly?
yes i think it is... because wend i pick up the key everithing that was supossed to happen happened... except the music :/

btw what is the "priority" in scripting?
The game chooses the music with the lowest number for priority (so 0 is top priority, 1 is right below 0, 2 is below 1, etc.) to play.

Is it an enemy music that is playing?
no its a amb... more specificaly 01_amb_darkness i want that music to stop because i don't know why but the enemy music does not play... so i wanted to try not haveing a music wend he is around...
Pages: 1 2