Frictional Games Forum (read-only)
Music questions... - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Music questions... (/thread-7168.html)

Pages: 1 2


Music questions... - Danny Boy - 04-02-2011

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?


RE: Music questions... - Anxt - 04-02-2011

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.


RE: Music questions... - Pandemoneus - 04-02-2011

What you copied does not even exist in the script functions!
Are you sure you used the right page?


RE: Music questions... - Danny Boy - 04-02-2011

(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.


RE: Music questions... - Anxt - 04-02-2011

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.


RE: Music questions... - Danny Boy - 04-02-2011

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...


RE: Music questions... - Anxt - 04-02-2011

Change the second number to whatever priority the music is.

Are you sure the function is being called correctly?


RE: Music questions... - Danny Boy - 04-02-2011

(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?


RE: Music questions... - Anxt - 04-02-2011

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?


RE: Music questions... - Danny Boy - 04-02-2011

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...