savior10946 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 8 
	Threads: 7 
	Joined: Mar 2011
	
 Reputation: 
0
		
	 | 
	
		
			
Whats wrong with this sound 
			 
			
				void OnStart() 
{ 
	AddEntityCollideCallback("Player" , "room_1" , "Collidedoor_1" , true , 0); 
} 
 
	void Collidedoor_1(string &in asParent , string &in asChild , int alState) 
{ 
	SetSwingDoorLocked("door_1", true, true); 
	PlaySoundAtEntity("", "react_breath1", "Player", 0.0f, false); 
} 
 
it wont play the sound when the door slams shut.Whats wrong with it?
			 
			
			
			
		 |  
	 
 | 
	| 04-01-2011, 04:47 AM  | 
	
		
	 | 
	
		
		Anxt 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 588 
	Threads: 12 
	Joined: Mar 2011
	
 Reputation: 
10
		
	 | 
	
		
			
RE: Whats wrong with this sound 
			 
			
				Honestly I have run into this issue several times myself, and I really don't know what causes it, or how to fix it.  I have preloaded the sound, named the sound, added the filetype inside the sound file field, and none of it works.  The only work around I have found is to use an SNT file instead, and if need be, customize one so that it only plays the sound I want it to.  If someone knows a simpler solution, I would be most excited to hear it as well.
			 
			
			
 
			
		 |  
	 
 | 
	| 04-01-2011, 05:17 AM  | 
	
		
	 | 
	
		
		MrBigzy 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 616 
	Threads: 18 
	Joined: Mar 2011
	
 Reputation: 
8
		
	 | 
	
		
			
RE: Whats wrong with this sound 
			 
			
				Only .snt extensions will work. PlayMusic will use .ogg though. AFAIK anyway. It's not hard to make a .snt file anyway if need be, it's just a script file for sounds.
			 
			
			
			
		 |  
	 
 | 
	| 04-01-2011, 05:32 AM  | 
	
		
	 | 
	
		
		jens 
 
 
		
			Frictional Games 
			
			
			
 
			
	Posts: 4,093 
	Threads: 199 
	Joined: Apr 2006
	
 Reputation: 
202
		
	 | 
	
		
			
RE: Whats wrong with this sound 
			 
			
				Use PlayGuiSound("react_breath1.ogg", 1);  to play ogg files without using a .snt file.
			 
			
			
			
		 |  
	 
 | 
	| 04-01-2011, 06:52 AM  | 
	
		
	 |