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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Brute Path Nodes
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: Brute Path Nodes

(04-28-2013, 02:38 PM)JohnandSerena Wrote: I'm not sure of the problem but my brute has path nodes set and in MapView it doesn't show that the nodes are linked. When I approach the scene in the game, the brute goes nuts and it almost looks like its lagging. The brute stays in place and will do multiple animations and sometimes start to float. Here's my script:
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterFunction", true, 1);
}

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", true);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 3, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_12", 0, "");
for (int i = 1; i < 13; i++)
{
AddEnemyPatrolNode("servant_brute_1","PathNodeArea_"+i, 0, "");
}
}

void OnLeave()
{
}

It's obvious that it drives nuts, you are assigning lots of path nodes at the same time: Just:

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterFunction", true, 1);
}

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
for (int i = 1; i < 13; i++)
{
AddEnemyPatrolNode("servant_brute_1","PathNodeArea_"+i, 0, "");
}
}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
04-28-2013, 02:48 PM
Find


Messages In This Thread
Brute Path Nodes - by JohnandSerena - 04-28-2013, 02:38 PM
RE: Brute Path Nodes - by The chaser - 04-28-2013, 02:48 PM
RE: Brute Path Nodes - by JohnandSerena - 04-28-2013, 06:39 PM
RE: Brute Path Nodes - by Tomato Cat - 04-28-2013, 02:54 PM
RE: Brute Path Nodes - by Tomato Cat - 04-28-2013, 07:35 PM
RE: Brute Path Nodes - by JohnandSerena - 04-28-2013, 08:59 PM
RE: Brute Path Nodes - by Tomato Cat - 04-28-2013, 09:26 PM
RE: Brute Path Nodes - by The chaser - 04-28-2013, 09:46 PM



Users browsing this thread: 1 Guest(s)