Call of Duty 4: Scripting Reference - Array::array thread

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


array_thread( <entities>, <process>, <var1>, <var2>, <var3>)

Module: Array

Summary:

Threads the <process> function on every entity in the < entities > array. The entity will become "self" in the specified function.


Call this on:

Example:

array_thread( getaiarray( "allies" ), ::delete );

Required arguments:

  1. <entities> Array of entities to thread the process.
  2. <process> Pointer to a script function.


Optional arguments:

  1. <var1> Parameter 1 to pass to the process.
  2. <var2> Parameter 2 to pass to the process.
  3. <var3> Parameter 3 to pass to the process.


Notes:

none