Frictional Games Forum (read-only)

Full Version: Nodes problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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.
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)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 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)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)
PHP Code:
void OnStart()
{
    
AddEntityCollideCallback("Player""KeyFall""KeyFalling",true,1);
    
AddEntityCollideCallback("Player""CloseHatch""CollideSwing"true1);
    
AddEntityCollideCallback("Player""cellar_wood01_1","WaterLurker"false1);
    
AddEntityCollideCallback("Player""ScriptArea_1""Infected"true1);
    
AddEntityCollideCallback("Player""ScriptArea_2""StatueScare"true,1);
    
AddUseItemCallback("""key_study_1""hatch_metal01_1""UsedKeyOnDoor"true);
    
GiveItemFromFile("lantern""lantern.ent");
    for(
int i=19i<71i++)
        {
            
AddEnemyPatrolNode("character_infected_1""PathNodeArea_"+i0.0f"");
        }
}

void StatueScare(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("deformed_man_2",true);
    
StartPlayerLookAt("LookAt_1",2,2,"");
    
AddTimer("Hide",2.0f,"HideMan");
    
GiveSanityDamage(20,true);
}

void HideMan(string &in asParentstring &in asChildint alState)
{
    
StopPlayerLookAt();
    
SetEntityActive("deformed_man_2",false);

Aha! you only have 1 patrol node ! You need to write down what i said roughly for each node you want Smile 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 ?
(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 Smile 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.
"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?
(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.
Pages: 1 2