Mission Event Handlers – Arma 3
Killzone Kid (talk | contribs) (DEDICATED PAGE) |
Killzone Kid (talk | contribs) (format) |
||
Line 1: | Line 1: | ||
<!--------------------------------------------------------------------------------------> | <!--------------------------------------------------------------------------------------> | ||
= | = Mission Event Handlers = | ||
Mission event | == Description == | ||
Mission event handlers are specific EHs that are anchored to the running mission and automatically removed when mission is over. | |||
== Related Commands == | |||
* [[addMissionEventHandler]] | * [[addMissionEventHandler]] | ||
* [[removeMissionEventHandler]] | * [[removeMissionEventHandler]] | ||
* [[removeAllMissionEventHandlers]] | * [[removeAllMissionEventHandlers]] | ||
== Examples == | |||
<code>handle1 = [[addMissionEventHandler]] ["Loaded",{[[playMusic]] "EventTrack03_F_EPB"}]; | |||
[[removeMissionEventHandler]] ["Loaded", handle1]; | |||
[[addMissionEventHandler]] ["HandleDisconnect",{[[diag_log]] _this}]; | |||
[[removeAllMissionEventHandlers]] "HandleDisconnect";</code> | |||
== Events == | |||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
Line 18: | Line 26: | ||
! class="unsortable" | Arguments | ! class="unsortable" | Arguments | ||
! Since | ! Since | ||
|- | |- | ||
Line 28: | Line 35: | ||
| <!-- Since --> | | <!-- Since --> | ||
{{GVI|arma3|0.50}} | {{GVI|arma3|0.50}} | ||
|- | |- | ||
| <!-- Title --> | | <!-- Title --> | ||
Line 73: | Line 81: | ||
* newEntity: [[Object]] - respawned entity | * newEntity: [[Object]] - respawned entity | ||
* oldEntity: [[Object]] - corpse/wreck | * oldEntity: [[Object]] - corpse/wreck | ||
| <!-- Since --> | | <!-- Since --> | ||
{{GVI|arma3|1.55}} | {{GVI|arma3|1.55}} | ||
Line 85: | Line 92: | ||
* killed: [[Object]] - entity that was killed | * killed: [[Object]] - entity that was killed | ||
* killer: [[Object]] - the killer | * killer: [[Object]] - the killer | ||
| <!-- Since --> | | <!-- Since --> | ||
{{GVI|arma3|1.55}} | {{GVI|arma3|1.55}} | ||
|} | |} |
Revision as of 20:47, 31 March 2016
Mission Event Handlers
Description
Mission event handlers are specific EHs that are anchored to the running mission and automatically removed when mission is over.
Related Commands
Examples
handle1 = addMissionEventHandler ["Loaded",{playMusic "EventTrack03_F_EPB"}];
removeMissionEventHandler ["Loaded", handle1];
addMissionEventHandler ["HandleDisconnect",{diag_log _this}];
removeAllMissionEventHandlers "HandleDisconnect";
Events
Class | Description | Arguments | Since |
---|---|---|---|
Draw3D |
Runs the EH code each frame in unscheduled environment. Client side EH only (presence of UI). Will stop executing when UI loses focus (if user Alt+Tabs for example). Usually used with drawIcon3D, drawLine3D. |
||
Ended |
Triggered when mission ends, either using trigger of type "End", endMission command, BIS_fnc_endMission function or ENDMISSION cheat. |
|
|
HandleDisconnect |
Triggered when player disconnects from the game. Similar to onPlayerDisconnected event but can be stacked and contains the unit occupied by player before disconnect. Must be added on the server and triggers only on the server. |
Override: If this EH code returns true, the unit, previously occupied by player, gets transferred to the server, becomes AI and continues to live, even with description.ext param disabledAI = 1; |
|
Loaded |
Triggered when mission is loaded from save. |
||
EntityRespawned |
Triggered when an entity is respawned. |
||
EntityKilled |
Triggered when an entity is killed. |