GSC reference › Built-in

CanThrowGrenade()

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

Checks whether the actor can throw a grenade at a given position. If he can't then result will be undefined, otherwise the result is the resultant velocity vector

Signature

<actor> CanThrowGrenade(<hand offset>, <random range>)

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

Parameters

NameRequired?Details
hand offsetRequired (vector) the estimated offset of the hand for the throw
random rangeRequired (float) random range from target position to throw at

Example (from Treyarch's docs)

throwvel = self CanThrowGrenade( armOffset, 0 )

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

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