Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 1 Votes - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Nodes problem
Author Message
Gamemakingdude Offline
Senior Member

Posts: 476
Joined: Nov 2010
Reputation: 9
Post: #1
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.

Rep if like me or im helpful or you love my stories!
Stephanos house
11-28-2010 11:31 PM
Find all posts by this user Quote this message in a reply
LoneWolf Offline
Senior Member

Posts: 305
Joined: Sep 2010
Reputation: 0
Post: #2
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
Find all posts by this user Quote this message in a reply
Gamemakingdude Offline
Senior Member

Posts: 476
Joined: Nov 2010
Reputation: 9
Post: #3
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.

Rep if like me or im helpful or you love my stories!
Stephanos house
11-29-2010 12:33 AM
Find all posts by this user Quote this message in a reply
Gamemakingdude Offline
Senior Member

Posts: 476
Joined: Nov 2010
Reputation: 9
Post: #4
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.

Rep if like me or im helpful or you love my stories!
Stephanos house
11-29-2010 03:33 AM
Find all posts by this user Quote this message in a reply
Chilton Offline
Member

Posts: 138
Joined: Sep 2010
Reputation: 0
Post: #5
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
Find all posts by this user Quote this message in a reply
Gamemakingdude Offline
Senior Member

Posts: 476
Joined: Nov 2010
Reputation: 9
Post: #6
RE: Nodes problem - Another problem
PHP Code: (Select All)
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);


Rep if like me or im helpful or you love my stories!
Stephanos house
11-29-2010 05:22 AM
Find all posts by this user Quote this message in a reply
LoneWolf Offline
Senior Member

Posts: 305
Joined: Sep 2010
Reputation: 0
Post: #7
RE: Nodes problem
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 ?
(This post was last modified: 11-29-2010 11:05 AM by LoneWolf.)
11-29-2010 11:03 AM
Find all posts by this user Quote this message in a reply
Gamemakingdude Offline
Senior Member

Posts: 476
Joined: Nov 2010
Reputation: 9
Post: #8
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 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.

Rep if like me or im helpful or you love my stories!
Stephanos house
11-29-2010 10:06 PM
Find all posts by this user Quote this message in a reply
LoneWolf Offline
Senior Member

Posts: 305
Joined: Sep 2010
Reputation: 0
Post: #9
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
Find all posts by this user Quote this message in a reply
Gamemakingdude Offline
Senior Member

Posts: 476
Joined: Nov 2010
Reputation: 9
Post: #10
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.

Rep if like me or im helpful or you love my stories!
Stephanos house
(This post was last modified: 11-29-2010 11:05 PM by Gamemakingdude.)
11-29-2010 10:58 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)