TheDavenia 
			Member0  
	
		
			
Scripting help needed please, fatal error... 
 
				Hey guys I'm getting this error every time i try to load up my map:
And here's my script:
void OnStart()
{
AddEntityCollideCallback("Player", "BruteSpawn", "ActivateBrute", true, 1);
MonsterPath();
MonsterPath1();
AddEntityCollideCallback("servant_brute_1", "ScriptArea_3", "BruteDisable", true, 1);
AddEntityCollideCallback("servant_grunt_1", "GruntDisable", "GruntDisable", true, 1);
SetEntityPlayerInteractCallback("prison_1", "LockCheck", false);
}
void LockCheck(string &in asEntity)
if(GetSwingDoorLocked("prison_1") == true)
{
PlaySoundAtEntity("GruntSlash", "attack_claw_hit.snt", "Scream", 1, true);
AddTimer("", 0.5f, "Scream");
SetPlayerActive(true);
StartPlayerLookAt("LookAtGrunt", 10, 50, "");
}
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(false);
StopPlayerLookAt();
}
void ActivateBrute(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("LookAtWall", 10, 50, "");
AddTimer("", 0.1f, "TimerStopPlayerLookAtWall");
SetPlayerActive(true);
}
void TimerStopPlayerLookAtWall(string &in asTimer)
{
StartPlayerLookAt("LookAtWall", 10, 50, "");
StopPlayerLookAt();
AddTimer("", 0.0f, "FalconPunch");
}
void MonsterPath()
{
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0.0f, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 0.0f, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_4", 0.0f, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 0.0f, "");
}
void FalconPunch(string &in asTimer)
{
PlaySoundAtEntity("HitWall", "attack_claw_hit.snt", "SlashSound", 1, true);
CreateParticleSystemAtEntity("WallSlash", "ps_break_cavein.ps", "LookAtWall", false);
AddTimer("", 0.3f, "BreakWall");
}
void BreakWall(string &in asTimer)
{
PlaySoundAtEntity("WallBreak", "03_break_wall.snt", "LookAtWall", 1, true);
CreateParticleSystemAtEntity("Smoke", "ps_area_fog_xlarge.ps", "Smoke", false);
CreateParticleSystemAtEntity("Smoke", "ps_area_fog_xlarge.ps", "Smoke_1", false);
CreateParticleSystemAtEntity("Smoke", "ps_area_fog_moving.ps", "SmokePush", false);
CreateParticleSystemAtEntity("Smoke", "ps_area_fog_moving.ps", "SmokePush_1", false);
CreateParticleSystemAtEntity("Smoke", "ps_area_fog_moving.ps", "SmokePush_2", false);
CreateParticleSystemAtEntity("Smoke", "ps_area_fog_moving.ps", "SmokePush_3", false);
SetEntityActive("BreakWall_1", false);
SetEntityActive("BrokenWall_1", true);
SetEntityActive("rock_debris01_1", true);
SetEntityActive("rock_debris01_2", true);
SetEntityActive("rock_debris01_3", true);
SetEntityActive("rock_debris01_4", true);
SetEntityActive("rock_debris01_5", true);
SetEntityActive("rock_debris01_6", true);
SetEntityActive("servant_brute_1", true);
StopPlayerLookAt();
StartPlayerLookAt("servant_brute_1", 10, 50, "");
}
void BruteDisable(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", false);
StopPlayerLookAt();
SetPlayerActive(false);
}
Please help someone!
			
Current Project: Nightmare's End(Project Director, Scripter, boss >:D) 
			
				
(This post was last modified: 11-18-2011, 05:52 PM by TheDavenia .) 
 
				
			 
		 
 
 
	11-17-2011, 06:21 PM  
		
	 
 
	
		Unearthlybrutal 
			Posting Freak26  
	
		
			
RE: Scripting help needed please, fatal error... 
 
				Try this
Spoiler below!  
 
 
			 
 
 
	11-17-2011, 06:25 PM  
		
	 
 
	
		TheDavenia 
			Member0  
	
		
			
RE: Scripting help needed please, fatal error... 
 
				 (11-17-2011, 06:25 PM) Unearthlybrutal Wrote:  
Spoiler below!  
 
 I don't get the error anymore, thanks for that.
But now the event doesn't happen when i click the door?
			
 
			
			
Current Project: Nightmare's End(Project Director, Scripter, boss >:D) 
			
		 
 
 
	11-17-2011, 06:44 PM  
		
	 
 
	
		Unearthlybrutal 
			Posting Freak26  
	
		
			
RE: Scripting help needed please, fatal error... 
 
				The event should happen when you touch the door when it's locked. If it's not locked, nothing happens.
			
			
 
 
 
	11-17-2011, 06:50 PM  
		
	 
 
	
		TheDavenia 
			Member0  
	
		
			
RE: Scripting help needed please, fatal error... 
 
				 (11-17-2011, 06:50 PM) Unearthlybrutal Wrote:  It's locked i checked the level editor... 
The player gets deactivated, but the sounds don't happen and the grunt doesn't spawn either
			
 
			
			
Current Project: Nightmare's End(Project Director, Scripter, boss >:D) 
			
				
(This post was last modified: 11-17-2011, 07:03 PM by TheDavenia .) 
 
				
			 
		 
 
 
	11-17-2011, 06:59 PM  
		
	 
 
	
		Unearthlybrutal 
			Posting Freak26  
	
		
			
RE: Scripting help needed please, fatal error... 
 
				You haven't named the timers. I don't know if that has something to do with that.
			
			
 
 
 
	11-17-2011, 09:27 PM  
		
	 
 
	
		TheDavenia 
			Member0  
	
		
			
RE: Scripting help needed please, fatal error... 
 
				 (11-17-2011, 09:27 PM) Unearthlybrutal Wrote:  Well... I don't really think that's the problem cause in my other scripts I din't name them as well... But I'll try... 
Nope... Still not working...
			
 
			
			
Current Project: Nightmare's End(Project Director, Scripter, boss >:D) 
			
				
(This post was last modified: 11-17-2011, 09:34 PM by TheDavenia .) 
 
				
			 
		 
 
 
	11-17-2011, 09:31 PM