Scripted Event Handlers – Arma 3
Lou Montana (talk | contribs) m (Some wiki formatting) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 16: | Line 16: | ||
== Examples == | == Examples == | ||
=== Subscribe === | === Subscribe === | ||
Line 36: | Line 29: | ||
hint "Player opened the Arsenal"; // hint message to the player when he opens the Arsenal | hint "Player opened the Arsenal"; // hint message to the player when he opens the Arsenal | ||
}] call BIS_fnc_addScriptedEventHandler; | }] call BIS_fnc_addScriptedEventHandler; | ||
</sqf> | |||
=== Trigger === | |||
<sqf> | |||
waitUntil { sleep 1; player distance _GG < 10 }; | |||
[missionNamespace, "localPlayerNearFourArmedRobot", [player, _GG]] call BIS_fnc_callScriptedEventHandler; | |||
</sqf> | </sqf> | ||
Line 44: | Line 44: | ||
Each event is listed under the system that calls them whether this be a specific function or a module. List last updated for {{GVI|arma3|2.10}} | Each event is listed under the system that calls them whether this be a specific function or a module. List last updated for {{GVI|arma3|2.10}} | ||
{| class="wikitable" | {| class="wikitable align-left" | ||
! Event namespace | ! Event namespace | ||
! Event name | ! Event name | ||
! Event passed parameters | ! Event passed parameters | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== EG Spectator Display === | === EG Spectator Display === | ||
Line 73: | Line 73: | ||
| <sqf>params ["_isMapVisible"];</sqf> | | <sqf>params ["_isMapVisible"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== Player opens pause menu === | === Player opens pause menu === | ||
Line 81: | Line 81: | ||
| <sqf>params ["_display"];</sqf> | | <sqf>params ["_display"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== Player exits Game Options menu === | === Player exits Game Options menu === | ||
Line 89: | Line 89: | ||
| <sqf>params ["_okButtonPressed"];</sqf> | | <sqf>params ["_okButtonPressed"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== Probing Beam (enoch) === | === Probing Beam (enoch) === | ||
Line 101: | Line 101: | ||
| <sqf>params ["_data", "_isEnded"];</sqf> | | <sqf>params ["_data", "_isEnded"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== Respawn Display === | === Respawn Display === | ||
Line 109: | Line 109: | ||
| <sqf>params ["_display", "_keyCode", "_shift", "_ctrl", "_alt"];</sqf> | | <sqf>params ["_display", "_keyCode", "_shift", "_ctrl", "_alt"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== Saving of the game, scripted or manual === | === Saving of the game, scripted or manual === | ||
Line 117: | Line 117: | ||
| {{n/a}} | | {{n/a}} | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== [[Event Scripts#teamSwitchedScript.sqs|teamSwitchedScript.sqs]] === | === [[Event Scripts#teamSwitchedScript.sqs|teamSwitchedScript.sqs]] === | ||
Line 125: | Line 125: | ||
| <sqf>params ["_originalUnit", "_switchToUnit"];</sqf> | | <sqf>params ["_originalUnit", "_switchToUnit"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== [[BIS_fnc_addScriptedEventHandler]] === | === [[BIS_fnc_addScriptedEventHandler]] === | ||
Line 133: | Line 133: | ||
| <sqf>params ["_namespace", "_name", "_handlerID"];</sqf> | | <sqf>params ["_namespace", "_name", "_handlerID"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== [[BIS_fnc_animateFlag]] === | === [[BIS_fnc_animateFlag]] === | ||
Line 141: | Line 141: | ||
| <sqf>params ["_flag", "_phaseEnd"];</sqf> | | <sqf>params ["_flag", "_phaseEnd"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== [[BIS_fnc_arsenal]] === | === [[BIS_fnc_arsenal]] === | ||
Line 159: | Line 159: | ||
* _toggleSpace: [[Boolean]] - <sqf inline>uiNamespace getVariable ["bis_fnc_arsenal_toggleSpace", false]];</sqf> | * _toggleSpace: [[Boolean]] - <sqf inline>uiNamespace getVariable ["bis_fnc_arsenal_toggleSpace", false]];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== [[BIS_fnc_bleedTickets]] === | === [[BIS_fnc_bleedTickets]] === | ||
Line 167: | Line 167: | ||
| <sqf>params ["_dominantSide", "_dominantSideOld", "_sides"];</sqf> | | <sqf>params ["_dominantSide", "_dominantSideOld", "_sides"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== [[BIS_fnc_EGSpectatorCamera]] === | === [[BIS_fnc_EGSpectatorCamera]] === | ||
Line 175: | Line 175: | ||
| <sqf>params ["_newMode"];</sqf> | | <sqf>params ["_newMode"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== [[BIS_fnc_garage]] === | === [[BIS_fnc_garage]] === | ||
Line 188: | Line 188: | ||
* _toggleSpace: [[Boolean]] - <sqf inline>uiNamespace getVariable ["bis_fnc_arsenal_toggleSpace", false]];</sqf> | * _toggleSpace: [[Boolean]] - <sqf inline>uiNamespace getVariable ["bis_fnc_arsenal_toggleSpace", false]];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
{{ArgTitle|3|[[BIS_fnc_initDisplay]]|{{GVI|arma3|2.04}}}} | {{ArgTitle|3|[[BIS_fnc_initDisplay]]|{{GVI|arma3|2.04}}}} | ||
Line 200: | Line 200: | ||
| <sqf>params ["_display", "_class"];</sqf> | | <sqf>params ["_display", "_class"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== [[BIS_fnc_initInspectable]] === | === [[BIS_fnc_initInspectable]] === | ||
Line 209: | Line 209: | ||
any data, shown as used by the [[Arma 3: Leaflets|Leaflets]] system | any data, shown as used by the [[Arma 3: Leaflets|Leaflets]] system | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== [[BIS_fnc_initIntelObject]] === | === [[BIS_fnc_initIntelObject]] === | ||
Line 221: | Line 221: | ||
| <sqf>params ["_curator", "_foundBy", "_object"];</sqf> | | <sqf>params ["_curator", "_foundBy", "_object"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== [[BIS_fnc_kbTellLocal]] === | === [[BIS_fnc_kbTellLocal]] === | ||
Line 229: | Line 229: | ||
| <sqf>params ["_from", "_to", "_sentence", "_channel"];</sqf> | | <sqf>params ["_from", "_to", "_sentence", "_channel"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== [[BIS_fnc_packStaticWeapon]] === | === [[BIS_fnc_packStaticWeapon]] === | ||
Line 237: | Line 237: | ||
| <sqf>params ["_group", "_leader", "_gunner", "_assistant", "_weaponBag", "_baseBag"];</sqf> | | <sqf>params ["_group", "_leader", "_gunner", "_assistant", "_weaponBag", "_baseBag"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== [[BIS_fnc_playVideo]] === | === [[BIS_fnc_playVideo]] === | ||
Line 249: | Line 249: | ||
| <sqf>params ["_video"];</sqf> | | <sqf>params ["_video"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== BIS_fnc_priorityQueue* system === | === BIS_fnc_priorityQueue* system === | ||
Line 261: | Line 261: | ||
| <sqf>params ["_handle"];</sqf> | | <sqf>params ["_handle"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== [[BIS_fnc_removeAllScriptedEventHandlers]] === | === [[BIS_fnc_removeAllScriptedEventHandlers]] === | ||
Line 269: | Line 269: | ||
| <sqf>params ["_namespace", "_name", "_handlerID"];</sqf> | | <sqf>params ["_namespace", "_name", "_handlerID"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== [[BIS_fnc_removeScriptedEventHandler]] === | === [[BIS_fnc_removeScriptedEventHandler]] === | ||
Line 277: | Line 277: | ||
| <sqf>params ["_namespace", "_name", "_handlerID"];</sqf> | | <sqf>params ["_namespace", "_name", "_handlerID"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== [[BIS_fnc_respawnTickets]] === | === [[BIS_fnc_respawnTickets]] === | ||
Line 285: | Line 285: | ||
| <sqf>params ["_target"];</sqf> | | <sqf>params ["_target"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== [[BIS_fnc_unpackStaticWeapon]] === | === [[BIS_fnc_unpackStaticWeapon]] === | ||
Line 293: | Line 293: | ||
| <sqf>params ["_group", "_leader", "_gunner", "_assistant", "_weapon"];</sqf> | | <sqf>params ["_group", "_leader", "_gunner", "_assistant", "_weapon"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== Module Curator RemoteControl === | === Module Curator RemoteControl === | ||
Line 302: | Line 302: | ||
* _isRemoteControlled is [[true]] when entering remote control, [[false]] when exiting | * _isRemoteControlled is [[true]] when entering remote control, [[false]] when exiting | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== Module End Game === | === Module End Game === | ||
Line 342: | Line 342: | ||
| <sqf>params ["_BIS_hvt_pickupInfo"];</sqf> | | <sqf>params ["_BIS_hvt_pickupInfo"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== Module Game Master (Zeus) === | === Module Game Master (Zeus) === | ||
Line 358: | Line 358: | ||
| <sqf>params ["_curator", "_player"];</sqf> | | <sqf>params ["_curator", "_player"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== Module Rich Curve Key === | === Module Rich Curve Key === | ||
Line 366: | Line 366: | ||
| <sqf>params ["_curKey"];</sqf> | | <sqf>params ["_curKey"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== Module Sector === | === Module Sector === | ||
Line 374: | Line 374: | ||
| <sqf>params ["_sector", "_owner", "_ownerOld"];</sqf> | | <sqf>params ["_sector", "_owner", "_ownerOld"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== Module Spawn AI: Sector Tactic === | === Module Spawn AI: Sector Tactic === | ||
Line 450: | Line 450: | ||
| <sqf>params ["_bis_groundSupport_disembarked", "_group", "_transport"];</sqf> | | <sqf>params ["_bis_groundSupport_disembarked", "_group", "_transport"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== Module Timeline === | === Module Timeline === | ||
Line 466: | Line 466: | ||
| <sqf>params ["_timeline"];</sqf> | | <sqf>params ["_timeline"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== Module Trident === | === Module Trident === | ||
Line 474: | Line 474: | ||
| <sqf>params ["_sideA", "_sideB", "_areFriendly"];</sqf> | | <sqf>params ["_sideA", "_sideB", "_areFriendly"];</sqf> | ||
|- | |- | ||
! colspan="3" | | ! colspan="3" | | ||
=== Module Vehicle Respawn === | === Module Vehicle Respawn === |
Revision as of 16:37, 10 June 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
- BIS_fnc_addScriptedEventHandler
- BIS_fnc_removeScriptedEventHandler
- BIS_fnc_removeAllScriptedEventHandlers
- BIS_fnc_callScriptedEventHandler
Examples
Subscribe
Trigger
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 2.10
Event namespace | Event name | Event passed parameters |
---|---|---|
EG Spectator Display | ||
"RscDisplayEGSpectator_OnCursorObjectFocused" | ||
"RscDisplayEGSpectator_OnCursorObjectUnfocused" | ||
"RscDisplayEGSpectator_OnFocusChanged" | ||
"RscDisplayEGSpectator_OnUiVisibilityChanged" | ||
"RscDisplayEGSpectator_MapStateChanged" | ||
| ||
"OnGameInterrupt" | ||
| ||
"OnGameOptionsExited" 2.02 | ||
Probing Beam (enoch) | ||
"probingStarted" | ||
"probingEnded" | ||
Respawn Display | ||
"RscDisplayRespawnKeyDown" | ||
Saving of the game, scripted or manual | ||
"OnSaveGame" | N/A | |
teamSwitchedScript.sqs | ||
"teamSwitched" | ||
BIS_fnc_addScriptedEventHandler | ||
"ScriptedEventHandlerAdded" | ||
BIS_fnc_animateFlag | ||
_flag |
"FlagAnimationDone" | |
BIS_fnc_arsenal | ||
"arsenalPreOpen" 2.08 Fires just before Arsenal display is created | ||
"arsenalOpened" |
| |
"arsenalClosed" |
| |
BIS_fnc_bleedTickets | ||
"dominantSideChanged" | ||
BIS_fnc_EGSpectatorCamera | ||
"EGSpectator_OnCameraModeChanged" | ||
BIS_fnc_garage | ||
"garageOpened" | ||
"garageClosed" |
| |
"OnDisplayRegistered" | ||
"OnDisplayUnregistered" | ||
BIS_fnc_initInspectable | ||
"objectInspected" | any data, shown as used by the Leaflets system | |
BIS_fnc_initIntelObject | ||
_object | "intelObjectFound" | |
_curator |
"intelObjectFound" | |
BIS_fnc_kbTellLocal | ||
"BIS_fnc_kbTellLocal_played" | ||
BIS_fnc_packStaticWeapon | ||
_group |
"StaticWeaponPacked" | |
BIS_fnc_playVideo | ||
"BIS_fnc_playVideo_started" | ||
"BIS_fnc_playVideo_stopped" | ||
BIS_fnc_priorityQueue* system | ||
"BIS_onQueue%1Pop" where %1 is ID returned from BIS_fnc_priorityQueue_Init | ||
"BIS_onQueue%1Push" where %1 is ID returned from BIS_fnc_priorityQueue_Init | ||
BIS_fnc_removeAllScriptedEventHandlers | ||
"ScriptedEventHandlerRemoved" | ||
BIS_fnc_removeScriptedEventHandler | ||
"ScriptedEventHandlerRemoved" | ||
BIS_fnc_respawnTickets | ||
"respawnTicketsExhausted" | ||
BIS_fnc_unpackStaticWeapon | ||
_group |
"StaticWeaponUnpacked" | |
Module Curator RemoteControl | ||
_curator |
"curatorObjectRemoteControlled" | |
Module End Game | ||
"EndGame_OnStageChanged" | ||
"EndGame_OnStartGameObjectiveCompleted" | ||
"EndGame_OnObjectiveStateChanged" | ||
"EndGame_OnObjectiveCompleted" | ||
"EndGame_OnObjectiveEnded" | ||
"EndGame_OnDownloadCompleted" | ||
"EndGame_Ended" | ||
"onUploadStateChanged" | ||
"onPickupInfoChanged" | ||
Module Game Master (Zeus) | ||
_curator |
"curatorGroupPlaced" | |
_curator |
"curatorObjectPlaced" | |
_curator |
"curatorUnitAssigned" | |
Module Rich Curve Key | ||
_curKey | "reached" | |
Module Sector | ||
_sector |
"ownerChanged" | |
Module Spawn AI: Sector Tactic | ||
"bis_groundSupport_groupSpawned" | ||
"bis_groundSupport_wiped" | ||
"bis_groundSupport_inEnemySector" | ||
"bis_groundSupport_destinationReached" | ||
"bis_groundSupport_groupTypeChanged" | ||
"bis_groundSupport_decimated" | ||
"bis_groundSupport_farFromDestination" | ||
"bis_groundSupport_needTransport" | ||
"bis_groundSupport_joined" | ||
"bis_groundSupport_closeToDestination" | ||
"bis_groundSupport_needEvac" | ||
"bis_groundSupport_needAmmo" | ||
"bis_groundSupport_needSupport" | ||
"bis_groundSupport_boarded" | ||
"bis_groundSupport_transportStarted" | ||
"bis_groundSupport_transportEnded" | ||
"bis_groundSupport_transportAborted" | ||
"bis_groundSupport_disembarked" | ||
Module Timeline | ||
_timeline |
"finished" | |
_timeline |
"played" | N/A |
_timeline |
"looped" | |
Module Trident | ||
"BIS_fnc_moduleTrident_updated" | ||
Module Vehicle Respawn | ||
"respawn" |