Hint nodes

From Valve Developer Community
Jump to navigation Jump to search

Hints give AI contextual pointers that it would not be able to work out on it’s own. They are not to be confused with compiler hints, which are used to control visibility in a map. They are point entities positioned in Hammer and interpreted by the AI when a map loads.

Hints are only semi-scripted. You cannot tell an NPC to use a hint. They are information, not orders, and are handled by an NPC's AI code.

Hint Entities

There are three entities in the hint family covering different NPC types, plus a related entity to change the hint group of a hint or NPC.

info_hint

Obsolete? They do not seem to be recognised by NPCs.

info_node_hint

The basic hint type. Used by ground-based NPCs.

info_node_air_hint

Identical to info_node_hint but used for airborne NPCs.

  • Special Property: NodeHeight, unknown and possibly obsolete.

ai_changehintgroup

Changes or adds a specific hint group to an NPC or hint.

Properties

Hint

See Hint Types, below.

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

NPCs can only see this hint if they are facing in this direction in relation to the hint's pitch yaw and roll.

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).

Minimum/Maximum State

An 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.

Hint Types

When you place a hint its type is the most important setting, defining what it is hinting at.

World: Window

A window that can be looked out of to find or engage other NPCs.

World: Act Bust Hint

If you aren’t doing anything useful, perform an interesting action here.

World: Visually Interesting

This hint marks an interesting area: pay attention to it.

World: Visually Interesting (Don't aim at)

Same as above, but only the head will turn.

World: Inhibit Combine Mines within 15 feet

Unknown. Could stop mines from setting themselves, or from triggering, or both.

Crouch Cover Medium

This hint gives you cover while crouching.

Crouch Cover Low

This hint gives you some cover while crouching.

Waste Scanner Spawn

An automated scanner factory.

Entrance / Exit Pinch

Place at bottlenecks like doorways to aid navigation.

Enemy Disadvantage Point

A weak spot in your opponent's position. NPCs will try to get here to attack hostiles.

Health Kit

Marks a health kit. Seems obsolete – NPCs don't need it.

Antlion: Burrow Point

Antlions will burrow out from this point. See npc_antlion

Antlion: Thumper Flee Point

When fleeing from a thumper, head to this position? See npc_antlion

Headcrab: Burrow Point

Headcrabs will burrow out from this point. See npc_headcrab

Roller: Patrol Point

Obsolete?

Roller: Cleanup Spot

Obsolete?

Crow: Fly to point

See npc_crow

Crow: Perch point

See npc_crow

Follower: Wait point

Wait here for the player to catch up if you are guiding him?

Override jump permission

It is safe to jump from this spot.

Player squad transition point

Unknown.

NPC exit point

Unknown.

Strider node

Fire cannon here? See npc_strider

HL1 World: Machinery

HL: Source

HL1 World: Blinking Light

HL: Source

HL1 World: Human Blood

HL: Source

HL1 World: Alien Blood

HL: Source

Limitations and Bugs

  • A hint can only be of one type, and only one hint can be used by an 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.

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.

Example (VMF)