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
JohnandSerena Offline
Junior Member

Posts: 11
Threads: 4
Joined: Dec 2012
Reputation: 1
#1
Brute Path Nodes

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()
{
}
04-28-2013, 02:38 PM
Find
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
Tomato Cat Offline
Senior Member

Posts: 287
Threads: 2
Joined: Sep 2012
Reputation: 20
#3
RE: Brute Path Nodes

PHP Code: (Select All)
void MonsterFunction(string &in asParentstring &in asChildint 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 113i++)
{
AddEnemyPatrolNode("servant_brute_1","PathNodeArea_"+i0"");
}


This might be your problem. Unless your nodes are in strange places?

PHP Code: (Select All)
void MonsterFunction blahblah
{
  for(
int i=1;i<13,i++)
  {
    
AddEnemyPatrolNode(etcetc)
   }


Beat me to it.

RAISE YOUR DONGERS ヽ༼ຈل͜ຈ༽ノ
(This post was last modified: 04-28-2013, 02:54 PM by Tomato Cat.)
04-28-2013, 02:54 PM
Find
JohnandSerena Offline
Junior Member

Posts: 11
Threads: 4
Joined: Dec 2012
Reputation: 1
#4
RE: Brute Path Nodes

I tried your script and I got the same result. Mapview shows that my nodes aren't linked.
(This post was last modified: 04-28-2013, 06:48 PM by JohnandSerena.)
04-28-2013, 06:39 PM
Find
Tomato Cat Offline
Senior Member

Posts: 287
Threads: 2
Joined: Sep 2012
Reputation: 20
#5
RE: Brute Path Nodes

Can you attach a download to your map file?
04-28-2013, 07:35 PM
Find
JohnandSerena Offline
Junior Member

Posts: 11
Threads: 4
Joined: Dec 2012
Reputation: 1
#6
RE: Brute Path Nodes

(04-28-2013, 07:35 PM)Mr Credits Wrote: Can you attach a download to your map file?


Attached Files
.rar   Maps.rar (Size: 1.58 MB / Downloads: 148)
04-28-2013, 08:59 PM
Find
Tomato Cat Offline
Senior Member

Posts: 287
Threads: 2
Joined: Sep 2012
Reputation: 20
#7
RE: Brute Path Nodes

Now, I'm not sure if this is the exact reason, but when I moved the grass above the nodes, they connected.

Basically what chaser says. =p
(This post was last modified: 04-28-2013, 10:00 PM by Tomato Cat.)
04-28-2013, 09:26 PM
Find
The chaser Offline
Posting Freak

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

Aaah, now I know why! Wink

You used a static_object, right? All static objects have collision enabled by default. As the grass was in the middle of the relation of the Path nodes, they couldn't link (it would be like trying to make a brute walk from a room to another crossing through the wall)

You must simply disable collision in grass and it'll work Wink

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
04-28-2013, 09:46 PM
Find




Users browsing this thread: 2 Guest(s)