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

From COD Modding & Mapping Wiki
Revision as of 00:11, 16 August 2014 by AoKMiKeY (talk | contribs) (Created page with "{{Function |Version=4 |Name=array_thread( <entities>, <process>, <var1>, <var2>, <var3>) |Module=Array |Available |Summary=Threads the <process&g...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

Module: Array


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

Call this on:


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.