CAI_ActBusyGoal
Jump to navigation
Jump to search
Code classes:
CAI_ActBusyGoal
CAI_GoalEntity
(AI goals)CBaseEntity
(all ents)
CAI_ActBusyGoal
is a code class for entities that make NPCs act busy.
Classnames:
ai_goal_actbusy
ConVars/Commands[edit | edit source]
ConVar/Command | Parameters or default value | Parameter Type | Effect |
---|---|---|---|
ai_actbusy_search_time | 10 | Seconds | To do: Effect description. |
ai_debug_actbusy | 0 | 1-5 | Used to debug actbusy behavior. Usage:
|
Keyvalues[edit | edit source]
- Search Range for Busy Hints
(busysearchrange)
<float>
- Maximum distance between an actbusy hint and NPC for the NPC to consider it.
- Visible Busy Hints Only
(visibleonly)
<boolean>
- If set, an NPC will only consider actbusy hints in view when deciding which to use. Once the choice has been made it will not change, even if new hints become visible.
- Actbusy Type
(type)
<choices>
- Is this Actbusy part of combat? For use with Combat Safe Zone.
- 0: Default (non-combat)
- 1: Combat
- Allow actor to teleport?
(allowteleport)
<boolean>
- To do: Description.
- Sight Entity
(seeentity)
<target_destination>
- Optionally, if the Actor playing the ActBusy loses sight of this specified entity for an amount of time defined by Sight Entity Timeout, the specified entity will leave the ActBusy.
- Sight Entity Timeout
(seeentitytimeout)
<float>
- Time in seconds to wait for an Actor to see the Sight Entity again before the entity may leave the ActBusy.
- Sight Enemy Method
(sightmethod)
<choices>
- How to determine if the Actor sees the Sight Entity.
- Combat Safe Zone
(safezone)
<target_destination>
- Specify a brush entity to act as a safe zone if Actbusy Type is set to Combat. If any enemies are in the safe zone, the actbusy will be terminated. To do: Will actors go back to the actbusy once enemies are dead? What if the enemies leave the safe zone but are still alive?
Inputs[edit | edit source]
- ForceNPCToActBusy
<string>
- Format:
<targetname> [hint node targetname] [teleport] [nearest] [$<custom activity or sequence>] [max time]
- Force an NPC to act busy. Mouse over each parameter for more info.
- To do: How is the default time decided?
- ForceThisNPCToActBusy
<string>
- Force a specified NPC to act busy.
- ForceThisNPCToLeave
<string>
- Force an NPC to find an NPC exit point (
HINT_NPC_EXIT_POINT
hint node) and vanish. - SetBusySearchRange
<float>
- Alters the Search Range for Busy Hints keyvalue for all actors.
Outputs[edit | edit source]
- OnNPCStartedBusy
<string>
- Fired when an NPC targeted by this entity starts an ActBusy animation sequence. Automatically puts the targetname of the NPC as the input parameter, unless overridden by the mapper.
- OnNPCFinishedBusy
<string>
- Fired when an NPC targeted by this entity finishes an ActBusy animation sequence. Automatically puts the targetname of the NPC as the input parameter, unless overridden by the mapper.
- OnNPCLeft
<string>
- Fired when an NPC targeted by this goal leaves the actbusy for any reason.[Confirm] Automatically puts the targetname of the NPC as the input parameter, unless overridden by the mapper.
- OnNPCLostSeeEntity
<string>
- Fired when the NPC loses sight of the Sight Entity. Automatically puts the targetname of the NPC as the input parameter, unless overridden by the mapper.
- Note: The FGD doesn't mention this parameter and seems to not acknowledge it, but the functionality is there in code. The parameter might not fire with the default FGD, and if so the
void
type should be changed tostring
. - OnNPCSeeEnemy
<string>
- Fired when this NPC leaves their ActBusy because they saw an enemy. Automatically puts the targetname of the NPC as the input parameter, unless overridden by the mapper.
- Note: The FGD doesn't mention this parameter and seems to not acknowledge it, but the functionality is there in code. The parameter might not fire with the default FGD, and if so the
void
type should be changed tostring
.