Why wont this script work? 
			 
			
				Heres the script 
 
//////////////////////////// 
// Run when the map starts 
void OnStart() 
{ 
AddEntityCollideCallback("Player", "FlyingJesus_1", "HolyJesus", true, 1); 
AddEntityCollideCallback("Jesus1", "FlyingJesus_1", "Sound", true, 1); 
SetEntityCallbackFunc("Avain", "OnPickup"); 
} 
 
void HolyJesus(string &in asParent, string &in asChild, int alState) 
{ 
SetEntityActive("Jesus1"); 
AddPropForce("Jesus1", 0, 0, 30000, "World"); 
} 
 
 
void Sound(string &in asParent, string &in asChild, int alState) 
{ 
PlaySoundAtEntity("", "24_iron_maiden.snt", "FlyingJesus_1", 0, false); 
} 
void OnPickup(string &in asEntity, string &in type) 
{ 
SetEntityActive("grunt_1", true); 
GiveSanityDamage(10.0f, true); 
AddEnemyPatrolNode("grunt_1", "PathNodeArea_1", 2, ""); 
AddEnemyPatrolNode("grunt_1", "PathNodeArea_2", 1, ""); 
AddEnemyPatrolNode("grunt_1", "PathNodeArea_3", 1, ""); 
AddEnemyPatrolNode("grunt_1", "PathNodeArea_4", 1, ""); 
AddEnemyPatrolNode("grunt_1", "PathNodeArea_5", 1, ""); 
AddEnemyPatrolNode("grunt_1", "PathNodeArea_6", 1, ""); 
AddEnemyPatrolNode("grunt_1", "PathNodeArea_7", 1, ""); 
AddEnemyPatrolNode("grunt_1", "PathNodeArea_8", 2, ""); 
AddEnemyPatrolNode("grunt_1", "PathNodeArea_9", 1, ""); 
AddEnemyPatrolNode("grunt_1", "PathNodeArea_10", 1, ""); 
} 
//////////////////////////// 
// Run when entering map 
void OnEnter() 
{ 
} 
//////////////////////////// 
// Run when leaving map 
void OnLeave() 
{ 
} 
Whats wrong with it? 
  
 
			 
			
			
			
				
(This post was last modified: 01-09-2012, 07:28 PM by Datguy5.)
 
				
			 
		 |