Scripted Event Handlers – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
(changed from uiNamespace to missionNamespace)
(added more details to curatorObjectRemoteControlled)
Line 235: Line 235:
| _curator
| _curator
| "curatorObjectRemoteControlled"
| "curatorObjectRemoteControlled"
| [_curator, _player, _unit, _return]
| [_curator, _player, _unit, _isRemoteControlled] {{cc|_isRemoteControlled is [[true]] when entering remote control, and [[false]] when exiting}}
|-
|-
|-
|-

Revision as of 17:12, 12 October 2021

Scripted Event Handlers

Description

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.


Related Commands


Examples

[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.png1.98

Event namespace Event name Event passed parameters
Player opens pause menu
missionNamespace "OnGameInterrupt" [_display]
Player exits Game Options menu
missionNamespace "OnGameOptionsExited" Arma 3 logo black.png2.02 [_okButtonPressed]
Saving of the game, scripted or manual
missionNamespace "OnSaveGame" N/A
teamSwitchedScript.sqs
missionNamespace "teamSwitched" [_originalUnit, _switchToUnit]
BIS_fnc_packStaticWeapon
_group "StaticWeaponPacked" [_group, _leader, _gunner, _assistant, _weaponBag, _baseBag]
BIS_fnc_unpackStaticWeapon
_group "StaticWeaponUnpacked" [_group, _leader, _gunner, _assistant, _weapon]
Module Timeline
_timeline "finished" [_timeline]
_timeline "played" N/A
_timeline "looped" [_timeline]
Module Rich Curve Key
_curKey "reached" [_curKey]
BIS_fnc_kbTellLocal
missionNamespace "BIS_fnc_kbTellLocal_played" [_from, _to, _sentence, _channel]
Module Game Master (Zeus)
_curator "curatorGroupPlaced" [_group]
_curator "curatorObjectPlaced" [_object]
_curator "curatorUnitAssigned" [_curator, _player]
BIS_fnc_playVideo
missionNamespace "BIS_fnc_playVideo_started" [_video]
missionNamespace "BIS_fnc_playVideo_stopped" [_video]
BIS_fnc_addScriptedEventHandler
missionNamespace "ScriptedEventHandlerAdded" [_namespace, _name, _handlerID]
BIS_fnc_removeScriptedEventHandler
missionNamespace "ScriptedEventHandlerRemoved" [_namespace, _name, _handlerID]
BIS_fnc_removeAllScriptedEventHandlers
missionNamespace "ScriptedEventHandlerRemoved" [_namespace, _name, _handlerID]
BIS_fnc_respawnTickets
missionNamespace "respawnTicketsExhausted" [_target]
BIS_fnc_bleedTickets
missionNamespace "dominantSideChanged" [_dominantSide, _dominantSideOld, _sides]
BIS_fnc_arsenal
missionNamespace "arsenalOpened" [_display, _toggleSpace]
missionNamespace "arsenalClosed" [displayNull, uiNamespace getVariable ["BIS_fnc_arsenal_toggleSpace", false]]
BIS_fnc_garage
missionNamespace "garageOpened" [_display, _toggleSpace]
missionNamespace "garageClosed" [displayNull,uiNamespace getVariable ["BIS_fnc_arsenal_toggleSpace",false]]
BIS_fnc_initIntelObject
_object "intelObjectFound" [_object, _foundBy]
_curator "intelObjectFound" [_curator, _foundBy, _object]
BIS_fnc_EGSpectatorCamera
missionNamespace "EGSpectator_OnCameraModeChanged" [_newMode]
Module Vehicle Respawn
missionNamespace "respawn" [_newVeh, _veh]
Module Sector
_sector "ownerChanged" [_sector, _owner, _ownerOld]
Module Curator RemoteControl
_curator "curatorObjectRemoteControlled" [_curator, _player, _unit, _isRemoteControlled] // _isRemoteControlled is true when entering remote control, and false when exiting
Module Spawn AI: Sector Tactic
missionNamespace "bis_groundSupport_groupSpawned" ["bis_groundSupport_groupSpawned", _group, _side]
missionNamespace "bis_groundSupport_wiped" ["bis_groundSupport_wiped", _group]
missionNamespace "bis_groundSupport_inEnemySector" ["bis_groundSupport_inEnemySector", _group]
missionNamespace "bis_groundSupport_destinationReached" ["bis_groundSupport_destinationReached", _group]
missionNamespace "bis_groundSupport_groupTypeChanged" ["bis_groundSupport_groupTypeChanged", _group, _type, _currentType]
missionNamespace "bis_groundSupport_decimated" ["bis_groundSupport_decimated", _group]
missionNamespace "bis_groundSupport_farFromDestination" ["bis_groundSupport_farFromDestination", _group]
missionNamespace "bis_groundSupport_needTransport" ["bis_groundSupport_needTransport", _group]
missionNamespace "bis_groundSupport_joined" ["bis_groundSupport_joined", _group, _transportGroup]
missionNamespace "bis_groundSupport_closeToDestination" ["bis_groundSupport_closeToDestination", _group]
missionNamespace "bis_groundSupport_needEvac" ["bis_groundSupport_needEvac", _group]
missionNamespace "bis_groundSupport_needAmmo" ["bis_groundSupport_needAmmo", _group]
missionNamespace "bis_groundSupport_needSupport" ["bis_groundSupport_needSupport", _group, _reportedVehicle]
missionNamespace "bis_groundSupport_boarded" ["bis_groundSupport_boarded", _group, _transport]
missionNamespace "bis_groundSupport_transportStarted" ["bis_groundSupport_transportStarted", _group, _transport]
missionNamespace "bis_groundSupport_transportEnded" ["bis_groundSupport_transportEnded", _group, _transport]
missionNamespace "bis_groundSupport_transportAborted" ["bis_groundSupport_transportAborted", _group, _transport]
missionNamespace "bis_groundSupport_disembarked" ["bis_groundSupport_disembarked", _group, _transport]
Module End Game
missionNamespace "EndGame_OnStageChanged" [_stage, _side]
missionNamespace "EndGame_OnStartGameObjectiveCompleted" [_side]
missionNamespace "EndGame_OnObjectiveStateChanged" [_objective, _side, _newState]
missionNamespace "EndGame_OnObjectiveCompleted" [_objective]
missionNamespace "EndGame_OnObjectiveEnded" [_objective]
missionNamespace "EndGame_OnDownloadCompleted" [_side, _isUpload]
missionNamespace "EndGame_Ended" [_winnerSide, _looserSide, _isDraw]
missionNamespace "onUploadStateChanged" [_side] // can be nil
missionNamespace "onPickupInfoChanged" [BIS_hvt_pickupInfo]
EG Spectator Display
missionNamespace "RscDisplayEGSpectator_OnCursorObjectFocused" [_object]
missionNamespace "RscDisplayEGSpectator_OnCursorObjectUnfocused" [_object]
missionNamespace "RscDisplayEGSpectator_OnFocusChanged" [_newFocus]
missionNamespace "RscDisplayEGSpectator_OnUiVisibilityChanged" [_isVisible]
missionNamespace "RscDisplayEGSpectator_MapStateChanged" [_isMapVisible]
Respawn Display
missionNamespace "RscDisplayRespawnKeyDown" [_display, _keyCode, _shft, _ctr, _alt]
BIS_fnc_animateFlag
_flag "FlagAnimationDone" [_flag, _phaseEnd]
Module Trident
missionNamespace "BIS_fnc_moduleTrident_updated" [_sideA, _sideB, _areFriendly]
BIS_fnc_initInspectable
missionNamespace "objectInspected" [_object, (_texture, _text, _sound, _textureRatio)] // any data, shown as used by leaflet system
BIS_fnc_priorityQueue
missionNamespace "BIS_onQueue%1Pop" // where %1 is ID returned from BIS_fnc_priorityQueue_init [_handle]
missionNamespace "BIS_onQueue%1Push" // where %1 is ID returned from BIS_fnc_priorityQueue_init [_handle]
Display is opened or closed via BIS_fnc_initDisplay Arma 3 logo black.png2.04
missionNamespace "OnDisplayRegistered" [_display, _class]
missionNamespace "OnDisplayUnregistered" [_display, _class]