GSC reference › Built-in
GetBehaviorTreeStatus()
Built-in (engine)
Server
AI Called on: actor
Returns current status/BHTN_STATUS of the behavior tree for an actor.
Signature
<actor> GetBehaviorTreeStatus()
Called on an entity: actor GetBehaviorTreeStatus(...)
Returns
Returns current status/BHTN_STATUS of the behavior tree for an actor.
Example (from Treyarch's docs)
isBehaviorTreeInRunningState = behaviorTreeEntity GetBehaviortreeStatus() == BHTN_RUNNING
Real uses in BO3's scripts
Called 3 times in the decompiled scripts. A few, zombies first:
- scripts/shared/ai/archetype_robot.gsc, line 2864
isbehaviortreeinrunningstate = entity getbehaviortreestatus() == 5; - scripts/shared/ai/archetype_utility.gsc, line 2217
isbehaviortreeinrunningstate = behaviortreeentity getbehaviortreestatus() == 5; - scripts/shared/ai/warlord.gsc, line 222
if(entity asmistransitionrunning() || entity getbehaviortreestatus() != 5 || entity asmissubstatepending() || entity asmistransdecrunning())
Related built-ins
- UseAnimTree()Sets the anim tree for the entity
- HasAnimTree()Returns true if the entity has an anim tree
- ChangeAdvertisedStatus()Changes the advertised status
- GetMigrationStatus()
- EvStatus()Returns the status of EV
- SetObjectivePointStatus()Objective status set in the match state
- TmodeStatus()Returns the status of tmode
- SetGoal()Set this AI 's goal.
- ForceTeleport()Force Teleport the actor to a new position with the given origin and angles, regardless of wether it will be visible to the player or not.
- OrientMode()Set the orient mode of this actor.
- AnimMode()Set the way that animation deltas are interpreted by the game engine
- PathMode()Set the path mode of this actor.
New to GSC?
Start with the basics, or paste a compile error to get the fix.
Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).