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

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


CheckGrenadeLaunchPos( <barrel offset>, <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 CheckGrenadeLaunchPos( offset, targetPos );

Required arguments:

  1. <barrel offset> (vector) the estimated offset of the grenade launcher barrel
  2. <targetpos> (vector) The target position


Optional arguments:

none


Notes:

none