Scripted Event Handlers – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
(Add full example and params usage)
m (Some wiki formatting)
Line 49: Line 49:
! Event passed parameters
! Event passed parameters
|- class="align-left"
|- class="align-left"
! colspan="3" | Player opens pause menu
! colspan="3" |
=== Player opens pause menu ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "OnGameInterrupt"
| "OnGameInterrupt"
| <sqf>params ["_display"];</sqf>
| <sqf>params ["_display"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | Player exits Game Options menu
! colspan="3" |
=== Player exits Game Options menu ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "OnGameOptionsExited" {{GVI|arma3|2.02}}
| "OnGameOptionsExited" {{GVI|arma3|2.02}}
| <sqf>params ["_okButtonPressed"];</sqf>
| <sqf>params ["_okButtonPressed"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | Saving of the game, scripted or manual
! colspan="3" |
=== Saving of the game, scripted or manual ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "OnSaveGame"
| "OnSaveGame"
| {{n/a}}
| {{n/a}}
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | [[Event Scripts#teamSwitchedScript.sqs|teamSwitchedScript.sqs]]
! colspan="3" |
=== [[Event Scripts#teamSwitchedScript.sqs|teamSwitchedScript.sqs]] ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "teamSwitched"
| "teamSwitched"
| <sqf>params ["_originalUnit", "_switchToUnit"];</sqf>
| <sqf>params ["_originalUnit", "_switchToUnit"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | [[BIS_fnc_packStaticWeapon]]
! colspan="3" |
=== [[BIS_fnc_packStaticWeapon]] ===
|-
|-
| <sqf>_group</sqf>
| <sqf>_group</sqf>
| "StaticWeaponPacked"
| "StaticWeaponPacked"
| <sqf>params ["_group", "_leader", "_gunner", "_assistant", "_weaponBag", "_baseBag"];</sqf>
| <sqf>params ["_group", "_leader", "_gunner", "_assistant", "_weaponBag", "_baseBag"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | [[BIS_fnc_unpackStaticWeapon]]
! colspan="3" |
=== [[BIS_fnc_unpackStaticWeapon]] ===
|-
|-
| <sqf>_group</sqf>
| <sqf>_group</sqf>
| "StaticWeaponUnpacked"
| "StaticWeaponUnpacked"
| <sqf>params ["_group", "_leader", "_gunner", "_assistant", "_weapon"];</sqf>
| <sqf>params ["_group", "_leader", "_gunner", "_assistant", "_weapon"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | Module Timeline
! colspan="3" |
=== Module Timeline ===
|-
|-
| <sqf>_timeline</sqf>
| <sqf>_timeline</sqf>
| "finished"
| "finished"
| <sqf>params ["_timeline"];</sqf>
| <sqf>params ["_timeline"];</sqf>
|-
|-
|-
| <sqf>_timeline</sqf>
| <sqf>_timeline</sqf>
| "played"
| "played"
| {{n/a}}
| {{n/a}}
|-
|-
|-
| <sqf>_timeline</sqf>
| <sqf>_timeline</sqf>
| "looped"
| "looped"
| <sqf>params ["_timeline"];</sqf>
| <sqf>params ["_timeline"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | Module Rich Curve Key
! colspan="3" |
=== Module Rich Curve Key ===
|-
|-
| _curKey
| _curKey
| "reached"
| "reached"
| <sqf>params ["_curKey"];</sqf>
| <sqf>params ["_curKey"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | [[BIS_fnc_kbTellLocal]]
! colspan="3" |
=== [[BIS_fnc_kbTellLocal]] ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "BIS_fnc_kbTellLocal_played"
| "BIS_fnc_kbTellLocal_played"
| <sqf>params ["_from", "_to", "_sentence", "_channel"];</sqf>
| <sqf>params ["_from", "_to", "_sentence", "_channel"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | Module Game Master (Zeus)
! colspan="3" |
=== Module Game Master (Zeus) ===
|-
|-
| <sqf>_curator</sqf>
| <sqf>_curator</sqf>
| "curatorGroupPlaced"
| "curatorGroupPlaced"
| <sqf>params ["_group"];</sqf>
| <sqf>params ["_group"];</sqf>
|-
|-
|-
| <sqf>_curator</sqf>
| <sqf>_curator</sqf>
| "curatorObjectPlaced"
| "curatorObjectPlaced"
| <sqf>params ["_object"];</sqf>
| <sqf>params ["_object"];</sqf>
|-
|-
|-
| <sqf>_curator</sqf>
| <sqf>_curator</sqf>
| "curatorUnitAssigned"
| "curatorUnitAssigned"
| <sqf>params ["_curator", "_player"];</sqf>
| <sqf>params ["_curator", "_player"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | [[BIS_fnc_playVideo]]
! colspan="3" |
=== [[BIS_fnc_playVideo]] ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "BIS_fnc_playVideo_started"
| "BIS_fnc_playVideo_started"
| <sqf>params ["_video"];</sqf>
| <sqf>params ["_video"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "BIS_fnc_playVideo_stopped"
| "BIS_fnc_playVideo_stopped"
| <sqf>params ["_video"];</sqf>
| <sqf>params ["_video"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | [[BIS_fnc_addScriptedEventHandler]]
! colspan="3" |
=== [[BIS_fnc_addScriptedEventHandler]] ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "ScriptedEventHandlerAdded"
| "ScriptedEventHandlerAdded"
| <sqf>params ["_namespace", "_name", "_handlerID"];</sqf>
| <sqf>params ["_namespace", "_name", "_handlerID"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | [[BIS_fnc_removeScriptedEventHandler]]
! colspan="3" |
=== [[BIS_fnc_removeScriptedEventHandler]] ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "ScriptedEventHandlerRemoved"
| "ScriptedEventHandlerRemoved"
| <sqf>params ["_namespace", "_name", "_handlerID"];</sqf>
| <sqf>params ["_namespace", "_name", "_handlerID"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | [[BIS_fnc_removeAllScriptedEventHandlers]]
! colspan="3" |
=== [[BIS_fnc_removeAllScriptedEventHandlers]] ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "ScriptedEventHandlerRemoved"
| "ScriptedEventHandlerRemoved"
| <sqf>params ["_namespace", "_name", "_handlerID"];</sqf>
| <sqf>params ["_namespace", "_name", "_handlerID"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | [[BIS_fnc_respawnTickets]]
! colspan="3" |
=== [[BIS_fnc_respawnTickets]] ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "respawnTicketsExhausted"
| "respawnTicketsExhausted"
| <sqf>params ["_target"];</sqf>
| <sqf>params ["_target"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | [[BIS_fnc_bleedTickets]]
! colspan="3" |
=== [[BIS_fnc_bleedTickets]] ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "dominantSideChanged"
| "dominantSideChanged"
| <sqf>params ["_dominantSide", "_dominantSideOld", "_sides"];</sqf>
| <sqf>params ["_dominantSide", "_dominantSideOld", "_sides"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | BIS_fnc_arsenal
! colspan="3" |
=== BIS_fnc_arsenal ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "arsenalPreOpen" {{GVI|arma3|2.08}} Fires just before Arsenal display is created
| "arsenalPreOpen" {{GVI|arma3|2.08}} Fires just before Arsenal display is created
| <sqf>params ["_missionDisplay", "_center"];</sqf>
| <sqf>params ["_missionDisplay", "_center"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
Line 197: Line 192:
| <sqf>params ["_display", "_toggleSpace"];</sqf>
| <sqf>params ["_display", "_toggleSpace"];</sqf>
* _toggleSpace: [[Boolean]] - <sqf inline>uiNamespace getVariable ["bis_fnc_arsenal_toggleSpace", false]];</sqf>
* _toggleSpace: [[Boolean]] - <sqf inline>uiNamespace getVariable ["bis_fnc_arsenal_toggleSpace", false]];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
Line 203: Line 197:
| <sqf>params ["_displayNull", "_toggleSpace"];</sqf>
| <sqf>params ["_displayNull", "_toggleSpace"];</sqf>
* _toggleSpace: [[Boolean]] - <sqf inline>uiNamespace getVariable ["bis_fnc_arsenal_toggleSpace", false]];</sqf>
* _toggleSpace: [[Boolean]] - <sqf inline>uiNamespace getVariable ["bis_fnc_arsenal_toggleSpace", false]];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | [[BIS_fnc_garage]]
! colspan="3" |
=== [[BIS_fnc_garage]] ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "garageOpened"
| "garageOpened"
| <sqf>params ["_display", "_toggleSpace"];</sqf>
| <sqf>params ["_display", "_toggleSpace"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
Line 216: Line 209:
| <sqf>params ["_displayNull", "_toggleSpace"];</sqf>
| <sqf>params ["_displayNull", "_toggleSpace"];</sqf>
* _toggleSpace: [[Boolean]] - <sqf inline>uiNamespace getVariable ["bis_fnc_arsenal_toggleSpace", false]];</sqf>
* _toggleSpace: [[Boolean]] - <sqf inline>uiNamespace getVariable ["bis_fnc_arsenal_toggleSpace", false]];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | BIS_fnc_initIntelObject
! colspan="3" |
=== BIS_fnc_initIntelObject ===
|-
|-
| _object
| _object
| "intelObjectFound"
| "intelObjectFound"
| <sqf>params ["_object", "_foundBy"];</sqf>
| <sqf>params ["_object", "_foundBy"];</sqf>
|-
|-
|-
| <sqf>_curator</sqf>
| <sqf>_curator</sqf>
| "intelObjectFound"
| "intelObjectFound"
| <sqf>params ["_curator", "_foundBy", "_object"];</sqf>
| <sqf>params ["_curator", "_foundBy", "_object"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | BIS_fnc_EGSpectatorCamera
! colspan="3" |
=== BIS_fnc_EGSpectatorCamera ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "EGSpectator_OnCameraModeChanged"
| "EGSpectator_OnCameraModeChanged"
| <sqf>params ["_newMode"];</sqf>
| <sqf>params ["_newMode"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | Module Vehicle Respawn
! colspan="3" |
=== Module Vehicle Respawn ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "respawn"
| "respawn"
| <sqf>params ["_newVeh", "_veh"];</sqf>
| <sqf>params ["_newVeh", "_veh"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | Module Sector
! colspan="3" |
=== Module Sector ===
|-
|-
| <sqf>_sector</sqf>
| <sqf>_sector</sqf>
| "ownerChanged"
| "ownerChanged"
| <sqf>params ["_sector", "_owner", "_ownerOld"];</sqf>
| <sqf>params ["_sector", "_owner", "_ownerOld"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | Module Curator RemoteControl
! colspan="3" |
=== Module Curator RemoteControl ===
|-
|-
| <sqf>_curator</sqf>
| <sqf>_curator</sqf>
Line 257: Line 249:
| <sqf>params ["_curator", "_player", "_unit", "_isRemoteControlled"];</sqf>
| <sqf>params ["_curator", "_player", "_unit", "_isRemoteControlled"];</sqf>
* _isRemoteControlled is [[true]] when entering remote control, [[false]] when exiting
* _isRemoteControlled is [[true]] when entering remote control, [[false]] when exiting
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | Module Spawn AI: Sector Tactic
! colspan="3" |
=== Module Spawn AI: Sector Tactic ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "bis_groundSupport_groupSpawned"
| "bis_groundSupport_groupSpawned"
| <sqf>params ["_bis_groundSupport_groupSpawned", "_group", "_side"];</sqf>
| <sqf>params ["_bis_groundSupport_groupSpawned", "_group", "_side"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "bis_groundSupport_wiped"
| "bis_groundSupport_wiped"
| <sqf>params ["_bis_groundSupport_wiped", "_group"];</sqf>
| <sqf>params ["_bis_groundSupport_wiped", "_group"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "bis_groundSupport_inEnemySector"
| "bis_groundSupport_inEnemySector"
| <sqf>params ["_bis_groundSupport_inEnemySector", "_group"];</sqf>
| <sqf>params ["_bis_groundSupport_inEnemySector", "_group"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "bis_groundSupport_destinationReached"
| "bis_groundSupport_destinationReached"
| <sqf>params ["_bis_groundSupport_destinationReached", "_group"];</sqf>
| <sqf>params ["_bis_groundSupport_destinationReached", "_group"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "bis_groundSupport_groupTypeChanged"
| "bis_groundSupport_groupTypeChanged"
| <sqf>params ["_bis_groundSupport_groupTypeChanged", "_group", "_type", "_currentType"];</sqf>
| <sqf>params ["_bis_groundSupport_groupTypeChanged", "_group", "_type", "_currentType"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "bis_groundSupport_decimated"
| "bis_groundSupport_decimated"
| <sqf>params ["_bis_groundSupport_decimated", "_group"];</sqf>
| <sqf>params ["_bis_groundSupport_decimated", "_group"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "bis_groundSupport_farFromDestination"
| "bis_groundSupport_farFromDestination"
| <sqf>params ["_bis_groundSupport_farFromDestination", "_group"];</sqf>
| <sqf>params ["_bis_groundSupport_farFromDestination", "_group"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "bis_groundSupport_needTransport"
| "bis_groundSupport_needTransport"
| <sqf>params ["_bis_groundSupport_needTransport", "_group"];</sqf>
| <sqf>params ["_bis_groundSupport_needTransport", "_group"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "bis_groundSupport_joined"
| "bis_groundSupport_joined"
| <sqf>params ["_bis_groundSupport_joined", "_group", "_transportGroup"];</sqf>
| <sqf>params ["_bis_groundSupport_joined", "_group", "_transportGroup"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "bis_groundSupport_closeToDestination"
| "bis_groundSupport_closeToDestination"
| <sqf>params ["_bis_groundSupport_closeToDestination", "_group"];</sqf>
| <sqf>params ["_bis_groundSupport_closeToDestination", "_group"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "bis_groundSupport_needEvac"
| "bis_groundSupport_needEvac"
| <sqf>params ["_bis_groundSupport_needEvac", "_group"];</sqf>
| <sqf>params ["_bis_groundSupport_needEvac", "_group"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "bis_groundSupport_needAmmo"
| "bis_groundSupport_needAmmo"
| <sqf>params ["_bis_groundSupport_needAmmo", "_group"];</sqf>
| <sqf>params ["_bis_groundSupport_needAmmo", "_group"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "bis_groundSupport_needSupport"
| "bis_groundSupport_needSupport"
| <sqf>params ["_bis_groundSupport_needSupport", "_group", "_reportedVehicle"];</sqf>
| <sqf>params ["_bis_groundSupport_needSupport", "_group", "_reportedVehicle"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "bis_groundSupport_boarded"
| "bis_groundSupport_boarded"
| <sqf>params ["_bis_groundSupport_boarded", "_group", "_transport"];</sqf>
| <sqf>params ["_bis_groundSupport_boarded", "_group", "_transport"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "bis_groundSupport_transportStarted"
| "bis_groundSupport_transportStarted"
| <sqf>params ["_bis_groundSupport_transportStarted", "_group", "_transport"];</sqf>
| <sqf>params ["_bis_groundSupport_transportStarted", "_group", "_transport"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "bis_groundSupport_transportEnded"
| "bis_groundSupport_transportEnded"
| <sqf>params ["_bis_groundSupport_transportEnded", "_group", "_transport"];</sqf>
| <sqf>params ["_bis_groundSupport_transportEnded", "_group", "_transport"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "bis_groundSupport_transportAborted"
| "bis_groundSupport_transportAborted"
| <sqf>params ["_bis_groundSupport_transportAborted", "_group", "_transport"];</sqf>
| <sqf>params ["_bis_groundSupport_transportAborted", "_group", "_transport"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "bis_groundSupport_disembarked"
| "bis_groundSupport_disembarked"
| <sqf>params ["_bis_groundSupport_disembarked", "_group", "_transport"];</sqf>
| <sqf>params ["_bis_groundSupport_disembarked", "_group", "_transport"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | Module End Game
! colspan="3" |
=== Module End Game ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "EndGame_OnStageChanged"
| "EndGame_OnStageChanged"
| <sqf>params ["_stage", "_side"];</sqf>
| <sqf>params ["_stage", "_side"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "EndGame_OnStartGameObjectiveCompleted"
| "EndGame_OnStartGameObjectiveCompleted"
| <sqf>params ["_side"];</sqf>
| <sqf>params ["_side"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "EndGame_OnObjectiveStateChanged"
| "EndGame_OnObjectiveStateChanged"
| <sqf>params ["_objective", "_side", "_newState"];</sqf>
| <sqf>params ["_objective", "_side", "_newState"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "EndGame_OnObjectiveCompleted"
| "EndGame_OnObjectiveCompleted"
| <sqf>params ["_objective"];</sqf>
| <sqf>params ["_objective"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "EndGame_OnObjectiveEnded"
| "EndGame_OnObjectiveEnded"
| <sqf>params ["_objective"];</sqf>
| <sqf>params ["_objective"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "EndGame_OnDownloadCompleted"
| "EndGame_OnDownloadCompleted"
| <sqf>params ["_side", "_isUpload"];</sqf>
| <sqf>params ["_side", "_isUpload"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "EndGame_Ended"
| "EndGame_Ended"
| <sqf>params ["_winnerSide", "_loserSide", "_isDraw"];</sqf>
| <sqf>params ["_winnerSide", "_loserSide", "_isDraw"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "onUploadStateChanged"
| "onUploadStateChanged"
| <sqf>params ["_side"]; // can be nil</sqf>
| <sqf>params ["_side"]; // can be nil</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "onPickupInfoChanged"
| "onPickupInfoChanged"
| <sqf>params ["_BIS_hvt_pickupInfo"];</sqf>
| <sqf>params ["_BIS_hvt_pickupInfo"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | EG Spectator Display
! colspan="3" |
=== EG Spectator Display ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "RscDisplayEGSpectator_OnCursorObjectFocused"
| "RscDisplayEGSpectator_OnCursorObjectFocused"
| <sqf>params ["_object"];</sqf>
| <sqf>params ["_object"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "RscDisplayEGSpectator_OnCursorObjectUnfocused"
| "RscDisplayEGSpectator_OnCursorObjectUnfocused"
| <sqf>params ["_object"];</sqf>
| <sqf>params ["_object"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "RscDisplayEGSpectator_OnFocusChanged"
| "RscDisplayEGSpectator_OnFocusChanged"
| <sqf>params ["_newFocus"];</sqf>
| <sqf>params ["_newFocus"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "RscDisplayEGSpectator_OnUiVisibilityChanged"
| "RscDisplayEGSpectator_OnUiVisibilityChanged"
| <sqf>params ["_isVisible"];</sqf>
| <sqf>params ["_isVisible"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "RscDisplayEGSpectator_MapStateChanged"
| "RscDisplayEGSpectator_MapStateChanged"
| <sqf>params ["_isMapVisible"];</sqf>
| <sqf>params ["_isMapVisible"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | Respawn Display
! colspan="3" |
=== Respawn Display ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "RscDisplayRespawnKeyDown"
| "RscDisplayRespawnKeyDown"
| <sqf>params ["_display", "_keyCode", "_shift", "_ctrl", "_alt"];</sqf>
| <sqf>params ["_display", "_keyCode", "_shift", "_ctrl", "_alt"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | [[BIS_fnc_animateFlag]]
! colspan="3" |
=== [[BIS_fnc_animateFlag]] ===
|-
|-
| <sqf>_flag</sqf>
| <sqf>_flag</sqf>
| "FlagAnimationDone"
| "FlagAnimationDone"
| <sqf>params ["_flag", "_phaseEnd"];</sqf>
| <sqf>params ["_flag", "_phaseEnd"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | Module Trident
! colspan="3" |
=== Module Trident ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "BIS_fnc_moduleTrident_updated"
| "BIS_fnc_moduleTrident_updated"
| <sqf>params ["_sideA", "_sideB", "_areFriendly"];</sqf>
| <sqf>params ["_sideA", "_sideB", "_areFriendly"];</sqf>
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | [[BIS_fnc_initInspectable]]
! colspan="3" |
=== [[BIS_fnc_initInspectable]] ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
Line 452: Line 415:
| <sqf>params ["_object", "_texture", "_text", "_sound", "_textureRatio"];</sqf>
| <sqf>params ["_object", "_texture", "_text", "_sound", "_textureRatio"];</sqf>
any data, shown as used by the [[Arma 3: Leaflets|Leaflets]] system
any data, shown as used by the [[Arma 3: Leaflets|Leaflets]] system
|-
|- class="align-left"
|- class="align-left"
! colspan="3" | BIS_fnc_priorityQueue* system
! colspan="3" |
=== BIS_fnc_priorityQueue* system ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
| "BIS_onQueue%1Pop" where %1 is ID returned from [[BIS_fnc_priorityQueue_Init]]
| "BIS_onQueue%1Pop" where %1 is ID returned from [[BIS_fnc_priorityQueue_Init]]
| <sqf>params ["_handle"];</sqf>
| <sqf>params ["_handle"];</sqf>
|-
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
Line 465: Line 427:
| <sqf>params ["_handle"];</sqf>
| <sqf>params ["_handle"];</sqf>
|- class="align-left"
|- class="align-left"
! colspan="3" | Display is opened or closed via [[BIS_fnc_initDisplay]] {{GVI|arma3|2.04}}
! colspan="3" |
=== Display is opened or closed via [[BIS_fnc_initDisplay]] {{GVI|arma3|2.04}} ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
Line 475: Line 438:
| <sqf>params ["_display", "_class"];</sqf>
| <sqf>params ["_display", "_class"];</sqf>
|- class="align-left"
|- class="align-left"
! colspan="3" | Probing Beam (enoch)
! colspan="3" |
=== Probing Beam (enoch) ===
|-
|-
| <sqf>missionNamespace</sqf>
| <sqf>missionNamespace</sqf>
Line 484: Line 448:
| "probingEnded"
| "probingEnded"
| <sqf>params ["_data", "_isEnded"];</sqf>
| <sqf>params ["_data", "_isEnded"];</sqf>
|-
|}
|}


[[Category: Event Handlers]]
[[Category: Event Handlers]]

Revision as of 17:28, 17 March 2023

Scripted Event Handlers are triggered by some of BI's modules and functions. When triggered any code registered for one of these events via BIS_fnc_addScriptedEventHandler will be executed. All the events exists as variables within a namespace, whether this is one of the main Namespaces like missionNamespace or uiNamespace or it could be a specific namespace like a Group or Object etc. The event also has a set of parameters passed to the executed code. You can even implement your own scripted eventHandlers by using BIS_fnc_callScriptedEventHandler. For all other available Event Handlers, see Arma 3: Event Handlers.


Functions


Examples

Create

waitUntil { sleep 1; player distance _GG < 10 }; [missionNamespace, "localPlayerNearFourArmedRobot", [player, _GG]] call BIS_fnc_callScriptedEventHandler;

Subscribe

[missionNamespace, "localPlayerNearFourArmedRobot", { hint "Hello there"; }] call BIS_fnc_addScriptedEventHandler;

[missionNamespace, "arsenalOpened", { hint "Player opened the Arsenal"; // hint message to the player when he opens the Arsenal }] call BIS_fnc_addScriptedEventHandler;


Events

This is a list of all available scripted events that exist through BI's functions and modules. Each event is listed under the system that calls them whether this be a specific function or a module. List last updated for Arma 3 logo black.png2.10

Event namespace Event name Event passed parameters

Player opens pause menu

"OnGameInterrupt"
params ["_display"];

Player exits Game Options menu

"OnGameOptionsExited" Arma 3 logo black.png2.02
params ["_okButtonPressed"];

Saving of the game, scripted or manual

"OnSaveGame" N/A

teamSwitchedScript.sqs

"teamSwitched"
params ["_originalUnit", "_switchToUnit"];

BIS_fnc_packStaticWeapon

_group
"StaticWeaponPacked"
params ["_group", "_leader", "_gunner", "_assistant", "_weaponBag", "_baseBag"];

BIS_fnc_unpackStaticWeapon

_group
"StaticWeaponUnpacked"
params ["_group", "_leader", "_gunner", "_assistant", "_weapon"];

Module Timeline

_timeline
"finished"
params ["_timeline"];
_timeline
"played" N/A
_timeline
"looped"
params ["_timeline"];

Module Rich Curve Key

_curKey "reached"
params ["_curKey"];

BIS_fnc_kbTellLocal

"BIS_fnc_kbTellLocal_played"
params ["_from", "_to", "_sentence", "_channel"];

Module Game Master (Zeus)

_curator
"curatorGroupPlaced"
params ["_group"];
_curator
"curatorObjectPlaced"
params ["_object"];
_curator
"curatorUnitAssigned"
params ["_curator", "_player"];

BIS_fnc_playVideo

"BIS_fnc_playVideo_started"
params ["_video"];
"BIS_fnc_playVideo_stopped"
params ["_video"];

BIS_fnc_addScriptedEventHandler

"ScriptedEventHandlerAdded"
params ["_namespace", "_name", "_handlerID"];

BIS_fnc_removeScriptedEventHandler

"ScriptedEventHandlerRemoved"
params ["_namespace", "_name", "_handlerID"];

BIS_fnc_removeAllScriptedEventHandlers

"ScriptedEventHandlerRemoved"
params ["_namespace", "_name", "_handlerID"];

BIS_fnc_respawnTickets

"respawnTicketsExhausted"
params ["_target"];

BIS_fnc_bleedTickets

"dominantSideChanged"
params ["_dominantSide", "_dominantSideOld", "_sides"];

BIS_fnc_arsenal

"arsenalPreOpen" Arma 3 logo black.png2.08 Fires just before Arsenal display is created
params ["_missionDisplay", "_center"];
"arsenalOpened"
params ["_display", "_toggleSpace"];
"arsenalClosed"
params ["_displayNull", "_toggleSpace"];

BIS_fnc_garage

"garageOpened"
params ["_display", "_toggleSpace"];
"garageClosed"
params ["_displayNull", "_toggleSpace"];

BIS_fnc_initIntelObject

_object "intelObjectFound"
params ["_object", "_foundBy"];
_curator
"intelObjectFound"
params ["_curator", "_foundBy", "_object"];

BIS_fnc_EGSpectatorCamera

"EGSpectator_OnCameraModeChanged"
params ["_newMode"];

Module Vehicle Respawn

"respawn"
params ["_newVeh", "_veh"];

Module Sector

_sector
"ownerChanged"
params ["_sector", "_owner", "_ownerOld"];

Module Curator RemoteControl

_curator
"curatorObjectRemoteControlled"
params ["_curator", "_player", "_unit", "_isRemoteControlled"];
  • _isRemoteControlled is true when entering remote control, false when exiting

Module Spawn AI: Sector Tactic

"bis_groundSupport_groupSpawned"
params ["_bis_groundSupport_groupSpawned", "_group", "_side"];
"bis_groundSupport_wiped"
params ["_bis_groundSupport_wiped", "_group"];
"bis_groundSupport_inEnemySector"
params ["_bis_groundSupport_inEnemySector", "_group"];
"bis_groundSupport_destinationReached"
params ["_bis_groundSupport_destinationReached", "_group"];
"bis_groundSupport_groupTypeChanged"
params ["_bis_groundSupport_groupTypeChanged", "_group", "_type", "_currentType"];
"bis_groundSupport_decimated"
params ["_bis_groundSupport_decimated", "_group"];
"bis_groundSupport_farFromDestination"
params ["_bis_groundSupport_farFromDestination", "_group"];
"bis_groundSupport_needTransport"
params ["_bis_groundSupport_needTransport", "_group"];
"bis_groundSupport_joined"
params ["_bis_groundSupport_joined", "_group", "_transportGroup"];
"bis_groundSupport_closeToDestination"
params ["_bis_groundSupport_closeToDestination", "_group"];
"bis_groundSupport_needEvac"
params ["_bis_groundSupport_needEvac", "_group"];
"bis_groundSupport_needAmmo"
params ["_bis_groundSupport_needAmmo", "_group"];
"bis_groundSupport_needSupport"
params ["_bis_groundSupport_needSupport", "_group", "_reportedVehicle"];
"bis_groundSupport_boarded"
params ["_bis_groundSupport_boarded", "_group", "_transport"];
"bis_groundSupport_transportStarted"
params ["_bis_groundSupport_transportStarted", "_group", "_transport"];
"bis_groundSupport_transportEnded"
params ["_bis_groundSupport_transportEnded", "_group", "_transport"];
"bis_groundSupport_transportAborted"
params ["_bis_groundSupport_transportAborted", "_group", "_transport"];
"bis_groundSupport_disembarked"
params ["_bis_groundSupport_disembarked", "_group", "_transport"];

Module End Game

"EndGame_OnStageChanged"
params ["_stage", "_side"];
"EndGame_OnStartGameObjectiveCompleted"
params ["_side"];
"EndGame_OnObjectiveStateChanged"
params ["_objective", "_side", "_newState"];
"EndGame_OnObjectiveCompleted"
params ["_objective"];
"EndGame_OnObjectiveEnded"
params ["_objective"];
"EndGame_OnDownloadCompleted"
params ["_side", "_isUpload"];
"EndGame_Ended"
params ["_winnerSide", "_loserSide", "_isDraw"];
"onUploadStateChanged"
params ["_side"]; // can be nil
"onPickupInfoChanged"
params ["_BIS_hvt_pickupInfo"];

EG Spectator Display

"RscDisplayEGSpectator_OnCursorObjectFocused"
params ["_object"];
"RscDisplayEGSpectator_OnCursorObjectUnfocused"
params ["_object"];
"RscDisplayEGSpectator_OnFocusChanged"
params ["_newFocus"];
"RscDisplayEGSpectator_OnUiVisibilityChanged"
params ["_isVisible"];
"RscDisplayEGSpectator_MapStateChanged"
params ["_isMapVisible"];

Respawn Display

"RscDisplayRespawnKeyDown"
params ["_display", "_keyCode", "_shift", "_ctrl", "_alt"];

BIS_fnc_animateFlag

_flag
"FlagAnimationDone"
params ["_flag", "_phaseEnd"];

Module Trident

"BIS_fnc_moduleTrident_updated"
params ["_sideA", "_sideB", "_areFriendly"];

BIS_fnc_initInspectable

"objectInspected"
params ["_object", "_texture", "_text", "_sound", "_textureRatio"];

any data, shown as used by the Leaflets system

BIS_fnc_priorityQueue* system

"BIS_onQueue%1Pop" where %1 is ID returned from BIS_fnc_priorityQueue_Init
params ["_handle"];
"BIS_onQueue%1Push" where %1 is ID returned from BIS_fnc_priorityQueue_Init
params ["_handle"];

Display is opened or closed via BIS_fnc_initDisplay Arma 3 logo black.png2.04

"OnDisplayRegistered"
params ["_display", "_class"];
"OnDisplayUnregistered"
params ["_display", "_class"];

Probing Beam (enoch)

"probingStarted"
params ["_cursorTarget", "_data"];
"probingEnded"
params ["_data", "_isEnded"];