Ai goal actbusy queue: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Templated the keyvalues.)
m (Templated the inputs.)
Line 20: Line 20:
<!--This entity doesn't have any flags.-->
<!--This entity doesn't have any flags.-->
==Inputs==
==Inputs==
* {{i targetname}}
* {{I BaseActbusyGoal}}
* '''Activate'''
: Begin acting busy.
* '''Deactivate'''
: Cease acting busy.
* '''ForceNPCToActBusy'''
: <Targetname> <hint node targetname> <optional:teleport> <optional:$customactivityorsequence> <maximum time to actbusy> Force an NPC to act busy. If no hint node targetname is specified, it'll search for a random one. If no max time is specified, it'll use the default. Specifying 0 as the max time will make the NPC act busy until disturbed. If the optional teleport parameter is specified, the NPC will teleport to the act busy point. A custom move animation can be specified by prepending $ to the name of it. i.e. $ACT_RUN will make the NPC Run. Sequence names can be used instead of activities.
* '''ForceThisNPCToActBusy'''
: <string> Force an NPC outputted from another entity to act busy. Only usable from an output that specifies an entity.
* '''ForceThisNPCToLeave'''
: <string> Force an NPC outputted from another entity to find a HINT_NPC_EXIT_POINT hintnode and vanish.
* '''MoveQueueUp'''
* '''MoveQueueUp'''
: Moves all NPCs in the queue up one position, and sends the first NPC to the ''Exit Node''.
: Moves all NPCs in the queue up one position, and sends the first NPC to the ''Exit Node''.
Line 37: Line 27:
* '''PlayerStoppedBlocking'''
* '''PlayerStoppedBlocking'''
: <float> Tell the queue manager that the player has stopped blocking the point in the queue passed as a parameter.
: <float> Tell the queue manager that the player has stopped blocking the point in the queue passed as a parameter.
* '''SetBusySearchRange'''
: <float> Update the busy search range for all actors.


==Outputs==
==Outputs==

Revision as of 06:40, 6 April 2006

Template:Wrongtitle

Entity Description

This entity managed the food queue in d1_trainstation_02.

Behaves the same way as an ai_goal_actbusy entity does, except that an ai_goal_actbusy_queue orders actbusy hints and NPCs in a queue. The queue can be moved forward, and when the first NPC in the queue leaves, it can be given orders.

Note.pngNote:Actbusy hints not specified in the keyvalues will function as normal, as will NPCs who cannot join the queue.
Warning.pngWarning:Hint activities should not require exiting, or the queue will freeze.

Keyvalues

  • AI_ActBusyGoal:
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 (Standard)
  • 1: Combat
Allow actor to teleport? (allowteleport) <boolean>
Sight Entity (seeentity) <targetname>
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.
Note.pngNote:Only targetnames are allowed, not classnames!
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.
  • 0: Default. LOS -and- Viewcone.
  • 1: LOS Only. Disregard Viewcone.
Combat Safe Zone (safezone) <targetname>
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 break.
Todo: Will actors go back to the actbusy once enemies are dead? What if they leave the safe zone but are still alive?
  • node_exit
<target_destination> Exit Node - The name of the first node (info_node_hint or path_corner) the first NPC in the queue should head to when leaving the queue. Required.
  • node01-20
<target_destination> Node 1-20 - The name of the nth actbusy hint node in the queue. (Node 1 is the front of the queue.) The number of defined nodes defines the maximum number of NPCs queuing.
  • mustreachfront
<choices> Must Reach Front - If true, an NPC must strictly be at Node 1 before being able to leave the queue.

Inputs

  • AI_ActBusyGoal:
ForceNPCToActBusy <stringRedirectInput/string>
Format: <targetname> [hint node targetname] [teleport] [nearest] [$<custom activity or sequence>] [max time]
Force an NPC to act busy.
  • The targetname parameter specifies the name of the NPC(s).
  • The hint node targetname parameter specifies the name of the Hint node. Used to force an NPC to act busy on a specific node. If no hint node targetname is specified, it'll search for a random one.
  • If the teleport keyword is specified as a parameter, the NPC will teleport onto the actbusy node instead of navigating to it.
  • If the nearest keyword is specified as a parameter, the NPC will choose the nearest valid actbusy node, instead of choosing one randomly from all valid actbusy nodes.
  • The max time parameter specifies the maximum time to actbusy. If no max time is specified, it'll use the default. Specifying 0 as the max time will make the NPC(s) act busy until disturbed.
  • The $customactivityorsequence parameter specifies the name of a custom activity, prepended by a "$", that the NPC(s) will preform while navigating to the node, e.g. $ACT_RUN will make the NPC(s) run to the node. Sequence names can be used instead of activities.
ForceThisNPCToActBusy <targetnameRedirectInput/string>
Force an specified NPC to act busy. If there are multiple NPCs with the same name, only one will be ordered.
ForceThisNPCToLeave <targetnameRedirectInput/string>
Force an NPC to find an NPC exit point (HINT_NPC_EXIT_POINT hintnode) and vanish. Supports wildcards.
SetBusySearchRange <floatRedirectInput/float>
Alters the Search Range for Busy Hints keyvalue for all actors.
  • MoveQueueUp
Moves all NPCs in the queue up one position, and sends the first NPC to the Exit Node.
  • PlayerStartedBlocking
<float> Tell the queue manager that the player has started blocking the point in the queue passed as a parameter.
  • PlayerStoppedBlocking
<float> Tell the queue manager that the player has stopped blocking the point in the queue passed as a parameter.

Outputs

  • OnNPCStartedBusy
<string> Fired when an NPC targeted by this goal starts an ActBusy animation.
  • OnNPCFinishedBusy
<string> Fired when an NPC targeted by this goal finishes an ActBusy.
  • OnNPCLeft
<string> Fired when an NPC target by this goal finishes a forced Leave.
  • OnNPCStartedLeavingQueue
<string> Fired when the NPC at the head of the queue starts to leave. The activator is the NPC, and the string is the name of the NPC.
  • OnNPCLeftQueue
<string> Fired when the NPC at the head of the queue leaves and has reached the Exit Node. The activator is the NPC, and the string is the name of the NPC.
  • OnQueueMoved
<float> Fired when the queue moves. Outputs the number of NPCs remaining in the queue.

See Also