| 
		
	
		| Jagsrs28   Member
 
 Posts: 101
 Threads: 25
 Joined: Jun 2012
 Reputation: 
0
 | 
			| ITS NOT WORKING! 
 
				I am trying to set up a cheap jump scare but it is not working. I have a brute in a cabinet his name is: servant_brute_2 
 Here is the script I typed:
 
 {
 AddEntityCollideCallback("Player", "ScriptArea_6", "CabinateScare", true, 1);
 }
 
 
 void CabinateScare(string &in asParent, string &in asChild, int alState)
 {
 PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
 PlaySoundAtEntity("", "react_scare", "Player", 0, false);
 PlaySoundAtEntity("", "hurt_pant.snt", "Player", 0, false);
 SetEntityActive("servant_brute_2", true);
 AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_5", 0, "Idle");
 }
 
 Whenever I walk up to the cabinet the brute is supposed to activate and pop out, But he didn't even activate (He is deactivated) I have a PathNode set up right in front of the cabinet.
 
 EDIT: I have the script area right in front of the cabinet.
 
 Special Custom Story for 2 special people!
 ![[Image: LWFcAl]](http://bit.ly/LWFcAl)  
 
 
				
(This post was last modified: 06-25-2012, 10:02 AM by Jagsrs28.)
 |  |  
	| 06-25-2012, 09:34 AM |  |  
	
		| Dutton   Member
 
 Posts: 121
 Threads: 3
 Joined: Apr 2012
 Reputation: 
2
 | 
			| RE: ITS NOT WORKING! 
 
				did you put:
 void OnStart()
 
 
 on top of:
 {
 AddEntityCollideCallback("Player", "ScriptArea_6", "CabinateScare", true, 1);
 }
 
 
 ?
 
 |  |  
	| 06-25-2012, 09:50 AM |  |  
	
		| Jagsrs28   Member
 
 Posts: 101
 Threads: 25
 Joined: Jun 2012
 Reputation: 
0
 | 
			| RE: ITS NOT WORKING! 
 
				 (06-25-2012, 09:50 AM)Dutton Wrote:  did you put:
 void OnStart()
 
 
 on top of:
 {
 AddEntityCollideCallback("Player", "ScriptArea_6", "CabinateScare", true, 1);
 }
 
 
 ?
 Yep thats there :/
 
 
Fixed it.
			 
 Special Custom Story for 2 special people!
 ![[Image: LWFcAl]](http://bit.ly/LWFcAl)  
 
 
				
(This post was last modified: 06-25-2012, 10:02 AM by Jagsrs28.)
 |  |  
	| 06-25-2012, 09:55 AM |  |  
	
		| Dutton   Member
 
 Posts: 121
 Threads: 3
 Joined: Apr 2012
 Reputation: 
2
 | 
			| RE: ITS NOT WORKING! 
 
				What was the problem?
 i just made a small test map with following code:
 
 void OnStart()
 {
 AddEntityCollideCallback("Player", "jumpscare1", "BruteFunc", true, 1);
 }
 
 void BruteFunc(string &in asParent, string &in asChild, int alState)
 {
 PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
 PlaySoundAtEntity("", "react_scare", "Player", 0, false);
 PlaySoundAtEntity("", "hurt_pant.snt", "Player", 0, false);
 SetEntityActive("brutescare", true);
 }
 
 and it worked perfectly :p
 
 |  |  
	| 06-25-2012, 10:27 AM |  |  
	
		| Jagsrs28   Member
 
 Posts: 101
 Threads: 25
 Joined: Jun 2012
 Reputation: 
0
 | 
			| RE: ITS NOT WORKING! 
 
				 (06-25-2012, 10:27 AM)Dutton Wrote:  What was the problem?
 i just made a small test map with following code:
 
 void OnStart()
 {
 AddEntityCollideCallback("Player", "jumpscare1", "BruteFunc", true, 1);
 }
 
 void BruteFunc(string &in asParent, string &in asChild, int alState)
 {
 PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
 PlaySoundAtEntity("", "react_scare", "Player", 0, false);
 PlaySoundAtEntity("", "hurt_pant.snt", "Player", 0, false);
 SetEntityActive("brutescare", true);
 }
 
 and it worked perfectly :p
 Well It was supposed to activate when I was really close up to it and as soon as he was activated he deactivated (He's a poofer). My bad XD
			 
 Special Custom Story for 2 special people!
 ![[Image: LWFcAl]](http://bit.ly/LWFcAl)  
 
 |  |  
	| 06-25-2012, 10:35 AM |  |  |