JMFStorm 
 
 
		
			Member 
			
			
			
 
			
	Posts: 205 
	Threads: 8 
	Joined: Aug 2011
	
 Reputation: 
28
		
	 | 
	
		
			
RE: Scare Event Help 
			 
			
				 The correct function of the script goes like this: "PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);" 
The right way to do this is: 
PlaySoundAtEntity("scratchsound_1", "scare_scratch.snt", "private_room", 0, false); 
and then: 
StopSound("scratchsound_1", 0); 
You didn't have "string& asSoundName" you need to name the sound with a name if you want to make a function to it. And no, the .snt file end is not necessary. 
 
			 
			
			
 
			
		 |  
	 
 | 
	| 03-10-2012, 05:09 PM  | 
	
		
	 | 
	
		
		Stepper321 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 263 
	Threads: 26 
	Joined: Nov 2011
	
 Reputation: 
8
		
	 | 
	
		
			
RE: Scare Event Help 
			 
			
				Also, sounds that are created INSIDE the level editor will repeat over and over, it's for ambiance sound, so if you have any of that, remove it.
			 
			
			
 
Signature to awesome to be displayed. 
			
		 |  
	 
 | 
	| 03-10-2012, 05:12 PM  | 
	
		
	 | 
	
		
		ArcherKiller 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 6 
	Threads: 1 
	Joined: Mar 2012
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Scare Event Help 
			 
			
				Thanks for your answers guys. I will give it a try now and will post how it worked. 
 
So yeah. Thanks JMFStorm for correction. 
 
But still I got this question with sounds. For example in Sounds/Scare folder there is scare_animal_squeal.snt file and 4 different scare_animal_squeal1/2/3/4.ogg files. When in editor I chose to play scare_animal_squeal.snt it will play one of those 4 sound randomly. How can I make it to play a specific sound? I tried to add "scare_animal_squeal1.ogg" in script for sound name, but it didn't work. Any help with this?
			 
			
			
			
				
(This post was last modified: 03-10-2012, 07:49 PM by ArcherKiller.)
 
				
			 
		 |  
	 
 | 
	| 03-10-2012, 07:37 PM  | 
	
		
	 | 
	
		
		ArcherKiller 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 6 
	Threads: 1 
	Joined: Mar 2012
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Scare Event Help 
			 
			
				No one knows?
			 
			
			
			
		 |  
	 
 | 
	| 03-11-2012, 08:31 AM  | 
	
		
	 |