GSC reference › Built-in

aithrowgrenade()

Built-in (engine) Server AI Called on: actor

Throw a grenade. CheckGrenadeThrowPos() or CheckGrenadeThrow() must be called first.

Signature

<actor> aithrowgrenade()

Called on an entity: actor aithrowgrenade(...)

Example (from Treyarch's docs)

self GrenadeThrow()

Real uses in BO3's scripts

Not called anywhere in BO3's shipped scripts, so check it works in your mode before relying on it.

Related built-ins

  • 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.
  • HasPath()
    Returns true/false if AI has a path
  • ClearForcedGoal()
    Clears the forcedGoal for this AI's goal.
  • setgoalpos()
    Set this AI 's goal.
  • UsePosition()
    Override where the actor should run to.
  • CanSee()
    Check to see if the AI can see the given entity.
  • GetPerfectInfo()
    Forces the AI to become aware of this entity regardless of whether it can be seen or not.
  • IsNoTarget()
    Returns if the sentient is marked no target

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).