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

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


SetEntityTarget( <entity> <threat> )

Module: AI
SP Only

Summary:

Set an entity as the AI's target. This is for special cases only. Do not set AI or player targets with this.


Call this on: <actor> An actor

Example:

self SetEntityTarget( vehicle_entity, 0.7 )

Required arguments:

  1. <entity> An entity to target.


Optional arguments:

  1. <threat> A fraction of maximum possible threat an AI can have. Must be in 0 to 1 range. Defaults to 1.


Notes:

none