amusei 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 23 
	Threads: 8 
	Joined: Aug 2012
	
 Reputation: 
2
		
	 | 
	
		
			
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   
			 
			
			
			
				
(This post was last modified: 08-16-2012, 08:57 AM by amusei.)
 
				
			 
		 |  
	 
 | 
 
	| 08-14-2012, 04:05 PM  | 
	
		
	 | 
 
 
	
		
		Adny 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,766 
	Threads: 6 
	Joined: Mar 2012
	
 Reputation: 
173
		
	 | 
	
		
			
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  | 
	
		
	 | 
 
 
	
		
		amusei 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 23 
	Threads: 8 
	Joined: Aug 2012
	
 Reputation: 
2
		
	 | 
	
		
			
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  | 
	
		
	 | 
 
 
	
		
		Robby 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 2,549 
	Threads: 38 
	Joined: Jun 2009
	
 Reputation: 
47
		
	 | 
	
		
			
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  | 
	
		
	 | 
 
 
	
		
		amusei 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 23 
	Threads: 8 
	Joined: Aug 2012
	
 Reputation: 
2
		
	 | 
	
		
			
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    When I changed it to another music file it worked. Thanks!
			  
			
			
			
		 |  
	 
 | 
 
	| 08-16-2012, 08:53 AM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: Can't play music 
			 
			
				 (08-16-2012, 08:53 AM)amusei Wrote:  I guess amb_25.ogg is bugged   When I changed it to another music file it worked. Thanks! 
You sure it wasn't called "25_amb"?
			  
			
			
 
			
		 |  
	 
 | 
 
	| 08-16-2012, 05:28 PM  | 
	
		
	 | 
 
 
	 
 |