PMC websites shut down September 13th 2025 unless yearly web hosting fees are paid. Please Support PMC to help keep these websites online.

Enjoyed or found this pages content useful, please Support PMC to help me keep this web page online beyond september 13th 2025 when yearly web hosting fees are due.

User Tools

Site Tools


ofp:missions:eventhandlers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ofp:missions:eventhandlers [2007/07/12 05:10] – created eventhandlers initial page snakemanofp:missions:eventhandlers [2024/07/31 13:13] (current) – links added. snakeman
Line 1: Line 1:
-====== EventHandlers ======+====== OFP EventHandlers ====== 
 + 
 +[[https://www.pmctactical.org/forum/viewforum.php?f=43|OFP Forum]], [[:ofp|OFP Home]], [[ofp:file_formats|OFP File Formats]], [[ofp:tools|OFP Tools]], [[ofp:missions|OFP Missions]], [[ofp:modeling|OFP 3D Modeling]], [[ofp:terrain|OFP Terrain]] 
 + 
 +**Operation Flashpoint (OFP)** aka ArmA: Cold War Assault (CWA)
  
 **EventHandler**'s or EH's. **EventHandler**'s or EH's.
Line 35: Line 39:
   * unit: Object - Object the event handler is assigned to   * unit: Object - Object the event handler is assigned to
   * engineState: Boolean - True when the engine is turned on, false when turned off   * engineState: Boolean - True when the engine is turned on, false when turned off
- +
 ====== Fired ====== ====== Fired ======
  
 Triggered when the unit fires a weapon. Triggered when the unit fires a weapon.
  
-Global. +Global.
  
 Passed array: **[unit, weapon, muzzle, mode, ammo]** Passed array: **[unit, weapon, muzzle, mode, ammo]**
Line 54: Line 58:
 Triggered when the unit's fuel status changes between completely empty / not empty (only useful when the object the event handler is assigned to is a vehicle). Triggered when the unit's fuel status changes between completely empty / not empty (only useful when the object the event handler is assigned to is a vehicle).
  
-Global. +Global.
  
 Passed array: **[unit, fuelState]** Passed array: **[unit, fuelState]**
Line 65: Line 69:
 Triggered when the unit lowers/retracts the landing gear (only useful when the object the event handler is assigned to is a member of the class "Plane"). Triggered when the unit lowers/retracts the landing gear (only useful when the object the event handler is assigned to is a member of the class "Plane").
  
-Global. +Global.
  
 Passed array: **[unit, gearState]** Passed array: **[unit, gearState]**
Line 76: Line 80:
 Triggered when a unit enters the object (only useful when the object the event handler is assigned to is a vehicle). Triggered when a unit enters the object (only useful when the object the event handler is assigned to is a vehicle).
  
-Global. +Global.
  
 Passed array: **[unit, position, enterer]** Passed array: **[unit, position, enterer]**
Line 96: Line 100:
 Triggered when the unit is hit/damaged. Triggered when the unit is hit/damaged.
  
-Local. +Local.
  
 Passed array: **[unit, causedBy, damage]** Passed array: **[unit, causedBy, damage]**
Line 102: Line 106:
   * unit: Object - Object the event handler is assigned to   * unit: Object - Object the event handler is assigned to
   * causedBy: Object - Object that caused the damage, contains the unit itself in case of collisions.   * causedBy: Object - Object that caused the damage, contains the unit itself in case of collisions.
-  * damage: Number - Level of damage caused by the hit +  * damage: Number - Level of damage caused by the hit
  
 ====== Init ====== ====== Init ======
 Triggered on mission start. Triggered on mission start.
  
-Global. +Global.
  
 Passed array: **[unit]** Passed array: **[unit]**
Line 119: Line 123:
 Triggered when a guided missile or an unguided missile which most likely will hit is fired on the unit. Triggered when a guided missile or an unguided missile which most likely will hit is fired on the unit.
  
-Global. +Global.
  
 Passed array: **[unit, ammo, whoFired]** Passed array: **[unit, ammo, whoFired]**
Line 131: Line 135:
 Triggered when the unit is killed. Triggered when the unit is killed.
  
-Local. +Local.
  
 Passed array: **[unit, killer]** Passed array: **[unit, killer]**
Line 137: Line 141:
   * unit: Object - Object the event handler is assigned to   * unit: Object - Object the event handler is assigned to
   * killer: Object - Object that killed the unit   * killer: Object - Object that killed the unit
 +
ofp/missions/eventhandlers.1184217041.txt.gz · Last modified: 2007/07/12 05:10 (external edit)