Call of Duty 4: Scripting Reference - AI::CheckGrenadeThrowPos

From COD Modding & Mapping Wiki
Share/Save/Bookmark
Jump to: navigation, search


CheckGrenadeThrowPos( <hand offset>, <method>, <targetpos> )

Module: AI
SP Only

Summary:

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


Call this on: <actor> An actor

Example:

throwvel = self CheckGrenadeThrowPos( armOffset, "min energy", targetPos );

Required arguments:

  1. <hand offset> (vector) the estimated offset of the hand for the throw
  2. <method> (vector) The grenade toss method. Can be 'min energy', 'min time', and 'max tune'
  3. <targetpos> (vector) The target position, should be at ground level of potential target


Optional arguments:

none


Notes:

none