GSC reference › Built-in
IsInGoal()
Built-in (engine)
Server
AI Called on: sentient
Determine whether a given point is in the actor's current goal area
Signature
<sentient> IsInGoal(<point>)
Called on an entity: sentient IsInGoal(...)
Parameters
| Name | Required? | Details |
|---|---|---|
| point | Required | which point to check. |
Example (from Treyarch's docs)
if ( ai IsInGoal( point ) )
Real uses in BO3's scripts
Called 4 times in the decompiled scripts. A few, zombies first:
- scripts/shared/ai/archetype_utility.gsc, line 1787
if(behaviortreeentity isingoal(lastknownpositionofenemy) && behaviortreeentity findpath(behaviortreeentity.origin, lastknownpositionofene... - scripts/shared/ai/archetype_utility.gsc, line 1811
if(behaviortreeentity isingoal(lastknownpositionofenemy) && behaviortreeentity findpath(behaviortreeentity.origin, lastknownpositionofene... - scripts/shared/ai/archetype_utility.gsc, line 1836
if(isdefined(closestrandomnode) && behaviortreeentity isingoal(closestrandomnode.origin) && behaviortreeentity findpath(behaviortreeentit... - scripts/shared/ai/archetype_utility.gsc, line 1859
if(behaviortreeentity isingoal(origin) && behaviortreeentity findpath(behaviortreeentity.origin, origin, 1, 0))
Related built-ins
- SetGoal()Set this AI 's goal.
- ClearForcedGoal()Clears the forcedGoal for this AI's goal.
- setgoalpos()Set this AI 's goal.
- ClearGoalVolume()Clears this actor's goal volume.
- IsAtGoal()Returns true/false if actor has at/reached its current goal, similar to waiting for "goal" notify.
- setgoalvolume()Set this AI 's goal.
- setgoalnode()Set this AI 's goal.
- IsPosAtGoal()Returns true/false if position is inside the current goal
- IsApproachingGoal()Returns true/false if actor at the goal or approaching the goal.
- setgoalentity()Set this AI 's goal.
- GetGoalVolume()Get this actor's goal volume.
- setgoalvolumeauto()Set this AI 's goal.
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).