CNodeEnt
Jump to navigation
Jump to search
Code classes:
CNodeEnt
is a code class in all Source games except . This class is the in-engine representation of each node in the nodegraph, which is used for navigation by CAI_BaseNPC
s. Once the entity spawns ingame, it adds necessary data to its position then deletes itself, or turns into an ai_hint
if Hint is not None.
info_hint
- A hint that is not used for navigation. They don't go into the nodegraph, nor do they fall to the ground. Use these to provide some spatial context for NPCs, such as "look here if you can't find the player" or "throw rocks at this spot". Turns intoai_hint
.info_node
- Generic navigation node used by ground-based NPCs.info_node_air
- Generic navigation node used by flying NPCs.info_node_air_hint
- A navigation node for flying NPCs that includes some context information for NPCs that are interested in it. The hint might indicate a window that could be looked into, or an item of interest that could be commented on.info_node_climb
- Used bynpc_fastzombie
andCASW_Drone_Advanced
to find things that can be climbed.info_node_hint
- A navigation node for ground-based NPCs that includes some context information for NPCs that are interested in it.
Make sure nodes do not fall through the ground upon spawning. Nodes on displacements should be placed a few units above the surface. Air nodes do not fall.
The Pitch Yaw Roll (angles)
of a node may affect NPC behavior when using it.
Note: If a keyvalue is not listed in Hammer for the specific entity you're using, it probably does not work with that one.
Flags[edit | edit source]
- 1: Force human permission - Allows NPCs with HULL_HUMAN to use this node, even if the engine doesn't think it's physically possible.
- 2: Force small_centered permission
- 4: Force wide_human permission
- 8: Force tiny permission
- 16: Force wide_short permission
- 32: Force medium permission
- 64: Force tiny_centered permission
- 128: Force large permission
- 256: Force large_centered permission
- 512: Keep editor position - Makes the node not fall to the ground after spawning.
- 65536: Allow jump up - To do: May not actually do anything.
Keyvalues[edit | edit source]
- Hint
(hinttype)
<choices>
- Special properties for this node.
- 0: None (regular navigation node)
- 2: World: Window - Considered a point of interest by scanners
- 12: World: Act Busy Hint - Used by actbusies.
- 13: World: Visually Interesting -
CNPC_PlayerCompanion
s will passively look at this node (while aiming their weapon[Confirm]) if they have nothing better to do. They will also occasionally look at the player, if in view. Note: Behavior not present in . - 14: World: Visually Interesting (Don't aim at) -
CNPC_PlayerCompanion
s will passively look at this node (while not aiming their weapon[Confirm]) if they have nothing better to do. They will also occasionally look at the player, if in view. Note: Behavior not present in . - 15: World: Inhibit Combine Mines within 15 feet - Causes hopper mines within 180 units to consider the area an invalid spot to clamp down at. Bug: Some people have reported that mines will sometimes disobey this node.
- 16: World: Visually Interesting (Stealth mode) -
CNPC_PlayerCompanion
s will passively look at this node (Confirm: while aiming their weapon?) if they have nothing better to do. They will also occasionally look at the player, if in view. Note: Behavior not present in .
- 17: Generic (available in all games since ) - Seems to be part of an unfinished concept. Used by
ai_goal_fightfromcover
for something. - 100: Crouch Cover Medium - Tells NPCs they can take cover here if they can crouch below ~64 units height. NPCs will prioritize cover points by how many nodes they will have to travel through to get to it, and reject ones that will not block their LOS from the enemy.
- 101: Crouch Cover Low - Tells NPCs they can take cover here if they can crouch below ~40 units height. NPCs will prioritize cover points by how many nodes they will have to travel through to get to it, and reject ones that will not block their LOS from the enemy. Bug: Combine soldiers do not fully understand this node and will try to shoot through their own cover.
- 102:
Waste Scanner Spawn- Unused. - 103:
Entrance / Exit Pinch- Unused. - 105:
Enemy Disadvantage Point- Unused. - 106:
Health Kit- Unused. - 107:
Tactical: High Ground(available in all games since ) - Unused. - 400: Antlion: Burrow Point - Antlions will burrow in and out of this point.
- 401: Antlion: Thumper Flee Point - Antlions will go here when agitated by a thumper. If the antlion does not find any flee nodes, it will simply go to the thumper's outer radius.
- 450: Headcrab: Burrow Point - Headcrabs will go to this point and burrow in or out if they're told to, or are too far away from their enemy to leap at them.
- 451: Headcrab: Exit Pod Point - Episodic: Headcrabs will jump here when exiting an
env_headcrabcanister
, if they fail to find any burrow points within 256 units. - 500:
Roller: Patrol Point- Unused. - 501:
Roller: Cleanup Spot- Unused. - 700: Crow: Fly to point - Birds may fly to this spot if provoked to. One must be within 4500 units of a
prop_vehicle_jeep
in order to make seagulls spawn on said jeep. - 701:
Crow: Perch point- Does not exist. - 900: Follower: Wait point - NPCs under the effects of an
ai_goal_follow
will try to move here while they follow, if they can remain close to the leader and are not in combat. - 901: Override jump permission - NPCs will jump from this node to another of the same type if the jump is within their capabilities. Maximum vertical and horizontal distances are 1024.
- 902: Player squad transition point - When the player enters a
trigger_changelevel
while aCNPC_PlayerCompanion
is not inside the associatedtrigger_transition
, and they're capable of navigating to the player, it will teleport to this node (which should be inside the trigger) so that they are not lost on the previous level. If the NPC is not capable of navigating to the player but it's one which has to transition (told to via input or keyvalue), it will still force a teleport. - 903: NPC exit point - Used by actbusies. NPCs will exit the routine by going here.
- 904: Strider node - Used by striders for navigation. Confirm: Also has some effect on the cannon positioning?
- 950: Player Ally: Push away destination - Ally NPCs will prefer to move here when trying to get out of the player's way (unless this spot is already taken).
- 951: Player Ally: Fear withdrawal destination - If an NPC finds another
CBaseCombatCharacter
that it fears, it will hide at this spot. - 1000:
HL1 World: Machinery- (only available in Half-Life: Source) - 1001:
HL1 World: Blinking Light- (only available in Half-Life: Source) - 1002:
HL1 World: Human Blood- (only available in Half-Life: Source) - 1003:
HL1 World: Alien Blood- (only available in Half-Life: Source) - 1200:
Ep3 Blob Shake Position(available in all games since ) - Does not exist. - 1201:
Ep3 Blob Fire Cover Position(available in all games since ) - Does not exist. - 1202:
Ep3 Blob Brain Cover Position(available in all games since ) - Does not exist. - 1203:
Ep3 Blob Brain Regenerate Position(available in all games since ) - Does not exist. - 1204:
Ep3 Blob Spit Position(available in all games since ) - Does not exist. - 1205:
Ep3 Blob Spawn Regenerator Position(available in all games since ) - Does not exist. - 1300:
Aperture: Nest(available in all games since ) - Does not exist.
- Hint Group
(Group)
<string>
- If specified, gives the hint a specific group name. Useful for hint nodes that need to be logically grouped together. NPCs may also refuse to use hint nodes that don't match their hint group.
- Start Hint Disabled
(StartHintDisabled)
<boolean>
- Makes the hint disabled after spawning. NPCs will ignore it.
- Hint Activity
(hintactivity)
<string>
- "Activity associated with this hint node. Various parts of the NPC AI play this activity at times. i.e. Actbusy nodes will play this activity when an NPC acts busy on the node." To do: More info. Where to find a list of activities?
- Target node
(TargetNode)
<node_dest>
- The node ID of an associated target node, if any. To do: Purpose?
- Ignore Facing
(IgnoreFacing)
<choices>
- Tells NPCs to ignore the angles of the node. (Typically this is so that the NPC can face any direction while standing on the node.) May not apply to all hint types.
- 0: No
- 1: Yes
- 2: Default
- Minimum State
(MinimumState)
<choices>
- NPCs must have a readiness level of this much to be able to use the node.
- Maximum State
(MaximumState)
<choices>
- NPCs must have a readiness level under this to use the node.
- Node FOV
(nodeFOV)
<float>
- In order for an NPC to use this node, the NPC must be within the node's FOV (which is centered on the Pitch Yaw Roll
(angles)
). Any number may be entered. 360 means any angle is acceptable. NodeHeight(nodeheight)
<integer>
- Does not exist in code.
- Generic Hint
(generictype)
<string>
(available in all games since ) - "String identifying what the hint type is, if generic." Seems to be part of an unfinished concept.
- Radius
(radius)
<integer>
(available in all games since ) - How close an NPC must be to this node to acknowledge it in any way. 0 = infinite.
Inputs and Outputs[edit | edit source]
See ai_hint
for I/O.