Arma 3: Scripted Event Handlers
- Also known as Arma 3: Event Handlers/ScriptedEventHandlers
Topic · Markdown · JSON · original wiki page
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
- BIS_fnc_addScriptedEventHandler
- BIS_fnc_removeScriptedEventHandler
- BIS_fnc_removeAllScriptedEventHandlers
- BIS_fnc_callScriptedEventHandler
Examples
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;
Trigger
waitUntil { sleep 1; player distance _GG < 10 };
[missionNamespace, "localPlayerNearFourArmedRobot", [player, _GG]] call BIS_fnc_callScriptedEventHandler;
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 v2.10
| Event namespace | Event name | Event passed parameters |
|---|---|---|
| EG Spectator Display | ||
missionNamespace |
"RscDisplayEGSpectator_OnCursorObjectFocused" | params ["_object"]; |
missionNamespace |
"RscDisplayEGSpectator_OnCursorObjectUnfocused" | params ["_object"]; |
missionNamespace |
"RscDisplayEGSpectator_OnFocusChanged" | params ["_newFocus"]; |
missionNamespace |
"RscDisplayEGSpectator_OnUiVisibilityChanged" | params ["_isVisible"]; |
missionNamespace |
"RscDisplayEGSpectator_MapStateChanged" | params ["_isMapVisible"]; |
| Player opens pause menu | ||
missionNamespace |
"OnGameInterrupt" | params ["_display"]; |
| Player exits Game Options menu | ||
missionNamespace |
"OnGameOptionsExited" Arma 3 v2.02 | params ["_okButtonPressed"]; |
| Probing Beam (enoch) | ||
missionNamespace |
"probingStarted" | params ["_cursorTarget", "_data"]; |
missionNamespace |
"probingEnded" | params ["_data", "_isEnded"]; |
| Respawn Display | ||
missionNamespace |
"RscDisplayRespawnKeyDown" | params ["_display", "_keyCode", "_shift", "_ctrl", "_alt"]; |
| Saving of the game, scripted or manual | ||
missionNamespace |
"OnSaveGame" | N/A |
| teamSwitchedScript.sqs | ||
missionNamespace |
"teamSwitched" | params ["_originalUnit", "_switchToUnit"]; |
| BIS_fnc_addScriptedEventHandler | ||
missionNamespace |
"ScriptedEventHandlerAdded" | params ["_namespace", "_name", "_handlerID"]; |
| BIS_fnc_animateFlag | ||
_flag |
"FlagAnimationDone" | params ["_flag", "_phaseEnd"]; |
| BIS_fnc_arsenal | ||
missionNamespace |
"arsenalPreOpen" Arma 3 v2.08 Fires just before Arsenal display is created | params ["_missionDisplay", "_center"]; |
missionNamespace |
"arsenalOpened" | params ["_display", "_toggleSpace"];- _toggleSpace: Boolean - uiNamespace getVariable ["bis_fnc_arsenal_toggleSpace", false]]; |
missionNamespace |
"arsenalClosed" | params ["_displayNull", "_toggleSpace"];- _toggleSpace: Boolean - uiNamespace getVariable ["bis_fnc_arsenal_toggleSpace", false]]; |
| BIS_fnc_bleedTickets | ||
missionNamespace |
"dominantSideChanged" | params ["_dominantSide", "_dominantSideOld", "_sides"]; |
| BIS_fnc_EGSpectatorCamera | ||
missionNamespace |
"EGSpectator_OnCameraModeChanged" | params ["_newMode"]; |
| BIS_fnc_garage | ||
missionNamespace |
"garageOpened" | params ["_display", "_toggleSpace"]; |
missionNamespace |
"garageClosed" | params ["_displayNull", "_toggleSpace"];- _toggleSpace: Boolean - uiNamespace getVariable ["bis_fnc_arsenal_toggleSpace", false]]; |
| BIS_fnc_initDisplay (Arma 3 v2.04) | ||
missionNamespace |
"OnDisplayRegistered" | params ["_display", "_class"]; |
missionNamespace |
"OnDisplayUnregistered" | params ["_display", "_class"]; |
| BIS_fnc_initInspectable | ||
missionNamespace |
"objectInspected" | params ["_object", "_texture", "_text", "_sound", "_textureRatio"];any data, shown as used by the Leaflets system |
| BIS_fnc_initIntelObject | ||
| _object | "intelObjectFound" | params ["_object", "_foundBy"]; |
_curator |
"intelObjectFound" | params ["_curator", "_foundBy", "_object"]; |
| BIS_fnc_kbTellLocal | ||
missionNamespace |
"BIS_fnc_kbTellLocal_played" | params ["_from", "_to", "_sentence", "_channel"]; |
| BIS_fnc_packStaticWeapon | ||
_group |
"StaticWeaponPacked" | params ["_group", "_leader", "_gunner", "_assistant", "_weaponBag", "_baseBag"]; |
| BIS_fnc_playVideo | ||
missionNamespace |
"BIS_fnc_playVideo_started" | params ["_video"]; |
missionNamespace |
"BIS_fnc_playVideo_stopped" | params ["_video"]; |
| BIS_fnc_priorityQueue system* | ||
missionNamespace |
"BIS_onQueue%1Pop" where %1 is ID returned from BIS_fnc_priorityQueue_Init | params ["_handle"]; |
missionNamespace |
"BIS_onQueue%1Push" where %1 is ID returned from BIS_fnc_priorityQueue_Init | params ["_handle"]; |
| BIS_fnc_removeAllScriptedEventHandlers | ||
missionNamespace |
"ScriptedEventHandlerRemoved" | params ["_namespace", "_name", "_handlerID"]; |
| BIS_fnc_removeScriptedEventHandler | ||
missionNamespace |
"ScriptedEventHandlerRemoved" | params ["_namespace", "_name", "_handlerID"]; |
| BIS_fnc_respawnTickets | ||
missionNamespace |
"respawnTicketsExhausted" | params ["_target"]; |
| BIS_fnc_unpackStaticWeapon | ||
_group |
"StaticWeaponUnpacked" | params ["_group", "_leader", "_gunner", "_assistant", "_weapon"]; |
| Structures | ||
missionNamespace |
"StructureDamaged" Arma 3 v2.22 | params ["_structure", "_shot", "_position", "_velocity", "_ammo", "_explosive", "_indirectHit", "_invArmor", "_explPow", "_damage"]; |
missionNamespace |
"StructureDestroyed" Arma 3 v2.22 | params ["_structure", "_killer", "_instigator", "_useEffects", "_shot", "_real"]; |
| Module Curator RemoteControl | ||
_curator |
"curatorObjectRemoteControlled" | params ["_curator", "_player", "_unit", "_isRemoteControlled"];- _isRemoteControlled is true when entering remote control, false when exiting |
| Module End Game | ||
missionNamespace |
"EndGame_OnStageChanged" | params ["_stage", "_side"]; |
missionNamespace |
"EndGame_OnStartGameObjectiveCompleted" | params ["_side"]; |
missionNamespace |
"EndGame_OnObjectiveStateChanged" | params ["_objective", "_side", "_newState"]; |
missionNamespace |
"EndGame_OnObjectiveCompleted" | params ["_objective"]; |
missionNamespace |
"EndGame_OnObjectiveEnded" | params ["_objective"]; |
missionNamespace |
"EndGame_OnDownloadCompleted" | params ["_side", "_isUpload"]; |
missionNamespace |
"EndGame_Ended" | params ["_winnerSide", "_loserSide", "_isDraw"]; |
missionNamespace |
"onUploadStateChanged" | params ["_side"]; // can be nil |
missionNamespace |
"onPickupInfoChanged" | params ["_BIS_hvt_pickupInfo"]; |
| Module Game Master (Zeus) | ||
_curator |
"curatorGroupPlaced" | params ["_group"]; |
_curator |
"curatorObjectPlaced" | params ["_object"]; |
_curator |
"curatorUnitAssigned" | params ["_curator", "_player"]; |
| Module Rich Curve Key | ||
| _curKey | "reached" | params ["_curKey"]; |
| Module Sector | ||
_sector |
"ownerChanged" | params ["_sector", "_owner", "_ownerOld"]; |
| Module Spawn AI: Sector Tactic | ||
missionNamespace |
"bis_groundSupport_groupSpawned" | params ["_bis_groundSupport_groupSpawned", "_group", "_side"]; |
missionNamespace |
"bis_groundSupport_wiped" | params ["_bis_groundSupport_wiped", "_group"]; |
missionNamespace |
"bis_groundSupport_inEnemySector" | params ["_bis_groundSupport_inEnemySector", "_group"]; |
missionNamespace |
"bis_groundSupport_destinationReached" | params ["_bis_groundSupport_destinationReached", "_group"]; |
missionNamespace |
"bis_groundSupport_groupTypeChanged" | params ["_bis_groundSupport_groupTypeChanged", "_group", "_type", "_currentType"]; |
missionNamespace |
"bis_groundSupport_decimated" | params ["_bis_groundSupport_decimated", "_group"]; |
missionNamespace |
"bis_groundSupport_farFromDestination" | params ["_bis_groundSupport_farFromDestination", "_group"]; |
missionNamespace |
"bis_groundSupport_needTransport" | params ["_bis_groundSupport_needTransport", "_group"]; |
missionNamespace |
"bis_groundSupport_joined" | params ["_bis_groundSupport_joined", "_group", "_transportGroup"]; |
missionNamespace |
"bis_groundSupport_closeToDestination" | params ["_bis_groundSupport_closeToDestination", "_group"]; |
missionNamespace |
"bis_groundSupport_needEvac" | params ["_bis_groundSupport_needEvac", "_group"]; |
missionNamespace |
"bis_groundSupport_needAmmo" | params ["_bis_groundSupport_needAmmo", "_group"]; |
missionNamespace |
"bis_groundSupport_needSupport" | params ["_bis_groundSupport_needSupport", "_group", "_reportedVehicle"]; |
missionNamespace |
"bis_groundSupport_boarded" | params ["_bis_groundSupport_boarded", "_group", "_transport"]; |
missionNamespace |
"bis_groundSupport_transportStarted" | params ["_bis_groundSupport_transportStarted", "_group", "_transport"]; |
missionNamespace |
"bis_groundSupport_transportEnded" | params ["_bis_groundSupport_transportEnded", "_group", "_transport"]; |
missionNamespace |
"bis_groundSupport_transportAborted" | params ["_bis_groundSupport_transportAborted", "_group", "_transport"]; |
missionNamespace |
"bis_groundSupport_disembarked" | params ["_bis_groundSupport_disembarked", "_group", "_transport"]; |
| Module Timeline | ||
_timeline |
"finished" | params ["_timeline"]; |
_timeline |
"played" | N/A |
_timeline |
"looped" | params ["_timeline"]; |
| Module Trident | ||
missionNamespace |
"BIS_fnc_moduleTrident_updated" | params ["_sideA", "_sideB", "_areFriendly"]; |
| Module Vehicle Respawn | ||
missionNamespace |
"respawn" | params ["_newVeh", "_veh"]; |
| Spectrum Analyzer Device | ||
missionNamespace |
"SpectrumAnalyzerOpened" | params ["_display"]; |
missionNamespace |
"SpectrumAnalyzerClosed" | params ["_display"]; |
Arma 3 Contact Events
Note
This content is exclusive to the Arma 3 Contact Expansion.
- "antennaAdded"
- "antennaDeleted"
- "arsenalPreOpen"
- "behaviourChanged"
- "currentSignalChanged"
- "dangerZoneEntered"
- "dangerZoneExited"
- "diaryRecordSet"
- "dominantSideChanged"
- "gravitPulseHit"
- "gravitPulseRewarded"
- "handleCombat"
- "handleWarningShot"
- "moveToModelSpaceCompleted"
- "puzzleReset"
- "puzzleStepCompleted"
- "puzzleTerminated"
- "refresh"
- "respawnTicketsExhausted"
- "rotationChanged"
- "signalEnded"
- "signalScanned"
- "signalStartedPassive"
- "siteSpawned"
- "taskSet"
- "translationChanged"
- "transmittingEnded"
- "transmittingStarted"
- "wpPatrolEnded"
- "wpPatrolStarted"