| 
		
	
		| G510s  Banned
 
 Posts: 58
 Threads: 32
 Joined: Jun 2014
 | 
			| sound script issue 
 
				void OnStart(){
 PlayMusic("Search_Brute", true, 5, 3.0, 4, true);
 
 AddEntityCollideCallback("Player", "Script", "UseScript", true, 1);
 
 AddEntityCollideCallback("Player", "Script_1", "Sound", true, 1);
 }
 
 
 
 void Sound(string &in asParent, string &in asChild, int alState)
 {
 
 PlaySoundAtEntity("", "scare_wood_creak.snt", "Player", 1.2, false);
 
 }
 
 
 
 
 void UseScript(string &in asParent, string &in asChild, int alState)
 {
 
 SetEntityActive("SlenderMan", true);
 
 }
 
 
 
 ------------------------------------------------------------------------------------------------------
 this is my script. what can i do to fix it. when i walk into the script area it will not play the sound.
 |  |  
	| 12-16-2014, 12:06 PM |  |  
	
		| Mudbill   Muderator
 
 Posts: 3,881
 Threads: 59
 Joined: Apr 2013
 Reputation: 
179
 | 
			| RE: sound script issue 
 
				This looks correct to me. The issue might be something else.
 Are your script files properly formatted? They will only work in a clean text file. Even if they're named .hps, they might still have an odd format if you used a program like Word or such.
 
 Are your in-game names and files matching? For example "Script_1", does that area (?) actually exist and is it named exactly that?
 
 You can try to add a debug message (if you have your dev environment set up) and see if the code runs. Maybe you just can't hear the sound. Maybe it's too low or your game sounds are off.
 
 
				
(This post was last modified: 12-16-2014, 12:48 PM by Mudbill.)
 |  |  
	| 12-16-2014, 12:47 PM |  |  
	
		| G510s  Banned
 
 Posts: 58
 Threads: 32
 Joined: Jun 2014
 | 
			| RE: sound script issue 
 
				 (12-16-2014, 12:47 PM)Mudbill Wrote:  This looks correct to me. The issue might be something else.
 Are your script files properly formatted? They will only work in a clean text file. Even if they're named .hps, they might still have an odd format if you used a program like Word or such.
 
 Are your in-game names and files matching? For example "Script_1", does that area (?) actually exist and is it named exactly that?
 
 You can try to add a debug message (if you have your dev environment set up) and see if the code runs. Maybe you just can't hear the sound. Maybe it's too low or your game sounds are off.
 
I actually don't know how to set up a dev enviroment on windows. how do I do that?
			 |  |  
	| 12-16-2014, 01:04 PM |  |  
	
		| Mudbill   Muderator
 
 Posts: 3,881
 Threads: 59
 Joined: Apr 2013
 Reputation: 
179
 |  |  
	| 12-16-2014, 01:09 PM |  |  
	
		| G510s  Banned
 
 Posts: 58
 Threads: 32
 Joined: Jun 2014
 |  |  
	| 12-16-2014, 01:47 PM |  |  
	
		| Mudbill   Muderator
 
 Posts: 3,881
 Threads: 59
 Joined: Apr 2013
 Reputation: 
179
 | 
			| RE: sound script issue 
 
				Well, you can delete the main_settings.cfg file in your Documents location. It will regenerate when you start the game.
			 
 |  |  
	| 12-16-2014, 02:25 PM |  |  |