JohnandSerena
Junior Member
Posts: 11
Threads: 4
Joined: Dec 2012
Reputation:
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
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
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)
Aculy iz dolan.
04-28-2013, 02:48 PM
Tomato Cat
Senior Member
Posts: 287
Threads: 2
Joined: Sep 2012
Reputation:
20
RE: Brute Path Nodes
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 , "" ); } }
This might be your problem. Unless your nodes are in strange places?
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
JohnandSerena
Junior Member
Posts: 11
Threads: 4
Joined: Dec 2012
Reputation:
1
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
Tomato Cat
Senior Member
Posts: 287
Threads: 2
Joined: Sep 2012
Reputation:
20
RE: Brute Path Nodes
Can you attach a download to your map file?
04-28-2013, 07:35 PM
JohnandSerena
Junior Member
Posts: 11
Threads: 4
Joined: Dec 2012
Reputation:
1
RE: Brute Path Nodes
(04-28-2013, 07:35 PM) Mr Credits Wrote: Can you attach a download to your map file?
Attached Files
Maps.rar (Size: 1.58 MB / Downloads: 147)
04-28-2013, 08:59 PM
Tomato Cat
Senior Member
Posts: 287
Threads: 2
Joined: Sep 2012
Reputation:
20
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
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
RE: Brute Path Nodes
Aaah, now I know why!
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
THE OTHERWORLD (WIP)
Aculy iz dolan.
04-28-2013, 09:46 PM