--------------------------------------------------------
Available node commands and their function:
--------------------------------------------------------
"node_add" <- adds a node where you are currently standing.
Parameters (in the order they are taken - all are number values):
======
"flags"
default value: 0
tells the game what type of node this is. Valid node values and their type:
0 = Normal. Nothing special here, just a normal path node.
4 = Flag. A Capture Point or Spawn Flag is nearby. NOTE: if a flag is at all within the radius of this node, be sure to set the node's flag to this value!! It has to be inside the radius of the node for this to be set.
16 = Jump. This tells the bot a dangerous jump is up ahead. Use for steep drops (ex: jumping off the top of the base in BEACH, onto the trenches below, so they don't risk their health stupidly)
32 = Leap. This needs another leap node for the bot to target. This makes the bot aware of gaps in its path, and allows it to try to get over them safely and cheaply code-wise.
======
"radius"
default value: 70
how big an area this node takes up. A large radius is good for more open open areas. It makes the bots paths look more natural. If you need the bot to be more precise about where it walks, make it smaller (NEVER make it less than 10!!!).
======
"entity num"
default value: -1 (no entity)
tells the game what nearby entity (flag, objective, etc), this node is close to. Only used for a few special node types (like the flag one).
======
"team"
default value: 0 (any team can use)
what team is this node available to ATM. A value of "-1" means nobody can use it yet. "1" means just the axis, and "2" means the allies only. This value can be changed in the script system as the game state changes.
======
"group ID"
default value: 0
what group this node belongs to. Used as a nifty way to group nodes together for turning them on or off in the script system.
As you can see, Fritz's node system is fairly simple. It gets most of its info about the map structure from the environmental awareness system I've created for it. While this is a bit of a drain on the CPU, it allows Fritz to be very flexible and make intelligent decisions about its movement, and makes your job easier!
The max # of nodes ATM is 1024.
NOTE: you dont have to specify all of the parameters when you add a node. You can just bind a key to "node_add", and then set the specific parameters later using the cmds listed below (if you wish).
------------------------------------------------------------------------------------------------
Other node cmds:
======
"node_save" <- saves EVERYTHING path related into a .nav file based on the map's name (i.e. mp_beach is saved into mp_beach.nav).
======
"node_connect" <- Accepts 2 values: the node your creating a connection from, to the node your connecting it to. Its a one way connection.
ex:
node_connect 34 55 <-creates a one way path from 34 to 55
node_connect 55 34 <- creates a (now) two way path from 55 to 34
If you want to create a two way path by default between 2 nodes, use "node_autoconnect". It works exactly like node_connect for its parameters.
A node can have a max of 4 connections ATM. This is to keep the search space for paths down. I have found its often better to use more nodes, than more connections in A*. If it becomes a serious issue, I can up it later.
======
"node_clear" <- deletes ALL nodes on the map! Use this carefully, if you hit node_save right after, you lose any progress you've made!
======
"node_flag" <- changes a nodes "flag" to the value you set.
Ex:
node_flag 5 16 <- sets node 5 flag value to 16 (jump).
Be careful! While it WILL catch if you set a bad node value, it won't catch if you set a bad flag value.
======
"node_group" <- changes a nodes group ID to the value you set.
ex: node_group 5 2 <- changes node 5's group ID to 2
======
"node_move" <- moves the node to your current position
ex:
node_move 5 <- moves node 5 to where your standing ATM.
======
node_ent <- sets the nodes entity number
if node 67 is close to a spawn flag, set its entity number to the entity number of the flag (use the "viewent" command to get the name and entity number of an entity. Just point to an entity, and use "viewent" it will show everything you need - bind it to a key!).
ex:
node_ent 67 117 <- node 67's entity number is now 117 (a close by flag).
======
node_radius <- sets a node's radius
ex:
node_radius 67 100
======
node_team <- sets a node's team
ex:
node_team 56 -1 <- no team can use node 56 for pathing
node_team 44 0 <- any team can use 44 for pathing
node_team 34 1 <- only axis can use node 34
node_team 99 2 <- only allies can use node 99
======
node_resetlinks <- resets all of a nodes connections to other nodes
ex:
node_resetlinks 66 <- node 66 now has no outgoing connections to other nodes! Tho other nodes can still connect to 66
======
node_num <- prints closest node to your position