From Valve Developer Community
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.
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.
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
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 window that can be looked through. Most NPCs do not need this.|| ||npc_cscanner, npc_spotlight||info_hint|
|World: Act Busy Hint||12||Used in an actbusy routine or queue.|| ||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.|| ||
|World: Visually Interesting (Don't aim at)||14||Same as above, but only the head and eyes are affected.|| ||
|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.|| ||
|World: Visually Interesting (Stealth mode)||16||To do: notes|| ||To do: conditions||To do: npcs affected||info_hint|
|Crouch Cover Medium||100||Tells an NPC it can find cover at this position if it crouches. Cover itself is acquired automatically; this hint merely helps the AI determine the height of cover. Crouch Cover Medium should provide at least 100 vertical units of cover.|| ||
||npc_citizen, npc_combine_s, npc_metropolice||info_node_hint|
|Crouch Cover Low||101||Tells an NPC it can find cover at this position if it crouches low (lower than Crouch Cover Medium). Cover itself is acquired automatically; this hint merely helps the AI determine the height of cover. Crouch Cover Low should provide at least To do: ? vertical units of cover.|| ||
||npc_citizen, npc_combine_s, npc_metropolice||info_node_hint|
|Waste Scanner Spawn||102||To do: notes|| ||To do: conditions||To do: npcs affected||To do: used with entity|
|Entrance / Exit Pinch||103||A node representing a small area through which NPCs should file one at a time, such as a doorway.|| ||Hint must be between the NPC and its destination node.||All?||info_node_hint|
|Guard Point||104||To do: notes|| ||To do: conditions||To do: npcs affected||To do: used with entity|
|Enemy Disadvantage Point||105||A weak spot in your opponent's position. NPCs will try to get here to attack hostiles. Remember to use hint groups on points that are only disadvantageous to one side!|| ||Unknown||Unknown||info_node_hint|
|Health Kit||106||To do: notes|| ||To do: conditions||To do: npcs affected||To do: used with entity|
|Antlion: Burrow Point||400||Antlions will burrow in or out out of the ground at this 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.|| ||
|Headcrab: Burrow Point||450||Headcrabs will burrow in from this point. To have them burrow out, use spawnflags.|| ||
|Headcrab: Exit Pod Point||451||To do: notes|| ||To do: conditions||To do: npcs affected||To do: used with entity|
|Roller: Patrol Point||500||To do: notes|| ||To do: conditions||To do: npcs affected||To do: used with entity|
|Roller: Cleanup Spot||501||To do: notes|| ||To do: conditions||To do: npcs affected||To do: used with entity|
|Crow: Fly to point||700||Crows will fly towards this point when spawning, unless a perch point is nearer.|| ||npc_crow npc_pigeon||info_node_air_hint|
|Crow: Perch point||701||Crows will perch on this point.|| ||npc_crow||info_node_air_hint|
|Follower: Wait point||900||NPCs under an ai_goal_lead will wait here for the player to catch up before continuing.|| ||
|Override jump permission||901||NPCs will jump from a hint of this type to another of this type, if doing so will not hurt them.|| ||
|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.|| ||
|NPC exit point||903||Part of an actbusy routine. NPCs will use this node to leave an area.|| ||
|Strider node||904||Used by Striders to navigate and target their cannon weapons.|| ||npc_strider||info_node_hint|
|Player Ally: Push away destination||950||To do: notes|| ||To do: conditions||To do: npcs affected||To do: used with entity|
|Player Ally: Fear withdrawal destination||951||To do: notes|| ||To do: conditions||To do: npcs affected||To do: used with entity|
|HL1 World: Machinery||1000||Legacy support. Used in HL1 for monster_houndeye to show curious animations at this node when IDLE.|| ||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.|| ||The NPC is not hostile.||monster_houndeye||info_node|
|HL1 World: Human Blood||1002||To do: notes|| ||To do: conditions||To do: npcs affected||To do: used with entity|
|HL1 World: Alien Blood||1003||To do: notes|| ||To do: conditions||To do: npcs affected||To do: used with entity|
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.
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.
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.
The node ID of an associated target node, if any.
Don't pay attention to the facing of the node. May not apply to a given hint type.
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.
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.
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.