Gamemakingdude
Senior Member
Posts: 470
Threads: 82
Joined: Nov 2010
Reputation:
9
|
Nodes problem
Ok i have nodes in my map and the infected follows some of them. But he stops at some of them
I also would like it that he would just follow them without stopping at them for like a period of time.
|
|
11-28-2010, 11:31 PM |
|
LoneWolf
Senior Member
Posts: 308
Threads: 43
Joined: Sep 2010
Reputation:
0
|
RE: Nodes problem
Have you done scripting for the enemy nodes? eg.
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 1.0f, "");
the 1.0f is how long the enemy waits at the specific node for. Also maybe your nodes may be too far apart ?
|
|
11-29-2010, 12:03 AM |
|
Gamemakingdude
Senior Member
Posts: 470
Threads: 82
Joined: Nov 2010
Reputation:
9
|
RE: Nodes problem
(11-29-2010, 12:03 AM)LoneWolf Wrote: Have you done scripting for the enemy nodes? eg.
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 1.0f, "");
the 1.0f is how long the enemy waits at the specific node for. Also maybe your nodes may be too far apart ?
Most of them are all close to each other and its 0.0f. i have in mine.
|
|
11-29-2010, 12:33 AM |
|
Gamemakingdude
Senior Member
Posts: 470
Threads: 82
Joined: Nov 2010
Reputation:
9
|
RE: Nodes problem - Another problem
(11-29-2010, 12:33 AM)Gamemakingdude Wrote: (11-29-2010, 12:03 AM)LoneWolf Wrote: Have you done scripting for the enemy nodes? eg.
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 1.0f, "");
the 1.0f is how long the enemy waits at the specific node for. Also maybe your nodes may be too far apart ?
Most of them are all close to each other and its 0.0f. i have in mine.
Another problem i have is that i have a statue, that isn't active in the editor but appearently is active in the game. And it should only go active after i walk through a script area.
|
|
11-29-2010, 03:33 AM |
|
Chilton
Member
Posts: 138
Threads: 9
Joined: Sep 2010
Reputation:
0
|
RE: Nodes problem - Another problem
(11-29-2010, 03:33 AM)Gamemakingdude Wrote: (11-29-2010, 12:33 AM)Gamemakingdude Wrote: (11-29-2010, 12:03 AM)LoneWolf Wrote: Have you done scripting for the enemy nodes? eg.
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 1.0f, "");
the 1.0f is how long the enemy waits at the specific node for. Also maybe your nodes may be too far apart ?
Most of them are all close to each other and its 0.0f. i have in mine.
Another problem i have is that i have a statue, that isn't active in the editor but appearently is active in the game. And it should only go active after i walk through a script area.
The best thing you can do is show us the script, i believe; (That part of it)
(This post was last modified: 11-29-2010, 04:56 AM by Chilton.)
|
|
11-29-2010, 04:56 AM |
|
Gamemakingdude
Senior Member
Posts: 470
Threads: 82
Joined: Nov 2010
Reputation:
9
|
RE: Nodes problem - Another problem
void OnStart() { AddEntityCollideCallback("Player", "KeyFall", "KeyFalling",true,1); AddEntityCollideCallback("Player", "CloseHatch", "CollideSwing", true, 1); AddEntityCollideCallback("Player", "cellar_wood01_1","WaterLurker", false, 1); AddEntityCollideCallback("Player", "ScriptArea_1", "Infected", true, 1); AddEntityCollideCallback("Player", "ScriptArea_2", "StatueScare", true,1); AddUseItemCallback("", "key_study_1", "hatch_metal01_1", "UsedKeyOnDoor", true); GiveItemFromFile("lantern", "lantern.ent"); for(int i=19; i<71; i++) { AddEnemyPatrolNode("character_infected_1", "PathNodeArea_"+i, 0.0f, ""); } }
void StatueScare(string &in asParent, string &in asChild, int alState) { SetEntityActive("deformed_man_2",true); StartPlayerLookAt("LookAt_1",2,2,""); AddTimer("Hide",2.0f,"HideMan"); GiveSanityDamage(20,true); }
void HideMan(string &in asParent, string &in asChild, int alState) { StopPlayerLookAt(); SetEntityActive("deformed_man_2",false); }
|
|
11-29-2010, 05:22 AM |
|
LoneWolf
Senior Member
Posts: 308
Threads: 43
Joined: Sep 2010
Reputation:
0
|
RE: Nodes problem
Aha! you only have 1 patrol node ! You need to write down what i said roughly for each node you want so if you have 100 nodes you need 100 lines of the node script.
Also you would obviously change the name to node 2 node 3 node 4 etc.
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 1.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 1.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 1.0f, "");
EDIT: unless the +i that you have does that, if so then i have no idea whats wrong. maybe you should call the first node = PathNodeArea_1 instead of missing out the 1 ?
(This post was last modified: 11-29-2010, 11:05 AM by LoneWolf.)
|
|
11-29-2010, 11:03 AM |
|
Gamemakingdude
Senior Member
Posts: 470
Threads: 82
Joined: Nov 2010
Reputation:
9
|
RE: Nodes problem
(11-29-2010, 11:03 AM)LoneWolf Wrote: Aha! you only have 1 patrol node ! You need to write down what i said roughly for each node you want so if you have 100 nodes you need 100 lines of the node script.
Also you would obviously change the name to node 2 node 3 node 4 etc.
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 1.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 1.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 1.0f, "");
EDIT: unless the +i that you have does that, if so then i have no idea whats wrong. maybe you should call the first node = PathNodeArea_1 instead of missing out the 1 ?
The first node is for another enemy.
|
|
11-29-2010, 10:06 PM |
|
LoneWolf
Senior Member
Posts: 308
Threads: 43
Joined: Sep 2010
Reputation:
0
|
RE: Nodes problem
"PathNodeArea_"+i is it not PathNodeArea_1 though? then 2 then 3 etc.
Also which ever node you want the enemy to use put its number in, so if it starts on number 12 start with 12 till the ending node. Only thing i can think of.
Edit: have you used map view to check that all the nodes are properly working? and maybe the time coudl be changed to 0.1 incase 0 doesnt work right?
(This post was last modified: 11-29-2010, 10:29 PM by LoneWolf.)
|
|
11-29-2010, 10:27 PM |
|
Gamemakingdude
Senior Member
Posts: 470
Threads: 82
Joined: Nov 2010
Reputation:
9
|
RE: Nodes problem
(11-29-2010, 10:27 PM)LoneWolf Wrote: "PathNodeArea_"+i is it not PathNodeArea_1 though? then 2 then 3 etc.
Also which ever node you want the enemy to use put its number in, so if it starts on number 12 start with 12 till the ending node. Only thing i can think of.
Edit: have you used map view to check that all the nodes are properly working? and maybe the time coudl be changed to 0.1 incase 0 doesnt work right?
I'll try this.
Doesn't work. The nodes are all connected to each other.
(This post was last modified: 11-29-2010, 11:05 PM by Gamemakingdude.)
|
|
11-29-2010, 10:58 PM |
|
|