Hint nodes

From Valve Developer Community
(Redirected from Hint group)
Jump to navigation Jump to search
English (en)Translate (Translate)
Not to be confused with Hint brushes.

Hints give specific information about their location to help NPCs decide how to react to, or make best use of, that specific locus. Hints are only semi-scripted. You cannot force an NPC to use a hint (with the exception of actbusy routines). Hints are only suggestions, to be weighed by an NPC's AI code during gameplay.

Hint Entities

There are only four point-based classes of entity that provide hints to NPCs.

Unlike navigation nodes, info_hint does not get included in the nodegraph, so NPCs will not be able to navigate to it. Therefore if you set up an info_hint with a hint type that tells the NPC to do something when they arrive at that locus (eg "Crouch Cover Low"), it will never get used but may well confuse an NPC who Thinks about using it. Only use info_hint for AI Visually Interesting hint types. Otherwise use info_node_hint instead.
is both a navigation node and a hint node, combining most the features of both info_hint and info_node. It is a ground node, used by all NPCs that walk or crawl upon the earth.
is both a navigation node and a hint node, but used only by Flying NPCs.
is both a navigation node and a hint node, but used only by Climbing NPCs.
PlacementTip.gifPlacement Tip:Each instance of a hint node must be positioned in exactly the right location on the map - bad hint node placement will lead to dumb NPC behaviour. Each hint node can only suggest one hint, as each NPC can only use one hint at a time. Thus, sometimes you may need to position a variety of hint nodes very close to each other.
PlacementTip.gifPlacement Tip:Ground nodes (such as info_node_hint) fall to the ground when they spawn, so you can place them up to 128 units above any solid world geometry, which excludes func_brush, and they will still work. When placing ground nodes on displacements, place them slightly above the terrain to ensure nodegraph connections are properly made. By contrast, info_hint and info_node_air_hint entities will not move from their original placement positions.

ai_changehintgroup also deserves an honourable mention: it is an event-logic entity that can be used to change the hint group of hint nodes and NPCs. It does not actually provide hints itself.

logic_navigation may also come in handy for specifying Entities which NPCs can just push out of the way (moveable phys props) or bump into (think zombies!) rather than navigating around them.

There are also a number of specialised hint entities designed to help optimise interaction of specific NPCs with the map, for example info_apc_missile_hint, npc_heli_avoidbox, npc_heli_avoidsphere, npc_heli_nobomb. Whilst similar in effect, these entities do not use the AI hint system that this article is about.

Hint Entity Properties

Hint

The most important property of a hint node is its hint type, which defines what information is being given to the NPC.

Please note that some NPC classes have special AI features, so not all hints will work with every NPC type.

Hint # Notes Codename Conditions NPCs affected Use with
None 0 By default, no hint is provided. None All All
World: Window 2 A scanner will consider inspecting whatever solid surface this hint is pointing at when idle.
PlacementTip.gifPlacement Tip:Consider facing this toward a brush with a window texture.
HINT_WORLD_WINDOW hint is visible npc_cscanner, npc_spotlight, npc_clawscanner info_hint
World: Act Busy Hint 12 Used in an actbusy routine or queue. HINT_WORLD_WORK_POSITION npc_citizen info_node_hint
World: Visually Interesting 13 Used to mark interesting areas that the AI would not recognise on its own. A NPC will consider aiming at this node when they next choose a new target. Depending on the call the hint is found during the NPC’s state and ability to aim may affect their decision and the node may be locked for five seconds to prevent multiple NPCs staring at it in unison. If they cannot aim they will look at the target instead. HINT_WORLD_VISUALLY_INTERESTING
  • There are no hostiles in the area
  • The hint is in the NPC's view cone
  • The hint is in the NPC's range
  • The hint is not too close
All info_hint
World: Visually Interesting (Don't aim at) 14 Same as above, but only the head and eyes are affected. HINT_WORLD_VISUALLY_INTERESTING_DONT_AIM
  • There are no hostiles in the area
  • The hint is in the NPC's view cone
  • The hint is in the NPC's range
  • The hint is not too close
All info_hint
World: Inhibit Combine Mines within 15 feet 15 Inhibits, but does not prevent, Combine mines from clamping into the ground within a 180 unit sphere around the hint. They will instead continue to bounce themselves until they are out of the hint's influence. This hint will not always have an effect. It is ultimately up to the mine if it wants to clamp or not. HINT_WORLD_INHIBIT_COMBINE_MINES
  • The NPC is within 180 units of the hint origin
combine_mine info_hint
World: Visually Interesting (Stealth mode) 16 Causes Alyx to go into stealth "readiness". This does not affect ai. She will constantly look at this point and use a slightly different posture. Causes animation glitches in combat. HINT_WORLD_VISUALLY_INTERESTING_STEALTH hint is visible npc_alyx info_hint
Crouch Cover Medium 100 Is calculated like normal cover (at about 64 units height), except an NPC will use ACT_COVER_LOW_RELOAD and ACT_COVER_MED when taking cover here. Due to coding issues, this only works with combine soldiers.
PlacementTip.gifPlacement Tip:Useful for oddly shaped cover, such as low rocks or narrow pillars.
HINT_TACTICAL_COVER_MED
  • Hint is not visible to NPC's Threat
npc_combine_s, npc_metropolice (only in Mapbase) info_node_hint
Crouch Cover Low 101 Tells an NPC it can find cover at this position if it crouches low (calculated at 40 units height). Can cause animation issues with npcs other than combine soldiers; they will tend to duck down and than immediately stand up. ai_goal_standoff can fix this.
PlacementTip.gifPlacement Tip: This type of cover can be broken easily, which can cause ai issues. Use with caution.
HINT_TACTICAL_COVER_LOW
  • Hint is not visible to NPC's Threat.
npc_citizen, npc_combine_s, npc_metropolice info_node_hint
Waste Scanner Spawn 102
Todo: notes
Todo: codename
Todo: conditions
Todo: npcs affected
Todo: used with entity
Entrance / Exit Pinch 103 Obsolete. Remnant of a cut Antlion Guard behavior. HINT_TACTICAL_PINCH npc_antlionguard info_node_hint
Guard Point 104 Referenced as Obsolete/Unused in code. HINT_NOT_USED_TACTICAL_GUARD
Todo: conditions
Todo: npcs affected
Todo: used with entity
Enemy Disadvantage Point 105 Obsolete. Meant to be used by the cut npc_assassin HINT_TACTICAL_ENEMY_DISADVANTAGED Unknown npc_assassin info_node_hint
Health Kit 106 Obsolete. Was an unfinished functionality of npc_citizen. HINT_HEALTH_KIT npc_citizen info_node_hint
Antlion: Burrow Point 400 Antlions will burrow in or out out of the ground at this point. HINT_ANTLION_BURROW_POINT npc_antlion info_hint
Antlion: Thumper Flee Point 401 Antlions will use this hint to flee towards when they are forced back by a thumper. It is not required, but is useful to control precise Antlion movements. HINT_ANTLION_THUMPER_FLEE_POINT
  • The Antlion must be fleeing from a thumper
npc_antlion info_node_hint
Headcrab: Burrow Point 450 Headcrabs will burrow into this point if they can't attack. They behave slightly different when spawned from canisters. HINT_HEADCRAB_BURROW_POINT
  • The Headcrab must not be within leap range of a hostile
npc_headcrab info_node_hint
Headcrab: Exit Pod Point 451
Todo: notes
HINT_HEADCRAB_EXIT_POD_POINT
Todo: conditions
Todo: npcs affected
Todo: used with entity
Roller: Patrol Point 500 Referenced as Obsolete/Unused in code. HINT_NOT_USED_ROLLER_PATROL_POINT
Todo: conditions
Todo: npcs affected
Todo: used with entity
Roller: Cleanup Spot 501 Referenced as Obsolete/Unused in code. HINT_NOT_USED_ROLLER_CLEANUP_POINT
Todo: conditions
Todo: npcs affected
Todo: used with entity
Crow: Fly to point 700 Crows will fly to this point when they detect an enemy or hear combat sounds.
Icon-Bug.pngBug: Crows tend to "stick" to the node they pick.  [todo tested in?]
HINT_CROW_FLYTO_POINT npcs will pick the closest node npc_crow npc_pigeon info_node_air_hint, info_node_hint
Crow: Perch point 701 Obsolete, may have been used at one point, no longer functions. HINT_CROW_PERCH_POINT npc_crow info_node_air_hint
Follower: Wait point 900 NPCs under an ai_goal_follow will try to stand here if not in combat and near the leader. HINT_FOLLOW_WAIT_POINT
  • NPC must be using an ai_goal_follow
  • The distance NPCs will look for these depends on ai_goal_follow formations
  • This can use the Hint Activity
See ai_goal_follow info_node_hint
Override jump permission 901 NPCs will jump from a hint of this type to another of this type, if it's within their jump parameters. HINT_JUMP_OVERRIDE
  • Check AI Metrics for jump parameter information
  • Destination hint must be available
All land-based info_node_hint
Player squad transition point 902 An NPC will teleport to one of these hints when its outsidetransition input is triggered. Locked for half a second after each use to prevent NPCs spawning inside each other. HINT_PLAYER_SQUAD_TRANSITON_POINT
  • NPC is in a single-player game
  • NPC is a player companion
  • NPC is not marked as vital
npc_citizen info_node_hint
NPC exit point 903 Part of an actbusy routine. NPCs will use this node to leave an area. HINT_NPC_EXIT_POINT
  • NPC must be part of an actbusy routine
npc_citizen info_node_hint
Strider node 904 Used by Striders to navigate and target their cannon weapons. HINT_STRIDER_NODE npc_strider info_node_hint
Player Ally: Push away destination 950 Player allies will prefer these points when moving out of the player's way. Having multiple allies with multiple nodes will cause them to pick different points. HINT_PLAYER_ALLY_MOVE_AWAY_DEST Node must not be within 28 units, but not as far as 600 units. npc_citizen, npc_alyx, npc_barney info_node_hint
HL1 World: Machinery 1000 Legacy support. Used in HL1 for monster_houndeye to show curious animations at this node when IDLE. HINT_WORLD_MACHINERY The NPC is not hostile. monster_houndeye info_node
HL1 World: Blinking Light 1001 Legacy support. Used in HL1 for monster_houndeye to show curious animations at this node when IDLE. HINT_WORLD_BLINKING_LIGHT The NPC is not hostile. monster_houndeye info_node
HL1 World: Human Blood 1002
Todo: notes
HINT_HL1_WORLD_HUMAN_BLOOD
Todo: conditions
Todo: npcs affected
Todo: used with entity
HL1 World: Alien Blood 1003
Todo: notes
HINT_HL1_WORLD_ALIEN_BLOOD
Todo: conditions
Todo: npcs affected
Todo: used with entity
CS Hostage: Escape Point 1100
Todo: notes
HINT_CSTRIKE_HOSTAGE_ESCAPE
Todo: conditions
Todo: npcs affected
info_node_hint

Hint Activity

The activity to perform at this hint if the AI does not specify one. This might be looking around, patrolling, playing an animation, or anything.

Node FOV

Imagine this node requires that an NPC be in the node's field of view in order to use this hint. NPCs can only see this hint if they are facing in this direction in relation to the hint's pitch yaw and roll. Not always applicable.

Hint Group

NPCs can filter hints to only those that match their hint groups. Useful when there are multiple NPCs in an area who should not use the same hints (for instance, two squads of fighting NPCs will only want to use hints on their side of any cover).

  • An NPC's hintgroup keyvalue is used to restrict the NPC's hint-node searching to a subset of the map's hint nodes. Only hint nodes with matching hintgroup names will be considered by the NPC.
  • An NPC's hintlimiting keyvalue limits the NPC to using the specified hintgroup for navigation requests, but does not limit local navigation.
  • Both or either of and NPC's hintgroup name and hintlimiting status can be changed dynamically by an ai_changehintgroup entity.
  • Some NPCs react differently when in a hintgroup; hunters will move around randomly more often and soldiers will take cover against NPCs that lack a range attack.

TargetNode

The node ID of an associated target node, if any.

IgnoreFacing

Don't pay attention to the facing of the node. May not apply to a given hint type.

Minimum/Maximum State

A NPC will only look for hints that are within its state boundaries. An idle NPC will not use hints with a minimum state of alert, for example.

Enable/Disable Hint

Note.pngNote:This enables/disables only the hint type effect of the hint node, not the nodegraph effect (use info_node_link_controller to dynamically enable/disable areas of the nodegraph).

By default the StartHintDisabled keyvalue is set to 0 (No), which means that the hint is active when the game begins. Set this value to 1 (Yes) to disable the hint until it is triggered by another event, via the Inputs and Outputs system. Hint Nodes can accept as many EnableHint and DisableHint inputs as you like.

Limitations and Bugs

  • A hint can only be of one type, and only one hint can be used by a NPC at a time. You cannot have an enemy disadvantage hint that is also crouch cover.
  • Sometimes AI will not use a hint when it might make sense to. This is a part of normal AI behavior.

Example

This example map contains various hints in a combat situation. Each hint's location is marked on the map with a brief description of it. Run the map several times to get a full overview of how hints are used.

Note that there are currently bugs in the map that prevent the AI from carrying out some routines. Enable developer mode to see when they occur.

Download Example (VMF)