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


Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't play music
amusei Offline
Junior Member

Posts: 23
Threads: 8
Joined: Aug 2012
Reputation: 2
#1
Can't play music

I have a problem with the PlayMusic function.
This is my OnEnter part of the script
void OnEnter()
{
    PlayMusic("amb_25.ogg", true, 1.0f, 0, 1, true);
}

The problem is that the music doesn't play when I enter the map.
I also tried to play it with the AddEntityCollideCallback func but it still doesn't play when I enter the script area

    void OnStart()
{
AddEntityCollideCallback("Player", "StartMusic", "Music", true, 1);
}

void Music(string &in asParent, string &in asChild, int alState)
{
    PlayMusic("amb_25.ogg", true, 1.0f, 0, 1, true);
}
If anyone know how to resolve this do not hesitate to tell me Big Grin
(This post was last modified: 08-16-2012, 08:57 AM by amusei.)
08-14-2012, 04:05 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: Can't play music

If there are any other sounds/music playing before that script is triggered, you should set the priority (int alPrio) to 0, meaning the highest priority.

Also, it's a bit basic, but I thought I should ask anyway: are you 100% your .map and .hps files are in the same folder, and are named exactly the same thing?

I rate it 3 memes.
08-14-2012, 04:12 PM
Find
amusei Offline
Junior Member

Posts: 23
Threads: 8
Joined: Aug 2012
Reputation: 2
#3
RE: Can't play music

(08-14-2012, 04:12 PM)andyrockin123 Wrote: If there are any other sounds/music playing before that script is triggered, you should set the priority (int alPrio) to 0, meaning the highest priority.

Also, it's a bit basic, but I thought I should ask anyway: are you 100% your .map and .hps files are in the same folder, and are named exactly the same thing?
Well, there are no other sounds/music playing. Do you think it could be because of the main menu music?
(I tried changing the alPrio to 0 but still no effect)

About the .map and .hps - Yes, there are in the same folder ^^
08-16-2012, 06:53 AM
Find
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#4
RE: Can't play music

(08-16-2012, 06:53 AM)amusei Wrote:
(08-14-2012, 04:12 PM)andyrockin123 Wrote: If there are any other sounds/music playing before that script is triggered, you should set the priority (int alPrio) to 0, meaning the highest priority.

Also, it's a bit basic, but I thought I should ask anyway: are you 100% your .map and .hps files are in the same folder, and are named exactly the same thing?
Well, there are no other sounds/music playing. Do you think it could be because of the main menu music?
(I tried changing the alPrio to 0 but still no effect)

About the .map and .hps - Yes, there are in the same folder ^^
Have you tried playing a different music? Re-check the music file's name as well.

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
08-16-2012, 07:04 AM
Website Find
amusei Offline
Junior Member

Posts: 23
Threads: 8
Joined: Aug 2012
Reputation: 2
#5
RE: Can't play music

(08-16-2012, 07:04 AM)Nemet Robert Wrote:
(08-16-2012, 06:53 AM)amusei Wrote:
(08-14-2012, 04:12 PM)andyrockin123 Wrote: If there are any other sounds/music playing before that script is triggered, you should set the priority (int alPrio) to 0, meaning the highest priority.

Also, it's a bit basic, but I thought I should ask anyway: are you 100% your .map and .hps files are in the same folder, and are named exactly the same thing?
Well, there are no other sounds/music playing. Do you think it could be because of the main menu music?
(I tried changing the alPrio to 0 but still no effect)

About the .map and .hps - Yes, there are in the same folder ^^
Have you tried playing a different music? Re-check the music file's name as well.
I guess amb_25.ogg is bugged Tongue When I changed it to another music file it worked. Thanks!
08-16-2012, 08:53 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#6
RE: Can't play music

(08-16-2012, 08:53 AM)amusei Wrote: I guess amb_25.ogg is bugged Tongue When I changed it to another music file it worked. Thanks!


You sure it wasn't called "25_amb"?

Tutorials: From Noob to Pro
08-16-2012, 05:28 PM
Website Find




Users browsing this thread: 2 Guest(s)