| Need help with a script. 
 
				For some reason my script just doesn't want to work. I'm not an experienced scripter so I don't know how to fix it. The point of the script is that a brute is activated and patrols the PosNode path and then keeps patroling that area. Here's the script:
 
 
 void OnStart()
 {
 SetEntityPlayerInteractCallback("FirstNote", "BruteAttack", false);
 }
 
 
 void BruteAttack(string& asEntity)
 {
 SetMessage("Message", "Brute", 3);
 SetEntityActive("Brute1", true);
 AddEnemyPatrolNode("Brute1", "PosNodeArea1", 0, ""); <---- This part doesn't want to work
 AddEnemyPatrolNode("Brute1", "PosNodeArea2", 3, ""); <---- This part doesn't want to work
 AddEnemyPatrolNode("Brute1", "PosNodeArea1", 0, ""); <---- This part doesn't want to work
 AddTimer("", 5, "BrutePatrol1"); <---- This part doesn't want to work
 }
 
 void BrutePatrol1(string &in asTimer)
 {
 AddEnemyPatrolNode("Brute1", "PosNodeArea3", 2, "");
 AddTimer("", 5, "BrutePatrol2");
 }
 
 void BrutePatrol2(string &in asTimer)
 {
 AddEnemyPatrolNode("Brute1", "PosNodeArea4", 2, "");
 AddTimer("", 5, "BrutePatrol1");
 }
 
 
 When the player interacts with the note the message is activated together with the Brute. But he won't patrol the PosNode path... I don't know if the timer won't activate or he won't follow the PosNode in the other function. Please help I would really appreciate!
 
 //Thanks alot
 Cole Woods
 
				
(This post was last modified: 06-03-2012, 03:17 PM by Cole Woods.)
 |