Mission Event Handlers – Arma 3
Killzone Kid (talk | contribs) No edit summary |
Killzone Kid (talk | contribs) No edit summary |
||
Line 274: | Line 274: | ||
* oldBody: [[Object]] - player body before EH fired | * oldBody: [[Object]] - player body before EH fired | ||
* newBody: [[Object]] - player body after EH fired | * newBody: [[Object]] - player body after EH fired | ||
* vehicleIn: [[Object]] - vehicle player is in ([[ | * vehicleIn: [[Object]] - vehicle player is in ([[objNull]] if not in vehicle) | ||
* oldCameraOn: [[Object]] - [[cameraOn]] before EH fired | * oldCameraOn: [[Object]] - [[cameraOn]] before EH fired | ||
* newCameraOn: [[Object]] - [[cameraOn]] after EH fired | * newCameraOn: [[Object]] - [[cameraOn]] after EH fired | ||
* UAV: [[Object]] - UAV reference if player is operating one ([[ | * UAV: [[Object]] - UAV reference if player is operating one ([[objNull]] if not operating UAV) | ||
| <!-- Since --> | | <!-- Since --> | ||
{{GVI|arma3|1.66}} | {{GVI|arma3|1.66}} | ||
|} | |} |
Revision as of 18:26, 5 December 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. For all other available EHs see the main page.
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. |
|
|
Loaded |
Triggered when mission is loaded from save. |
||
Map |
Triggered when map is opened or closed either by user action or script command openMap. |
||
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; |
|
EntityRespawned |
Triggered when an entity is respawned. |
||
EntityKilled |
Triggered when an entity is killed. |
(Since Arma 3 v1.65)
|
|
EachFrame |
Executes assigned code each frame. Stackable version of onEachFrame. |
||
MapSingleClick |
Executes assigned code when user clicks anywhere on the main map. Stackable version of onMapSingleClick with some limitations:
|
|
|
HCGroupSelectionChanged |
Executes assigned code when user selects available HC group (F1,F2...). Stackable version of onHCGroupSelectionChanged. |
||
CommandModeChanged |
Executes assigned code when user switches to/from HC command mode (Left Shift + Space). Stackable version of onCommandModeChanged. |
||
GroupIconClick |
Executes assigned code when user clicks on the HC group icon on the map. If groupIconSelectable is true, LMB clicking (firing) at the HC group icon on the HUD will also trigger the event. To set group icon selectable use setGroupIconsSelectable. Stackable version of onGroupIconClick. |
|
|
GroupIconOverEnter |
Continuously executes assigned code when user hovers with pointer over the HC group icon, either on the HUD or the main map. groupIconSelectable must be set to true for this EH to work at all. To set group icon selectable use setGroupIconsSelectable. When EH fires over the HUD icon, X and Y coordinates will change depending on the position of the pointer in relation to the icon area. When over main map, the X and Y do not change and indicate icon center. Stackable version of onGroupIconOverEnter. |
|
|
GroupIconOverLeave |
Executes assigned code when user moves the pointer away from HC group icon it was over. Fires either for on the HUD icons or the main map HC icons. groupIconSelectable must be set to true for this EH to work at all. To set group icon selectable use setGroupIconsSelectable. Stackable version of onGroupIconOverLeave. |
|
|
PlayerConnected |
Executes assigned code when client joins the mission in MP. Stackable version of onPlayerConnected. |
|
|
PlayerDisconnected |
Executes assigned code when client leaves the mission in MP. Stackable version of onPlayerDisconnected. |
|
|
TeamSwitch |
Executes assigned code when player teamswitches. Stackable version of onTeamSwitch. |
||
PreloadStarted |
Executes assigned code before the mission preload screen. Stackable version of onPreloadStarted. |
||
PreloadFinished |
Executes assigned code after the mission preload screen. Stackable version of onPreloadFinished. |
||
PlayerViewChanged |
Fired on player view change. Player view changes when player is changing body due to teamSwitch, gets in out of a vehicle or operates UAV for example. |
|