| 
		
	
		| TheDavenia   Member
 
 Posts: 223
 Threads: 38
 Joined: Jun 2011
 Reputation: 
0
 | 
			| What is wrong with my script? 
 
				void OnStart(){
 AddEntityCollideCallback("Player", "Event", "Event", true, 1);
 MonsterPath1();
 AddEntityCollideCallback("servant_grunt_1", "GruntDisable", "GruntDisable", true, 1);
 }
 
 void Event(string &in asParent, string &in asChild, int alState)
 {
 PlaySoundAtEntity("GruntSlash", "attack_claw_hit.snt", "Scream", 1, true);
 SetPlayerActive(false);
 StartPlayerLookAt("LookAtGrunt", 10, 50, "");
 AddTimer("", 0.5f, "Scream");
 }
 
 void Scream(string &in asTimer)
 {
 PlaySoundAtEntity("HumanScream", "21_intro_scream.snt", "Scream", 1, true);
 AddTimer("", 1.0f, "Grunt");
 }
 
 void Grunt(string &in asTimer)
 {
 SetEntityActive("servant_grunt_1", true);
 }
 
 void MonsterPath1()
 {
 AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0.0f, "");
 }
 
 void GruntDisable(string &in asParent, string &in asChild, int alState)
 {
 SetEntityActive("servant_grunt_1", false);
 SetPlayerActive(true);
 StopPlayerLookAt();
 }
 
 That's in my script, but none of it works when i walk into the area.
 And yes I've checked the name of the area it is right...
 
 Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
 
				
(This post was last modified: 11-18-2011, 06:51 PM by TheDavenia.)
 |  |  
	| 11-17-2011, 09:25 PM |  |  
	
		| Obliviator27   Posting Freak
 
 Posts: 792
 Threads: 10
 Joined: Jul 2011
 Reputation: 
66
 | 
			| RE: What is wrong with my script? 
 
				 (11-17-2011, 09:25 PM)TheDavenia Wrote:  void OnStart(){
 AddEntityCollideCallback("Player", "Event", "Event", true, 1);
 MonsterPath1();
 AddEntityCollideCallback("servant_grunt_1", "GruntDisable", "GruntDisable", true, 1);
 }
 
 void Event(string &in asParent, string &in asChild, int alState)
 {
 PlaySoundAtEntity("GruntSlash", "attack_claw_hit.snt", "Scream", 1, true);
 SetPlayerActive(false);
 StartPlayerLookAt("LookAtGrunt", 10, 50, "");
 AddTimer("", 0.5f, "Scream");
 }
 
 void Scream(string &in asTimer)
 {
 PlaySoundAtEntity("HumanScream", "21_intro_scream.snt", "Scream", 1, true);
 AddTimer("", 1.0f, "Grunt");
 }
 
 void Grunt(string &in asTimer)
 {
 SetEntityActive("servant_grunt_1", true);
 }
 
 void MonsterPath1()
 {
 AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0.0f, "");
 }
 
 void GruntDisable(string &in asParent, string &in asChild, int alState)
 {
 SetEntityActive("servant_grunt_1", false);
 SetPlayerActive(true);
 StopPlayerLookAt();
 }
 
 That's in my script, but none of it works when i walk into the area.
 And yes I've checked the name of the area it is right...
 The problem you're likely encountering is you have many similar names. I've found that by colliding with an area but having that area's name be the function often doesn't work. Try switching up the names.
			 
 |  |  
	| 11-17-2011, 10:04 PM |  |  
	
		| flamez3   Posting Freak
 
 Posts: 1,281
 Threads: 48
 Joined: Apr 2011
 Reputation: 
57
 | 
			| RE: What is wrong with my script? 
 
				Does the fatal error come up, if so; paste it here. If it doesn't try what Obliviator said 
			 
 
				
(This post was last modified: 11-17-2011, 10:22 PM by flamez3.)
 |  |  
	| 11-17-2011, 10:21 PM |  |  
	
		| TheDavenia   Member
 
 Posts: 223
 Threads: 38
 Joined: Jun 2011
 Reputation: 
0
 | 
			| RE: What is wrong with my script? 
 
				I already got it fixed   
 Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
 |  |  
	| 11-18-2011, 05:50 PM |  |  |