Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Music questions...
Danny Boy Offline
Posting Freak

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#1
Music questions...

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?
04-02-2011, 07:30 PM
Website Find
Anxt Offline
Senior Member

Posts: 588
Threads: 12
Joined: Mar 2011
Reputation: 10
#2
RE: Music questions...

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.

04-02-2011, 07:41 PM
Find
Pandemoneus Offline
Senior Member

Posts: 328
Threads: 2
Joined: Sep 2010
Reputation: 0
#3
RE: Music questions...

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
Find
Danny Boy Offline
Posting Freak

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#4
RE: Music questions...

(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.
(This post was last modified: 04-02-2011, 08:00 PM by Danny Boy.)
04-02-2011, 07:46 PM
Website Find
Anxt Offline
Senior Member

Posts: 588
Threads: 12
Joined: Mar 2011
Reputation: 10
#5
RE: Music questions...

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.

04-02-2011, 08:02 PM
Find
Danny Boy Offline
Posting Freak

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#6
RE: Music questions...

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...
04-02-2011, 08:05 PM
Website Find
Anxt Offline
Senior Member

Posts: 588
Threads: 12
Joined: Mar 2011
Reputation: 10
#7
RE: Music questions...

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
Find
Danny Boy Offline
Posting Freak

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#8
RE: Music questions...

(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?
04-02-2011, 08:11 PM
Website Find
Anxt Offline
Senior Member

Posts: 588
Threads: 12
Joined: Mar 2011
Reputation: 10
#9
RE: Music questions...

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?

04-02-2011, 08:16 PM
Find
Danny Boy Offline
Posting Freak

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#10
RE: Music questions...

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...
(This post was last modified: 04-02-2011, 08:33 PM by Danny Boy.)
04-02-2011, 08:26 PM
Website Find




Users browsing this thread: 4 Guest(s)