The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with a script.
Cole Woods Offline
Junior Member

Posts: 2
Threads: 1
Joined: May 2012
Reputation: 0
#1
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.)
06-03-2012, 12:32 PM
Find


Messages In This Thread
Need help with a script. - by Cole Woods - 06-03-2012, 12:32 PM
RE: Need help with a script. - by Statyk - 06-03-2012, 02:15 PM
RE: Need help with a script. - by Cole Woods - 06-03-2012, 03:15 PM



Users browsing this thread: 1 Guest(s)