Call of Duty 4: Scripting Reference - Objective::Target IsInRect

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


Target_IsInRect( <target entity>, <player>, <fov>, <halfwidth>, <halfheight> )

Module: Objective
SP Only

Summary:

Returns whether a target is within a given rectangle, centered in the center of the player's screen


Call this on:

Example:

level.player Target_IsInRect( enemy_chopper, level.player, 65, 100, 100 );

Required arguments:

  1. <target entity> The entity that is the target
  2. <player> The player entity
  3. <fov> The player's field of view
  4. <halfwidth> half the width of the rectangle
  5. <halfheight> half the height of the rectangle


Optional arguments:

none


Notes:

none