GSC reference › Built-in

CanThrowGrenadePos()

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> CanThrowGrenadePos(<hand offset>, <targetpos>)

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

Parameters

NameRequired?Details
hand offsetRequired (vector) the estimated offset of the hand for the throw
targetposRequired (vector) The target position, should be at ground level of potential target

Example (from Treyarch's docs)

throwvel = self CanThrowGrenadePos( armOffset, targetPos )

Real uses in BO3's scripts

Called 2 times in the decompiled scripts. A few, zombies first:

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