Hint nodes: Difference between revisions
m (→Enable/Disable Hint: clarified) |
m (repair & general clean up) |
||
Line 1: | Line 1: | ||
{{note|Do not confuse Hint nodes with [[Hint brush]]es, which are used to control visibility in a map.}} | |||
Hints are only semi-scripted. You cannot | '''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|actbusy routines]]). Hints are only suggestions, to be weighed by an NPC's AI code during gameplay. | ||
==Hint Entities== | ==Hint Entities== | ||
There are | There are only four point-based classes of entity that provide hints to NPCs. | ||
* '''[[info_hint]]''' | * '''[[info_hint]]''' | ||
Line 14: | Line 14: | ||
* '''[[info_node_air_hint]]''' | * '''[[info_node_air_hint]]''' | ||
: A [[Nodegraph]] and [[Hint System]] entity, but used only by [[ | : A [[Nodegraph]] and [[Hint System]] entity, but used only by [[Flying NPCs]]. | ||
* '''[[info_node_climb]]''' | * '''[[info_node_climb]]''' | ||
: A [[Nodegraph]] and [[Hint System]] entity, but used only by [[ | : A [[Nodegraph]] and [[Hint System]] entity, but used only by [[Climbing NPCs]]. | ||
Each instance of a hint node must be positioned in exactly the right location on the map - dumb hint node placement will lead to dumb NPC behaviour. (As always, there's an exception and in this case it's '''ground nodes''' : if you position an info_node_hint in space above ground level it will always 'fall' to ground level. By contrast, info_node_air_hint, info_hint, etc will maintain their position in space.) | |||
: | |||
Each hint node can only suggest one hint, as an NPC can only use one hint at a time. Thus you may need to position an "enemy disadvantage hint" very close to a "crouch cover". | |||
==Hint | '''[[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. | ||
==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. | |||
{| cellpadding=2 | {| cellpadding=2 | ||
!align=left| | !align=left| Hint | ||
!align=left| # | !align=left| # | ||
!align=left| Notes | !align=left| Notes | ||
Line 34: | Line 41: | ||
!align=left| Conditions | !align=left| Conditions | ||
!align=left| NPCs | !align=left| NPCs | ||
!align=left| | !align=left| Use with | ||
|- valign="top" valign="top" | |||
| '''None''' | |||
| 0 | |||
| By default, no hint is provided. This allows you to use an ''info_node_hint'' as an ''info_node'', or an ''info_node_air_hint'' instead of ''info_node_air''. Arguably it makes the basic info_node entities redundant. Obviously an ''info_hint'' without a hint is rather pointless. | |||
| <code></code> | |||
| None | |||
| All | |||
| info_node_hint | |||
info_node_air_hint | |||
|- valign="top" valign="top" | |- valign="top" valign="top" | ||
| '''World: Window''' | | '''World: Window''' | ||
Line 199: | Line 215: | ||
|} | |} | ||
===Hint Activity=== | ===Hint Activity=== | ||
Line 225: | Line 237: | ||
=== Enable/Disable Hint === | === Enable/Disable Hint === | ||
Hint Nodes can accept both '''EnableHint''' and '''DisableHint''' inputs via the [[Inputs and Outputs]] system. | Hint Nodes can accept both '''EnableHint''' and '''DisableHint''' inputs via the [[Inputs and Outputs]] system. | ||
This enables/disables only the hint type function of the hint node, not the [[nodegraph]] function. | This enables/disables only the hint type function of the hint node, not the [[nodegraph]] function (use[[info_node_link_controller]] to dynamically enable/disable areas of the nodegraph). | ||
==Limitations and Bugs== | ==Limitations and Bugs== |
Revision as of 20:11, 2 March 2008

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 the hybrid hint nodes, info_hint does not get included in the nodegraph, so NPCs will not be able to navigate to it. Therefore if you set an info_hint to 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 'remote target' hint types such as "World: Visually Interesting". Otherwise use info_node_hint instead.
- A Nodegraph and Hint System entity, combining all 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.
- A Nodegraph and Hint System entity, but used only by Flying NPCs.
- A Nodegraph and Hint System entity, but used only by Climbing NPCs.
Each instance of a hint node must be positioned in exactly the right location on the map - dumb hint node placement will lead to dumb NPC behaviour. (As always, there's an exception and in this case it's ground nodes : if you position an info_node_hint in space above ground level it will always 'fall' to ground level. By contrast, info_node_air_hint, info_hint, etc will maintain their position in space.)
Each hint node can only suggest one hint, as an NPC can only use one hint at a time. Thus you may need to position an "enemy disadvantage hint" very close to a "crouch cover".
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.
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 | Use with |
---|---|---|---|---|---|---|
None | 0 | By default, no hint is provided. This allows you to use an info_node_hint as an info_node, or an info_node_air_hint instead of info_node_air. Arguably it makes the basic info_node entities redundant. Obviously an info_hint without a hint is rather pointless. |
|
None | All | info_node_hint
info_node_air_hint |
World: Window | 2 | A window that can be looked through. Most NPCs do not need this. | HINT_WORLD_WINDOW
|
npc_cscanner, npc_spotlight | 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
|
|
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
|
See above | 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
|
|
combine_mine | info_hint |
Crouch Cover Medium | 100 | Tells a NPC that it can cover itself by crouching at this position. Cover itself is acquired automatically: this hint merely helps the AI efficiently determine how high said cover goes. Should provide 100 vertical units or more of cover. | HINT_TACTICAL_COVER_MED
|
|
npc_citizen, npc_combine_s, npc_metropolice | info_node_hint |
Crouch Cover Low | 101 | Same as above, but tells the NPC to crouch lower. | HINT_TACTICAL_COVER_LOW
|
See above | See above | info_node_hint |
Entrance / Exit Pinch | 103 | A node representing a small area through which NPCs should file one at a time, such as a doorway. | HINT_TACTICAL_PINCH
|
Hint must be between the NPC and its destination node. | All? | info_node_hint |
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! | HINT_TACTICAL_ENEMY_DISADVANTAGED
|
Unknown | Unknown | 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
|
|
npc_antlion | info_node_hint |
Headcrab: Burrow Point | 450 | Headcrabs will burrow in from this point. To have them burrow out, use spawnflags. | HINT_HEADCRAB_BURROW_POINT
|
|
npc_headcrab | info_node_hint |
Crow: Fly to point | 700 | Crows will fly towards this point when spawning, unless a perch point is nearer. | HINT_CROW_FLYTO_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. | HINT_FOLLOW_WAIT_POINT
|
|
See ai_goal_lead | info_node_hint |
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. | HINT_JUMP_OVERRIDE
|
|
All land-based | info_node_hint |
Player squad transition point | 902 | A 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_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_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 |
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).
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
Hint Nodes can accept both EnableHint and DisableHint inputs via the Inputs and Outputs system. This enables/disables only the hint type function of the hint node, not the nodegraph function (useinfo_node_link_controller to dynamically enable/disable areas of the nodegraph).
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.