Scripted Event Handlers – Arma 3
Lou Montana (talk | contribs) (Add full example and params usage) |
Lou Montana (talk | contribs) (Add Arma 3 Contact Scripted Event Handler names until more details) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
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: Event Handlers]]. | For all other available Event Handlers, see [[Arma 3: Event Handlers]]. | ||
{{TOC|subtoc|content= | |||
* 1. {{Link|#Functions}} | |||
* 2. {{Link|#Examples}} | |||
* 3. {{Link|#Events}} | |||
* 4. {{Link|#{{Name|arma3contact}} Events}} | |||
}} | |||
Line 16: | Line 23: | ||
== Examples == | == Examples == | ||
=== Subscribe === | === Subscribe === | ||
Line 36: | Line 36: | ||
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 51: | ||
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" | ||
|- class="align-center" | |||
! Event namespace | ! Event namespace | ||
! Event name | ! Event name | ||
! Event passed parameters | ! Event passed parameters | ||
|- | |||
! colspan="3" | Player opens pause menu | |- | ||
! colspan="3" | | |||
=== EG Spectator Display === | |||
|- | |||
| <sqf>missionNamespace</sqf> | |||
| "RscDisplayEGSpectator_OnCursorObjectFocused" | |||
| <sqf>params ["_object"];</sqf> | |||
|- | |||
| <sqf>missionNamespace</sqf> | |||
| "RscDisplayEGSpectator_OnCursorObjectUnfocused" | |||
| <sqf>params ["_object"];</sqf> | |||
|- | |||
| <sqf>missionNamespace</sqf> | |||
| "RscDisplayEGSpectator_OnFocusChanged" | |||
| <sqf>params ["_newFocus"];</sqf> | |||
|- | |||
| <sqf>missionNamespace</sqf> | |||
| "RscDisplayEGSpectator_OnUiVisibilityChanged" | |||
| <sqf>params ["_isVisible"];</sqf> | |||
|- | |||
| <sqf>missionNamespace</sqf> | |||
| "RscDisplayEGSpectator_MapStateChanged" | |||
| <sqf>params ["_isMapVisible"];</sqf> | |||
|- | |||
! colspan="3" | | |||
=== Player opens pause menu === | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | | <sqf>missionNamespace</sqf> | ||
| "OnGameInterrupt" | | "OnGameInterrupt" | ||
| <sqf>params ["_display"];</sqf> | | <sqf>params ["_display"];</sqf> | ||
|- | |- | ||
! colspan="3" | | |||
! colspan="3" | Player exits Game Options menu | === 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> | ||
|- | |||
! colspan="3" | | |||
=== Probing Beam (enoch) === | |||
|- | |||
| <sqf>missionNamespace</sqf> | |||
| "probingStarted" | |||
| <sqf>params ["_cursorTarget", "_data"];</sqf> | |||
|- | |||
| <sqf>missionNamespace</sqf> | |||
| "probingEnded" | |||
| <sqf>params ["_data", "_isEnded"];</sqf> | |||
|- | |- | ||
|- | ! colspan="3" | | ||
! colspan="3" | Saving of the game, scripted or manual | === Respawn Display === | ||
|- | |||
| <sqf>missionNamespace</sqf> | |||
| "RscDisplayRespawnKeyDown" | |||
| <sqf>params ["_display", "_keyCode", "_shift", "_ctrl", "_alt"];</sqf> | |||
|- | |||
! colspan="3" | | |||
=== Saving of the game, scripted or manual === | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | | <sqf>missionNamespace</sqf> | ||
| "OnSaveGame" | | "OnSaveGame" | ||
| {{n/a}} | | {{n/a}} | ||
|- | |- | ||
! colspan="3" | | |||
! colspan="3" | [[Event Scripts#teamSwitchedScript.sqs|teamSwitchedScript.sqs]] | === [[Event Scripts#teamSwitchedScript.sqs|teamSwitchedScript.sqs]] === | ||
|- | |- | ||
| <sqf>missionNamespace</sqf> | | <sqf>missionNamespace</sqf> | ||
| "teamSwitched" | | "teamSwitched" | ||
| <sqf>params ["_originalUnit", "_switchToUnit"];</sqf> | | <sqf>params ["_originalUnit", "_switchToUnit"];</sqf> | ||
|- | |- | ||
! colspan="3" | | |||
! colspan="3" | [[ | === [[BIS_fnc_addScriptedEventHandler]] === | ||
|- | |||
| <sqf>missionNamespace</sqf> | |||
| "ScriptedEventHandlerAdded" | |||
| <sqf>params ["_namespace", "_name", "_handlerID"];</sqf> | |||
|- | |- | ||
| <sqf> | ! colspan="3" | | ||
| " | === [[BIS_fnc_animateFlag]] === | ||
| <sqf>params [" | |- | ||
| <sqf>_flag</sqf> | |||
| "FlagAnimationDone" | |||
| <sqf>params ["_flag", "_phaseEnd"];</sqf> | |||
|- | |||
! colspan="3" | | |||
=== [[BIS_fnc_arsenal]] === | |||
|- | |||
| <sqf>missionNamespace</sqf> | |||
| "arsenalPreOpen" {{GVI|arma3|2.08}} Fires just before Arsenal display is created | |||
| <sqf>params ["_missionDisplay", "_center"];</sqf> | |||
|- | |||
| <sqf>missionNamespace</sqf> | |||
| "arsenalOpened" | |||
| <sqf>params ["_display", "_toggleSpace"];</sqf> | |||
* _toggleSpace: [[Boolean]] - <sqf inline>uiNamespace getVariable ["bis_fnc_arsenal_toggleSpace", false]];</sqf> | |||
|- | |||
| <sqf>missionNamespace</sqf> | |||
| "arsenalClosed" | |||
| <sqf>params ["_displayNull", "_toggleSpace"];</sqf> | |||
* _toggleSpace: [[Boolean]] - <sqf inline>uiNamespace getVariable ["bis_fnc_arsenal_toggleSpace", false]];</sqf> | |||
|- | |- | ||
! colspan="3" | | |||
! colspan="3" | [[ | === [[BIS_fnc_bleedTickets]] === | ||
|- | |- | ||
| <sqf> | | <sqf>missionNamespace</sqf> | ||
| " | | "dominantSideChanged" | ||
| <sqf>params [" | | <sqf>params ["_dominantSide", "_dominantSideOld", "_sides"];</sqf> | ||
|- | |- | ||
! colspan="3" | | |||
! colspan="3" | | === [[BIS_fnc_EGSpectatorCamera]] === | ||
|- | |- | ||
| <sqf> | | <sqf>missionNamespace</sqf> | ||
| " | | "EGSpectator_OnCameraModeChanged" | ||
| <sqf>params [" | | <sqf>params ["_newMode"];</sqf> | ||
|- | |- | ||
! colspan="3" | | |||
=== [[BIS_fnc_garage]] === | |||
|- | |- | ||
| <sqf> | | <sqf>missionNamespace</sqf> | ||
| " | | "garageOpened" | ||
| | | <sqf>params ["_display", "_toggleSpace"];</sqf> | ||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| "garageClosed" | |||
| <sqf>params ["_displayNull", "_toggleSpace"];</sqf> | |||
* _toggleSpace: [[Boolean]] - <sqf inline>uiNamespace getVariable ["bis_fnc_arsenal_toggleSpace", false]];</sqf> | |||
|- | |- | ||
| | ! colspan="3" | | ||
| | {{ArgTitle|3|[[BIS_fnc_initDisplay]]|{{GVI|arma3|2.04}}}} | ||
| | |||
|- | |- | ||
| | | <sqf>missionNamespace</sqf> | ||
| "OnDisplayRegistered" | |||
| <sqf>params ["_display", "_class"];</sqf> | |||
|- | |- | ||
| | | <sqf>missionNamespace</sqf> | ||
| " | | "OnDisplayUnregistered" | ||
| <sqf>params [" | | <sqf>params ["_display", "_class"];</sqf> | ||
|- | |- | ||
! colspan="3" | | |||
! colspan="3" | [[ | === [[BIS_fnc_initInspectable]] === | ||
|- | |- | ||
| <sqf>missionNamespace</sqf> | | <sqf>missionNamespace</sqf> | ||
| " | | "objectInspected" | ||
| <sqf>params [" | | <sqf>params ["_object", "_texture", "_text", "_sound", "_textureRatio"];</sqf> | ||
any data, shown as used by the [[Arma 3: Leaflets|Leaflets]] system | |||
|- | |||
! colspan="3" | | |||
=== [[BIS_fnc_initIntelObject]] === | |||
|- | |- | ||
| | | _object | ||
| "intelObjectFound" | |||
| <sqf>params ["_object", "_foundBy"];</sqf> | |||
|- | |- | ||
| <sqf>_curator</sqf> | | <sqf>_curator</sqf> | ||
| " | | "intelObjectFound" | ||
| <sqf>params [" | | <sqf>params ["_curator", "_foundBy", "_object"];</sqf> | ||
|- | |- | ||
! colspan="3" | | |||
=== [[BIS_fnc_kbTellLocal]] === | |||
|- | |- | ||
| <sqf> | | <sqf>missionNamespace</sqf> | ||
| " | | "BIS_fnc_kbTellLocal_played" | ||
| <sqf>params [" | | <sqf>params ["_from", "_to", "_sentence", "_channel"];</sqf> | ||
|- | |- | ||
! colspan="3" | | |||
=== [[BIS_fnc_packStaticWeapon]] === | |||
|- | |- | ||
| <sqf> | | <sqf>_group</sqf> | ||
| " | | "StaticWeaponPacked" | ||
| <sqf>params [" | | <sqf>params ["_group", "_leader", "_gunner", "_assistant", "_weaponBag", "_baseBag"];</sqf> | ||
|- | |- | ||
! colspan="3" | | |||
! colspan="3" | [[BIS_fnc_playVideo]] | === [[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> | ||
|- | |||
! 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> | | <sqf>missionNamespace</sqf> | ||
| " | | "BIS_onQueue%1Push" where %1 is ID returned from [[BIS_fnc_priorityQueue_Init]] | ||
| <sqf>params [" | | <sqf>params ["_handle"];</sqf> | ||
|- | |- | ||
! colspan="3" | | |||
! 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> | ||
|- | |- | ||
! colspan="3" | | |||
! 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> | ||
|- | |- | ||
! colspan="3" | | |||
! colspan="3" | [[BIS_fnc_respawnTickets]] | === [[BIS_fnc_respawnTickets]] === | ||
|- | |- | ||
| <sqf>missionNamespace</sqf> | | <sqf>missionNamespace</sqf> | ||
| "respawnTicketsExhausted" | | "respawnTicketsExhausted" | ||
| <sqf>params ["_target"];</sqf> | | <sqf>params ["_target"];</sqf> | ||
|- | |- | ||
! colspan="3" | | |||
! colspan="3" | [[ | === [[BIS_fnc_unpackStaticWeapon]] === | ||
|- | |- | ||
| <sqf> | | <sqf>_group</sqf> | ||
| " | | "StaticWeaponUnpacked" | ||
| <sqf>params [" | | <sqf>params ["_group", "_leader", "_gunner", "_assistant", "_weapon"];</sqf> | ||
|- | |- | ||
! colspan="3" | | |||
! colspan="3" | | === Module Curator RemoteControl === | ||
|- | |- | ||
| <sqf> | | <sqf>_curator</sqf> | ||
| " | | "curatorObjectRemoteControlled" | ||
| <sqf>params [" | | <sqf>params ["_curator", "_player", "_unit", "_isRemoteControlled"];</sqf> | ||
* _isRemoteControlled is [[true]] when entering remote control, [[false]] when exiting | |||
|- | |- | ||
! colspan="3" | | |||
=== Module End Game === | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | | <sqf>missionNamespace</sqf> | ||
| " | | "EndGame_OnStageChanged" | ||
| <sqf>params [" | | <sqf>params ["_stage", "_side"];</sqf> | ||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| "EndGame_OnStartGameObjectiveCompleted" | |||
| <sqf>params ["_side"];</sqf> | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | | <sqf>missionNamespace</sqf> | ||
| " | | "EndGame_OnObjectiveStateChanged" | ||
| <sqf>params [" | | <sqf>params ["_objective", "_side", "_newState"];</sqf> | ||
|- | |- | ||
| | | <sqf>missionNamespace</sqf> | ||
| "EndGame_OnObjectiveCompleted" | |||
| <sqf>params ["_objective"];</sqf> | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | | <sqf>missionNamespace</sqf> | ||
| " | | "EndGame_OnObjectiveEnded" | ||
| <sqf>params [" | | <sqf>params ["_objective"];</sqf> | ||
|- | |- | ||
| <sqf>missionNamespace</sqf> | |||
| "EndGame_OnDownloadCompleted" | |||
| <sqf>params ["_side", "_isUpload"];</sqf> | |||
|- | |- | ||
| <sqf>missionNamespace</sqf> | | <sqf>missionNamespace</sqf> | ||
| " | | "EndGame_Ended" | ||
| <sqf>params [" | | <sqf>params ["_winnerSide", "_loserSide", "_isDraw"];</sqf> | ||
|- | |- | ||
| | | <sqf>missionNamespace</sqf> | ||
| "onUploadStateChanged" | |||
| <sqf>params ["_side"]; // can be nil</sqf> | |||
|- | |- | ||
| | | <sqf>missionNamespace</sqf> | ||
| " | | "onPickupInfoChanged" | ||
| <sqf>params [" | | <sqf>params ["_BIS_hvt_pickupInfo"];</sqf> | ||
|- | |- | ||
! colspan="3" | | |||
=== Module Game Master (Zeus) === | |||
|- | |- | ||
| <sqf>_curator</sqf> | | <sqf>_curator</sqf> | ||
| " | | "curatorGroupPlaced" | ||
| <sqf>params [" | | <sqf>params ["_group"];</sqf> | ||
|- | |- | ||
| | | <sqf>_curator</sqf> | ||
| "curatorObjectPlaced" | |||
| <sqf>params ["_object"];</sqf> | |||
|- | |- | ||
| <sqf> | | <sqf>_curator</sqf> | ||
| " | | "curatorUnitAssigned" | ||
| <sqf>params [" | | <sqf>params ["_curator", "_player"];</sqf> | ||
|- | |- | ||
! colspan="3" | | |||
! colspan="3" | Module | === Module Rich Curve Key === | ||
|- | |- | ||
| | | _curKey | ||
| " | | "reached" | ||
| <sqf>params [" | | <sqf>params ["_curKey"];</sqf> | ||
|- | |- | ||
! colspan="3" | | |||
! colspan="3" | Module Sector | === Module Sector === | ||
|- | |- | ||
| <sqf>_sector</sqf> | | <sqf>_sector</sqf> | ||
| "ownerChanged" | | "ownerChanged" | ||
| <sqf>params ["_sector", "_owner", "_ownerOld"];</sqf> | | <sqf>params ["_sector", "_owner", "_ownerOld"];</sqf> | ||
|- | |- | ||
! colspan="3" | | |||
! 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> | ||
|- | |- | ||
! colspan="3" | | |||
! colspan="3" | Module | === Module Timeline === | ||
|- | |- | ||
| <sqf> | | <sqf>_timeline</sqf> | ||
| " | | "finished" | ||
| <sqf>params [" | | <sqf>params ["_timeline"];</sqf> | ||
|- | |- | ||
| <sqf>_timeline</sqf> | |||
| "played" | |||
| {{n/a}} | |||
|- | |- | ||
| <sqf> | | <sqf>_timeline</sqf> | ||
| " | | "looped" | ||
| <sqf>params [" | | <sqf>params ["_timeline"];</sqf> | ||
|- | |- | ||
! colspan="3" | | |||
=== Module Trident === | |||
! colspan="3" | | |||
|- | |- | ||
| <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> | ||
|- | |- | ||
! colspan="3" | | |||
! colspan="3" | | === Module Vehicle Respawn === | ||
|- | |- | ||
| <sqf>missionNamespace</sqf> | | <sqf>missionNamespace</sqf> | ||
| " | | "respawn" | ||
| <sqf>params [" | | <sqf>params ["_newVeh", "_veh"];</sqf> | ||
|} | |} | ||
== {{Name|arma3contact}} Events == | |||
{{Feature|arma3contact}} | |||
{{Columns|5| | |||
* "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" | |||
}} | |||
[[Category: Event Handlers]] | [[Category: Event Handlers]] |
Latest revision as of 12:55, 20 April 2024
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.
- 1. Functions
- 2. Examples
- 3. Events
- 4. Arma 3 Contact Events
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" |
Arma 3 Contact Events
- "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"