Hint nodes: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
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 [[HINTs|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 give AI contextual pointers that it would not be able to work out on it’s own. They are not to be confused with [[Hints|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.
Hints are only semi-scripted. You cannot tell a NPC to use a hint (with the exception of [[Actbusy|actbusy routines]]). They are information, not orders, and are handled by a NPC's AI code.


==Hint Entities==
==Hint Entities==
Line 7: Line 7:


===info_hint===
===info_hint===
Recognised by both air and land NPCs. Cannot use all Hint Types.
A hint that does not add to any navigation grids. Some hint types (such as '''Act Busy''') cannot be used with this entity.
 
----
===info_node_hint===
===info_node_hint===
The basic hint type. Used by ground-based NPCs.
A hint that is also an [[info_node]]. Ground NPCs only. Full range of hint types.
 
----
===info_node_air_hint===
===info_node_air_hint===
Identical to info_node_hint but used for airborne NPCs.
Identical to '''info_node_hint''' but used for airborne NPCs.  
 
* Special Property: NodeHeight, unknown and possibly obsolete.


* '''Special Property: NodeHeight''', unknown and possibly obsolete.
----
===ai_changehintgroup===
===ai_changehintgroup===
Changes or adds a specific hint group to an NPC or hint.
Changes or adds a specific hint group to a NPC or hint.


==Properties==
==Properties==
Line 29: Line 29:


===Node FOV===
===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.
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===
===Hint Group===
Line 35: Line 35:


===Minimum/Maximum State===
===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.
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.


==Hint Types==
==Hint Types==
 
When you place a hint its type is the most important setting, defining what it is hinting at. Hints are handled by a NPC’s AI, so not all work with every character type.
When you place a hint its type is the most important setting, defining what it is hinting at.


===World: Window===
===World: Window===
A window that can be looked out of to find or engage other NPCs.
A window that can be looked out of to find and/or engage other NPCs.


===World: Act Bust Hint===
===World: Act Busy Hint===
If you aren’t doing anything useful, perform an interesting action here.
Used in an [[Actbusy|actbusy routine]] or [[Actbusy_Queues|queue]].
Note: This is actually supposed to be used in an AI_GOAL_ACTBUSY and AI_GOAL_ACTBUSY_QUEUE system. It defines points in space that an npc in the system will actbusy. You must define the action they perform at each section. To see examples of this you can use VMex on the second trainstation map. The outside section of that map shows how it works.


===World: Visually Interesting===
===World: Visually Interesting===
Line 67: Line 65:


===Entrance / Exit Pinch===
===Entrance / Exit Pinch===
Place at bottlenecks like doorways to aid navigation.
Place in tight areas such as doorways to aid navigation.


===Enemy Disadvantage Point===
===Enemy Disadvantage Point===
Line 76: Line 74:


===Antlion: Burrow Point===
===Antlion: Burrow Point===
Antlions will burrow out from this point. See [[npc_antlion]]
Antlions will burrow out from this point. See [[npc_antlion]].


===Antlion: Thumper Flee Point===
===Antlion: Thumper Flee Point===
When fleeing from a thumper, head to this position? See [[npc_antlion]]
When fleeing from a thumper, head to this position? See [[npc_antlion]].


===Headcrab: Burrow Point===
===Headcrab: Burrow Point===
Headcrabs will burrow out from this point. See [[npc_headcrab]]
Headcrabs will burrow out from this point. See [[npc_headcrab]].


===Roller: Patrol Point===
===Roller: Patrol Point===
Line 91: Line 89:


===Crow: Fly to point===
===Crow: Fly to point===
See [[npc_crow]]
See [[npc_crow]].


===Crow: Perch point===
===Crow: Perch point===
See [[npc_crow]]
See [[npc_crow]].


===Follower: Wait point===
===Follower: Wait point===
Wait here for the player to catch up if you are guiding him?
Wait here for the player to catch up if you are guiding him.


===Override jump permission===
===Override jump permission===
Line 106: Line 104:


===NPC exit point===
===NPC exit point===
Used in AI_GOAL_ACTBUSY and AI_GOAL_ACTBUSY_QUEUE to define where npc's that leave the queue or need to leave because they have been requested to leave by the actbusy system. They will find the closest exit point and go to it to be sent away.
NPCs using this hint will vanish.
 
===Strider node===
===Strider node===
Fire cannon here? See [[npc_strider]]
Fire cannon here? See [[npc_strider]].


===HL1 World: Machinery===
===HL1 World: Machinery===
Line 123: Line 122:


==Limitations and Bugs==
==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.
* 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.
* Sometimes AI will not use a hint when it might make sense to.


==Example==
==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.
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.



Revision as of 02:45, 4 July 2005

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 a NPC to use a hint (with the exception of actbusy routines). They are information, not orders, and are handled by a 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

A hint that does not add to any navigation grids. Some hint types (such as Act Busy) cannot be used with this entity.


info_node_hint

A hint that is also an info_node. Ground NPCs only. Full range of hint types.


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

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.

Hint Types

When you place a hint its type is the most important setting, defining what it is hinting at. Hints are handled by a NPC’s AI, so not all work with every character type.

World: Window

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

World: Act Busy Hint

Used in an actbusy routine or queue.

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 in tight areas such as 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

NPCs using this hint will vanish.

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

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)