Scripted Event Handlers – Arma 3
m (Added SEHs for enoch Probing Beam) |
Lou Montana (talk | contribs) (Add full example and params usage) |
||
Line 1: | Line 1: | ||
{{TOC|side}} | |||
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. | 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 [[Namespace]]s like [[missionNamespace]] or [[uiNamespace]] or it could be a specific namespace like a [[Group]] or [[Object]] etc. | All the events exists as variables within a namespace, whether this is one of the main [[Namespace]]s 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. | 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]]. | You can even implement your own scripted eventHandlers by using [[BIS_fnc_callScriptedEventHandler]]. | ||
For all other available Event Handlers, see [[Arma 3: | For all other available Event Handlers, see [[Arma 3: Event Handlers]]. | ||
== | == Functions == | ||
* [[BIS_fnc_addScriptedEventHandler]] | * [[BIS_fnc_addScriptedEventHandler]] | ||
Line 15: | Line 16: | ||
== Examples == | == Examples == | ||
=== Create === | |||
<sqf> | |||
waitUntil { sleep 1; player distance _GG < 10 }; | |||
[missionNamespace, "localPlayerNearFourArmedRobot", [player, _GG]] call BIS_fnc_callScriptedEventHandler; | |||
</sqf> | |||
=== Subscribe === | |||
<sqf> | |||
[missionNamespace, "localPlayerNearFourArmedRobot", { | |||
hint "Hello there"; | |||
}] call BIS_fnc_addScriptedEventHandler; | |||
</sqf> | |||
<sqf> | <sqf> | ||
Line 29: | Line 45: | ||
{| class="wikitable" | {| class="wikitable" | ||
! Event namespace | ! Event namespace | ||
! Event name | ! Event name | ||
! Event passed parameters | ! Event passed parameters | ||
|- class="align-left" | |||
! colspan="3" | Player opens pause menu | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| missionNamespace | |||
| "OnGameInterrupt" | | "OnGameInterrupt" | ||
| [_display] | | <sqf>params ["_display"];</sqf> | ||
|- | |- | ||
|- class="align-left" | |||
! colspan="3" | Player exits Game Options menu | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| missionNamespace | |||
| "OnGameOptionsExited" {{GVI|arma3|2.02}} | | "OnGameOptionsExited" {{GVI|arma3|2.02}} | ||
| [_okButtonPressed] | | <sqf>params ["_okButtonPressed"];</sqf> | ||
|- | |- | ||
|- class="align-left" | |||
! colspan="3" | Saving of the game, scripted or manual | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| missionNamespace | |||
| "OnSaveGame" | | "OnSaveGame" | ||
| {{n/a}} | | {{n/a}} | ||
|- | |- | ||
|- class="align-left" | |||
! colspan="3" | [[Event Scripts#teamSwitchedScript.sqs|teamSwitchedScript.sqs]] | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| missionNamespace | |||
| "teamSwitched" | | "teamSwitched" | ||
| [_originalUnit, _switchToUnit] | | <sqf>params ["_originalUnit", "_switchToUnit"];</sqf> | ||
|- | |- | ||
! colspan="3 | |- class="align-left" | ||
! colspan="3" | [[BIS_fnc_packStaticWeapon]] | |||
|- | |- | ||
| _group | | <sqf>_group</sqf> | ||
| "StaticWeaponPacked" | | "StaticWeaponPacked" | ||
| [_group, _leader, _gunner, _assistant, _weaponBag, _baseBag] | | <sqf>params ["_group", "_leader", "_gunner", "_assistant", "_weaponBag", "_baseBag"];</sqf> | ||
|- | |- | ||
! colspan="3 | |- class="align-left" | ||
! colspan="3" | [[BIS_fnc_unpackStaticWeapon]] | |||
|- | |- | ||
| _group | | <sqf>_group</sqf> | ||
| "StaticWeaponUnpacked" | | "StaticWeaponUnpacked" | ||
| [_group, _leader, _gunner, _assistant, _weapon] | | <sqf>params ["_group", "_leader", "_gunner", "_assistant", "_weapon"];</sqf> | ||
|- | |- | ||
|- class="align-left" | |||
! colspan="3" | Module Timeline | |||
|- | |- | ||
| <sqf>_timeline</sqf> | |||
| _timeline | |||
| "finished" | | "finished" | ||
| [_timeline] | | <sqf>params ["_timeline"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| _timeline | | <sqf>_timeline</sqf> | ||
| "played" | | "played" | ||
| {{n/a}} | | {{n/a}} | ||
|- | |- | ||
|- | |- | ||
| _timeline | | <sqf>_timeline</sqf> | ||
| "looped" | | "looped" | ||
| [_timeline] | | <sqf>params ["_timeline"];</sqf> | ||
|- | |- | ||
|- | |- class="align-left" | ||
! colspan="3 | ! colspan="3" | Module Rich Curve Key | ||
|- | |- | ||
| _curKey | | _curKey | ||
| "reached" | | "reached" | ||
| [_curKey] | | <sqf>params ["_curKey"];</sqf> | ||
|- | |- | ||
|- class="align-left" | |||
! colspan="3" | [[BIS_fnc_kbTellLocal]] | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| missionNamespace | |||
| "BIS_fnc_kbTellLocal_played" | | "BIS_fnc_kbTellLocal_played" | ||
| [_from, _to, _sentence, _channel] | | <sqf>params ["_from", "_to", "_sentence", "_channel"];</sqf> | ||
|- | |- | ||
|- class="align-left" | |||
! colspan="3" | Module Game Master (Zeus) | |||
|- | |- | ||
| <sqf>_curator</sqf> | |||
| _curator | |||
| "curatorGroupPlaced" | | "curatorGroupPlaced" | ||
| [_group] | | <sqf>params ["_group"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| _curator | | <sqf>_curator</sqf> | ||
| "curatorObjectPlaced" | | "curatorObjectPlaced" | ||
| [_object] | | <sqf>params ["_object"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| _curator | | <sqf>_curator</sqf> | ||
| "curatorUnitAssigned" | | "curatorUnitAssigned" | ||
| [_curator, _player] | | <sqf>params ["_curator", "_player"];</sqf> | ||
|- | |- | ||
|- class="align-left" | |||
! colspan="3" | [[BIS_fnc_playVideo]] | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| missionNamespace | |||
| "BIS_fnc_playVideo_started" | | "BIS_fnc_playVideo_started" | ||
| [_video] | | <sqf>params ["_video"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "BIS_fnc_playVideo_stopped" | | "BIS_fnc_playVideo_stopped" | ||
| [_video] | | <sqf>params ["_video"];</sqf> | ||
|- | |- | ||
|- class="align-left" | |||
! colspan="3" | [[BIS_fnc_addScriptedEventHandler]] | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| missionNamespace | |||
| "ScriptedEventHandlerAdded" | | "ScriptedEventHandlerAdded" | ||
| [_namespace, _name, _handlerID] | | <sqf>params ["_namespace", "_name", "_handlerID"];</sqf> | ||
|- | |- | ||
|- class="align-left" | |||
! colspan="3" | [[BIS_fnc_removeScriptedEventHandler]] | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| missionNamespace | |||
| "ScriptedEventHandlerRemoved" | | "ScriptedEventHandlerRemoved" | ||
| [_namespace, _name, _handlerID] | | <sqf>params ["_namespace", "_name", "_handlerID"];</sqf> | ||
|- | |- | ||
|- class="align-left" | |||
! colspan="3" | [[BIS_fnc_removeAllScriptedEventHandlers]] | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| missionNamespace | |||
| "ScriptedEventHandlerRemoved" | | "ScriptedEventHandlerRemoved" | ||
| [_namespace, _name, _handlerID] | | <sqf>params ["_namespace", "_name", "_handlerID"];</sqf> | ||
|- | |- | ||
|- class="align-left" | |||
! colspan="3" | [[BIS_fnc_respawnTickets]] | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| missionNamespace | |||
| "respawnTicketsExhausted" | | "respawnTicketsExhausted" | ||
| [_target] | | <sqf>params ["_target"];</sqf> | ||
|- | |- | ||
! colspan="3 | |- class="align-left" | ||
! colspan="3" | [[BIS_fnc_bleedTickets]] | |||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "dominantSideChanged" | | "dominantSideChanged" | ||
| [_dominantSide, _dominantSideOld, _sides] | | <sqf>params ["_dominantSide", "_dominantSideOld", "_sides"];</sqf> | ||
|- | |- | ||
! colspan="3 | |- class="align-left" | ||
! colspan="3" | BIS_fnc_arsenal | |||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "arsenalPreOpen" | | "arsenalPreOpen" {{GVI|arma3|2.08}} Fires just before Arsenal display is created | ||
| [_missionDisplay, _center] | | <sqf>params ["_missionDisplay", "_center"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "arsenalOpened" | | "arsenalOpened" | ||
| [_display, _toggleSpace] | | <sqf>params ["_display", "_toggleSpace"];</sqf> | ||
* _toggleSpace: [[Boolean]] - <sqf inline>uiNamespace getVariable ["bis_fnc_arsenal_toggleSpace", false]];</sqf> | |||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "arsenalClosed" | | "arsenalClosed" | ||
| [< | | <sqf>params ["_displayNull", "_toggleSpace"];</sqf> | ||
* _toggleSpace: [[Boolean]] - <sqf inline>uiNamespace getVariable ["bis_fnc_arsenal_toggleSpace", false]];</sqf> | |||
|- | |- | ||
|- class="align-left" | |||
! colspan="3" | [[BIS_fnc_garage]] | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| missionNamespace | |||
| "garageOpened" | | "garageOpened" | ||
| [_display, _toggleSpace] | | <sqf>params ["_display", "_toggleSpace"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "garageClosed" | | "garageClosed" | ||
| [ | | <sqf>params ["_displayNull", "_toggleSpace"];</sqf> | ||
* _toggleSpace: [[Boolean]] - <sqf inline>uiNamespace getVariable ["bis_fnc_arsenal_toggleSpace", false]];</sqf> | |||
|- | |- | ||
|- | |- class="align-left" | ||
! colspan="3 | ! colspan="3" | BIS_fnc_initIntelObject | ||
|- | |- | ||
| _object | | _object | ||
| "intelObjectFound" | | "intelObjectFound" | ||
| [_object, _foundBy] | | <sqf>params ["_object", "_foundBy"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| _curator | | <sqf>_curator</sqf> | ||
| "intelObjectFound" | | "intelObjectFound" | ||
| [_curator, _foundBy, _object] | | <sqf>params ["_curator", "_foundBy", "_object"];</sqf> | ||
|- | |- | ||
|- class="align-left" | |||
! colspan="3" | BIS_fnc_EGSpectatorCamera | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| missionNamespace | |||
| "EGSpectator_OnCameraModeChanged" | | "EGSpectator_OnCameraModeChanged" | ||
| [_newMode] | | <sqf>params ["_newMode"];</sqf> | ||
|- | |- | ||
|- class="align-left" | |||
! colspan="3" | Module Vehicle Respawn | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| missionNamespace | |||
| "respawn" | | "respawn" | ||
| [_newVeh, _veh] | | <sqf>params ["_newVeh", "_veh"];</sqf> | ||
|- | |- | ||
|- class="align-left" | |||
! colspan="3" | Module Sector | |||
|- | |- | ||
| <sqf>_sector</sqf> | |||
| _sector | |||
| "ownerChanged" | | "ownerChanged" | ||
| [_sector, _owner, _ownerOld] | | <sqf>params ["_sector", "_owner", "_ownerOld"];</sqf> | ||
|- | |- | ||
|- class="align-left" | |||
! colspan="3" | Module Curator RemoteControl | |||
|- | |- | ||
| <sqf>_curator</sqf> | |||
| _curator | |||
| "curatorObjectRemoteControlled" | | "curatorObjectRemoteControlled" | ||
| [_curator, _player, _unit, _isRemoteControlled] | | <sqf>params ["_curator", "_player", "_unit", "_isRemoteControlled"];</sqf> | ||
* _isRemoteControlled is [[true]] when entering remote control, [[false]] when exiting | |||
|- | |- | ||
! colspan="3 | |- class="align-left" | ||
! colspan="3" | Module Spawn AI: Sector Tactic | |||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "bis_groundSupport_groupSpawned" | | "bis_groundSupport_groupSpawned" | ||
| [" | | <sqf>params ["_bis_groundSupport_groupSpawned", "_group", "_side"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "bis_groundSupport_wiped" | | "bis_groundSupport_wiped" | ||
| [" | | <sqf>params ["_bis_groundSupport_wiped", "_group"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "bis_groundSupport_inEnemySector" | | "bis_groundSupport_inEnemySector" | ||
| [" | | <sqf>params ["_bis_groundSupport_inEnemySector", "_group"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "bis_groundSupport_destinationReached" | | "bis_groundSupport_destinationReached" | ||
| [" | | <sqf>params ["_bis_groundSupport_destinationReached", "_group"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "bis_groundSupport_groupTypeChanged" | | "bis_groundSupport_groupTypeChanged" | ||
| [" | | <sqf>params ["_bis_groundSupport_groupTypeChanged", "_group", "_type", "_currentType"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "bis_groundSupport_decimated" | | "bis_groundSupport_decimated" | ||
| [" | | <sqf>params ["_bis_groundSupport_decimated", "_group"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "bis_groundSupport_farFromDestination" | | "bis_groundSupport_farFromDestination" | ||
| [" | | <sqf>params ["_bis_groundSupport_farFromDestination", "_group"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "bis_groundSupport_needTransport" | | "bis_groundSupport_needTransport" | ||
| [" | | <sqf>params ["_bis_groundSupport_needTransport", "_group"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "bis_groundSupport_joined" | | "bis_groundSupport_joined" | ||
| [" | | <sqf>params ["_bis_groundSupport_joined", "_group", "_transportGroup"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "bis_groundSupport_closeToDestination" | | "bis_groundSupport_closeToDestination" | ||
| [" | | <sqf>params ["_bis_groundSupport_closeToDestination", "_group"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "bis_groundSupport_needEvac" | | "bis_groundSupport_needEvac" | ||
| [" | | <sqf>params ["_bis_groundSupport_needEvac", "_group"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "bis_groundSupport_needAmmo" | | "bis_groundSupport_needAmmo" | ||
| [" | | <sqf>params ["_bis_groundSupport_needAmmo", "_group"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "bis_groundSupport_needSupport" | | "bis_groundSupport_needSupport" | ||
| [" | | <sqf>params ["_bis_groundSupport_needSupport", "_group", "_reportedVehicle"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "bis_groundSupport_boarded" | | "bis_groundSupport_boarded" | ||
| [" | | <sqf>params ["_bis_groundSupport_boarded", "_group", "_transport"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "bis_groundSupport_transportStarted" | | "bis_groundSupport_transportStarted" | ||
| [" | | <sqf>params ["_bis_groundSupport_transportStarted", "_group", "_transport"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "bis_groundSupport_transportEnded" | | "bis_groundSupport_transportEnded" | ||
| [" | | <sqf>params ["_bis_groundSupport_transportEnded", "_group", "_transport"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "bis_groundSupport_transportAborted" | | "bis_groundSupport_transportAborted" | ||
| [" | | <sqf>params ["_bis_groundSupport_transportAborted", "_group", "_transport"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "bis_groundSupport_disembarked" | | "bis_groundSupport_disembarked" | ||
| [" | | <sqf>params ["_bis_groundSupport_disembarked", "_group", "_transport"];</sqf> | ||
|- | |- | ||
! colspan="3 | |- class="align-left" | ||
! colspan="3" | Module End Game | |||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "EndGame_OnStageChanged" | | "EndGame_OnStageChanged" | ||
| [_stage, _side] | | <sqf>params ["_stage", "_side"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "EndGame_OnStartGameObjectiveCompleted" | | "EndGame_OnStartGameObjectiveCompleted" | ||
| [_side] | | <sqf>params ["_side"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "EndGame_OnObjectiveStateChanged" | | "EndGame_OnObjectiveStateChanged" | ||
| [_objective, _side, _newState] | | <sqf>params ["_objective", "_side", "_newState"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "EndGame_OnObjectiveCompleted" | | "EndGame_OnObjectiveCompleted" | ||
| [_objective] | | <sqf>params ["_objective"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "EndGame_OnObjectiveEnded" | | "EndGame_OnObjectiveEnded" | ||
| [_objective] | | <sqf>params ["_objective"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "EndGame_OnDownloadCompleted" | | "EndGame_OnDownloadCompleted" | ||
| [_side, _isUpload] | | <sqf>params ["_side", "_isUpload"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "EndGame_Ended" | | "EndGame_Ended" | ||
| [_winnerSide, | | <sqf>params ["_winnerSide", "_loserSide", "_isDraw"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "onUploadStateChanged" | | "onUploadStateChanged" | ||
| [_side] | | <sqf>params ["_side"]; // can be nil</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "onPickupInfoChanged" | | "onPickupInfoChanged" | ||
| [ | | <sqf>params ["_BIS_hvt_pickupInfo"];</sqf> | ||
|- | |- | ||
|- class="align-left" | |||
! colspan="3" | EG Spectator Display | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| missionNamespace | |||
| "RscDisplayEGSpectator_OnCursorObjectFocused" | | "RscDisplayEGSpectator_OnCursorObjectFocused" | ||
| [_object] | | <sqf>params ["_object"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "RscDisplayEGSpectator_OnCursorObjectUnfocused" | | "RscDisplayEGSpectator_OnCursorObjectUnfocused" | ||
| [_object] | | <sqf>params ["_object"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "RscDisplayEGSpectator_OnFocusChanged" | | "RscDisplayEGSpectator_OnFocusChanged" | ||
| [_newFocus] | | <sqf>params ["_newFocus"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "RscDisplayEGSpectator_OnUiVisibilityChanged" | | "RscDisplayEGSpectator_OnUiVisibilityChanged" | ||
| [_isVisible] | | <sqf>params ["_isVisible"];</sqf> | ||
|- | |- | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "RscDisplayEGSpectator_MapStateChanged" | | "RscDisplayEGSpectator_MapStateChanged" | ||
| [_isMapVisible] | | <sqf>params ["_isMapVisible"];</sqf> | ||
|- | |- | ||
! colspan="3 | |- class="align-left" | ||
! colspan="3" | Respawn Display | |||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "RscDisplayRespawnKeyDown" | | "RscDisplayRespawnKeyDown" | ||
| [_display, _keyCode, | | <sqf>params ["_display", "_keyCode", "_shift", "_ctrl", "_alt"];</sqf> | ||
|- | |- | ||
! colspan="3 | |- class="align-left" | ||
! colspan="3" | [[BIS_fnc_animateFlag]] | |||
|- | |- | ||
| _flag | | <sqf>_flag</sqf> | ||
| "FlagAnimationDone" | | "FlagAnimationDone" | ||
| [_flag, _phaseEnd] | | <sqf>params ["_flag", "_phaseEnd"];</sqf> | ||
|- | |- | ||
|- class="align-left" | |||
! colspan="3" | Module Trident | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| missionNamespace | |||
| "BIS_fnc_moduleTrident_updated" | | "BIS_fnc_moduleTrident_updated" | ||
| [_sideA, _sideB, _areFriendly] | | <sqf>params ["_sideA", "_sideB", "_areFriendly"];</sqf> | ||
|- | |- | ||
|- class="align-left" | |||
! colspan="3" | [[BIS_fnc_initInspectable]] | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| missionNamespace | |||
| "objectInspected" | | "objectInspected" | ||
| [_object, | | <sqf>params ["_object", "_texture", "_text", "_sound", "_textureRatio"];</sqf> | ||
any data, shown as used by the [[Arma 3: Leaflets|Leaflets]] system | |||
|- | |- | ||
|- class="align-left" | |||
! colspan="3" | BIS_fnc_priorityQueue* system | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| "BIS_onQueue%1Pop" where %1 is ID returned from [[BIS_fnc_priorityQueue_Init]] | |||
| <sqf>params ["_handle"];</sqf> | |||
|- | |- | ||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| "BIS_onQueue%1Push" where %1 is ID returned from [[BIS_fnc_priorityQueue_Init]] | |||
| <sqf>params ["_handle"];</sqf> | |||
|- class="align-left" | |||
! colspan="3" | Display is opened or closed via [[BIS_fnc_initDisplay]] {{GVI|arma3|2.04}} | |||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "OnDisplayRegistered" | | "OnDisplayRegistered" | ||
| [_display, _class] | | <sqf>params ["_display", "_class"];</sqf> | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "OnDisplayUnregistered" | | "OnDisplayUnregistered" | ||
| [_display, _class] | | <sqf>params ["_display", "_class"];</sqf> | ||
|- | |- class="align-left" | ||
! colspan="3" | Probing Beam (enoch) | |||
! colspan="3 | |||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "probingStarted" | | "probingStarted" | ||
| [ | | <sqf>params ["_cursorTarget", "_data"];</sqf> | ||
|- | |- | ||
| missionNamespace | | <sqf>missionNamespace</sqf> | ||
| "probingEnded" | | "probingEnded" | ||
| [_data,_isEnded] | | <sqf>params ["_data", "_isEnded"];</sqf> | ||
|- | |- | ||
|} | |} | ||
[[Category: Event Handlers]] | [[Category: Event Handlers]] |
Revision as of 16:24, 12 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
- BIS_fnc_addScriptedEventHandler
- BIS_fnc_removeScriptedEventHandler
- BIS_fnc_removeAllScriptedEventHandlers
- BIS_fnc_callScriptedEventHandler
Examples
Create
Subscribe
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 |
---|---|---|
Player opens pause menu | ||
"OnGameInterrupt" | ||
Player exits Game Options menu | ||
"OnGameOptionsExited" 2.02 | ||
Saving of the game, scripted or manual | ||
"OnSaveGame" | N/A | |
teamSwitchedScript.sqs | ||
"teamSwitched" | ||
BIS_fnc_packStaticWeapon | ||
_group |
"StaticWeaponPacked" | |
BIS_fnc_unpackStaticWeapon | ||
_group |
"StaticWeaponUnpacked" | |
Module Timeline | ||
_timeline |
"finished" | |
_timeline |
"played" | N/A |
_timeline |
"looped" | |
Module Rich Curve Key | ||
_curKey | "reached" | |
BIS_fnc_kbTellLocal | ||
"BIS_fnc_kbTellLocal_played" | ||
Module Game Master (Zeus) | ||
_curator |
"curatorGroupPlaced" | |
_curator |
"curatorObjectPlaced" | |
_curator |
"curatorUnitAssigned" | |
BIS_fnc_playVideo | ||
"BIS_fnc_playVideo_started" | ||
"BIS_fnc_playVideo_stopped" | ||
BIS_fnc_addScriptedEventHandler | ||
"ScriptedEventHandlerAdded" | ||
BIS_fnc_removeScriptedEventHandler | ||
"ScriptedEventHandlerRemoved" | ||
BIS_fnc_removeAllScriptedEventHandlers | ||
"ScriptedEventHandlerRemoved" | ||
BIS_fnc_respawnTickets | ||
"respawnTicketsExhausted" | ||
BIS_fnc_bleedTickets | ||
"dominantSideChanged" | ||
BIS_fnc_arsenal | ||
"arsenalPreOpen" 2.08 Fires just before Arsenal display is created | ||
"arsenalOpened" |
| |
"arsenalClosed" |
| |
BIS_fnc_garage | ||
"garageOpened" | ||
"garageClosed" |
| |
BIS_fnc_initIntelObject | ||
_object | "intelObjectFound" | |
_curator |
"intelObjectFound" | |
BIS_fnc_EGSpectatorCamera | ||
"EGSpectator_OnCameraModeChanged" | ||
Module Vehicle Respawn | ||
"respawn" | ||
Module Sector | ||
_sector |
"ownerChanged" | |
Module Curator RemoteControl | ||
_curator |
"curatorObjectRemoteControlled" | |
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 End Game | ||
"EndGame_OnStageChanged" | ||
"EndGame_OnStartGameObjectiveCompleted" | ||
"EndGame_OnObjectiveStateChanged" | ||
"EndGame_OnObjectiveCompleted" | ||
"EndGame_OnObjectiveEnded" | ||
"EndGame_OnDownloadCompleted" | ||
"EndGame_Ended" | ||
"onUploadStateChanged" | ||
"onPickupInfoChanged" | ||
EG Spectator Display | ||
"RscDisplayEGSpectator_OnCursorObjectFocused" | ||
"RscDisplayEGSpectator_OnCursorObjectUnfocused" | ||
"RscDisplayEGSpectator_OnFocusChanged" | ||
"RscDisplayEGSpectator_OnUiVisibilityChanged" | ||
"RscDisplayEGSpectator_MapStateChanged" | ||
Respawn Display | ||
"RscDisplayRespawnKeyDown" | ||
BIS_fnc_animateFlag | ||
_flag |
"FlagAnimationDone" | |
Module Trident | ||
"BIS_fnc_moduleTrident_updated" | ||
BIS_fnc_initInspectable | ||
"objectInspected" | 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 | ||
"BIS_onQueue%1Push" where %1 is ID returned from BIS_fnc_priorityQueue_Init | ||
Display is opened or closed via BIS_fnc_initDisplay 2.04 | ||
"OnDisplayRegistered" | ||
"OnDisplayUnregistered" | ||
Probing Beam (enoch) | ||
"probingStarted" | ||
"probingEnded" |