R3vo/Sandbox1 – User
| mNo edit summary | mNo edit summary | ||
| Line 44: | Line 44: | ||
| * '''In Waypoints''' | * '''In Waypoints''' | ||
| ** ''""Condition"" or ""On Activation/Deactivation"" line'': The group leader that completed the respective waypoint (or driver, if waypoint is assigned to a vehicle)" | ** ''""Condition"" or ""On Activation/Deactivation"" line'': The group leader that completed the respective waypoint (or driver, if waypoint is assigned to a vehicle)" | ||
| | | |||
| [[Object]] or [[Boolean]] | |||
| | | | | ||
| See description. | See description. | ||
| | | | | ||
| - | - | ||
| Line 58: | Line 58: | ||
| [[Anything]] | [[Anything]] | ||
| | | | | ||
| See description | See description. | ||
| | | | | ||
| {{GVI|arma3|2.02}} | {{GVI|arma3|2.02}} | ||
| Line 80: | Line 80: | ||
| [[Array]] of [[Object]]s | [[Array]] of [[Object]]s | ||
| | | | | ||
| commandFSM | [[commandFSM]], [[doFSM]], [[onDoubleClick]], [[onMapSingleClick]] | ||
| | | | | ||
| - | - | ||
| Line 105: | Line 102: | ||
| ? | ? | ||
| | | | | ||
| [[kbAddTopic]], [[onTeamSwitch]] | |||
| | | | | ||
| - | - | ||
| Line 112: | Line 108: | ||
| | | | | ||
| _time   | _time   | ||
| | | | | ||
| '''[[SQS Syntax|SQS]] ONLY.''' The time elapsed since the script started running. | '''[[SQS Syntax|SQS]] ONLY.''' The time elapsed since the script started running. | ||
| Line 151: | Line 146: | ||
| [[Number]] | [[Number]] | ||
| | | | | ||
| addEventHandler | [[addEventHandler]], [[addMissionEventHandler]], [[addMPEventHandler]] | ||
| | | | | ||
| ? | ? | ||
| Line 164: | Line 157: | ||
| [[String]] | [[String]] | ||
| | | | | ||
| addEventHandler | [[addEventHandler]], [[addMissionEventHandler]], [[addMPEventHandler]] | ||
| | | | | ||
| {{GVI|arma3|2.06}} | {{GVI|arma3|2.06}} | ||
| Line 173: | Line 164: | ||
| _thisArgs | _thisArgs | ||
| | | | | ||
| Additional  | Additional event handler arguments available with [[addMissionEventHandler]]. | ||
| |   | |   | ||
| [[ | [[Array]] | ||
| | | | | ||
| [[addMissionEventHandler]] | |||
| | | | | ||
| {{GVI|arma3|1.54}} | {{GVI|arma3|1.54}} | ||
| Line 196: | Line 176: | ||
| | | | | ||
| Is used to make arguments of a script call ([[call]], [[exec]], [[execVM]], [[spawn]]) visible and accessible to the script, also used in Event Handlers to pass appropriate params. | Is used to make arguments of a script call ([[call]], [[exec]], [[execVM]], [[spawn]]) visible and accessible to the script, also used in Event Handlers to pass appropriate params. | ||
| |   | |   | ||
| [[String]] | [[String]] | ||
| | | | | ||
| [[addAction]], [[addEventHandler]], [[addMissionEventHandler]],  [[addMPEventHandler]], [[addMusicEventHandler]], [[addPublicVariableEventHandler]], [[call]], [[ctrlAddEventHandler]], [[ctrlSetEventHandler]], [[displayAddEventHandler]], [[displaySetEventHandler]], [[editorSetEventHandler]], [[exec]], [[execFSM]], [[execVM]], [[inGameUISetEventHandler]], [[kbAddTopic]], [[onGroupIconClick]], [[setMusicEventHandler]], [[spawn]], [[try]] | |||
|   addMPEventHandler | |||
| | | | | ||
| {{GVI|arma3|1.54}} | {{GVI|arma3|1.54}} | ||
| Line 228: | Line 186: | ||
| _target | _target | ||
| | | | | ||
| ? | |||
| |   | |   | ||
| ? | ? | ||
| | | | | ||
| [[addAction]], [[commandFSM]], [[doFSM]] | |||
| | | | | ||
| ? | ? | ||
| Line 244: | Line 197: | ||
| _shift | _shift | ||
| | | | | ||
| ? | |||
| |   | |   | ||
| ? | ? | ||
| | | | | ||
| onDoubleClick | [[onDoubleClick]],  [[onMapSingleClick]] | ||
|   onMapSingleClick | |||
| | | | | ||
| ? | ? | ||
| Line 256: | Line 207: | ||
| | | | | ||
| _sentenceId | _sentenceId | ||
| | | | | ||
| ? | |||
| |   | |   | ||
| ? | ? | ||
| | | | | ||
| kbAddTopic | [[kbAddTopic]] | ||
| | | | | ||
| ? | ? | ||
| Line 268: | Line 218: | ||
| | | | | ||
| _pos | _pos | ||
| | | | | ||
| ? | |||
| |   | |   | ||
| ? | ? | ||
| | | | | ||
| [[onDoubleClick]], [[onMapSingleClick]], [[onShowNewObject]] | |||
| | | | | ||
| ? | ? | ||
| Line 283: | Line 229: | ||
| | | | | ||
| _owner | _owner | ||
| | | | | ||
| ? | |||
| |   | |   | ||
| ? | ? | ||
| | | | | ||
| onPlayerDisconnected | [[onPlayerDisconnected]], [[onPlayerConnected]] | ||
| | | | | ||
| ? | ? | ||
| Line 299: | Line 241: | ||
| _new | _new | ||
| | | | | ||
| Contains the newly created object. '''Old''' 3D-Editor only. | |||
| |   | |   | ||
| [[Object]] | |||
| | | | | ||
| [[addEditorObject]] | |||
| | | | | ||
| ? | ? | ||
| Line 310: | Line 252: | ||
| _name | _name | ||
| | | | | ||
| ? | |||
| |   | |   | ||
| ? | ? | ||
| | | | | ||
| [[onPlayerDisconnected]], [[onPlayerConnected]] | |||
| | | | | ||
| ? | ? | ||
| Line 322: | Line 263: | ||
| _leader | _leader | ||
| | | | | ||
| ? | |||
| |   | |   | ||
| ? | ? | ||
| | | | | ||
| commandFSM | [[commandFSM]], [[doFSM]] | ||
| | | | | ||
| ? | ? | ||
| Line 333: | Line 273: | ||
| | | | | ||
| _jip | _jip | ||
| | | | | ||
| ? | |||
| |   | |   | ||
| ? | ? | ||
| | | | | ||
| onPlayerDisconnected | [[onPlayerDisconnected]], [[onPlayerConnected]] | ||
| | | | | ||
| ? | ? | ||
| Line 346: | Line 284: | ||
| | | | | ||
| _isSelected | _isSelected | ||
| | | | | ||
| ? | |||
| |   | |   | ||
| ? | ? | ||
| | | | | ||
| [[onHCGroupSelectionChanged]] | |||
| | | | | ||
| ? | ? | ||
| Line 359: | Line 295: | ||
| | | | | ||
| _isHighCommand | _isHighCommand | ||
| | | | | ||
| Returns [[true]] if player is in high command. | |||
| |   | |   | ||
| [[Boolean]] | |||
| | | | | ||
| onCommandModeChanged | [[onCommandModeChanged]] | ||
| | | | | ||
| ? | ? | ||
| Line 374: | Line 306: | ||
| | | | | ||
| _id | _id | ||
| | | | | ||
| ? | |||
| |   | |   | ||
| ? | ? | ||
| | | | | ||
| onPlayerDisconnected | [[onPlayerDisconnected]] | ||
| | | | | ||
| ? | ? | ||
| Line 391: | Line 318: | ||
| _group | _group | ||
| | | | | ||
| Contains the newly selected group. | |||
| |   | |   | ||
| [[Group]] | |||
| | | | | ||
| onHCGroupSelectionChanged | [[onHCGroupSelectionChanged]] | ||
| | | | | ||
| ? | ? | ||
| Line 402: | Line 329: | ||
| _from | _from | ||
| | | | | ||
| ? | |||
| |   | |   | ||
| ? | ? | ||
| | | | | ||
| [[kbAddTopic]], [[onTeamSwitch]] | |||
| | | | | ||
| ? | ? | ||
| Line 413: | Line 339: | ||
| | | | | ||
| _forEachIndex   | _forEachIndex   | ||
| | | | | ||
| Represents the (zero-based) index of a [[forEach]] [[#x|_x]] element. | Represents the (zero-based) index of a [[forEach]] [[#x|_x]] element. | ||
| |   | |   | ||
| [[Number]] | |||
| | | | | ||
| [[forEach]] | [[forEach]] | ||
| Line 425: | Line 350: | ||
| | | | | ||
| _fnc_scriptNameParent | _fnc_scriptNameParent | ||
| | | | | ||
| {{Feature|Informative|not engine-maintained, but added by functions_f/'''initFunctions.sqf''' script – see [[scriptName]]}} | {{Feature|Informative|not engine-maintained, but added by functions_f/'''initFunctions.sqf''' script – see [[scriptName]]}} | ||
| From within a [[:Category:Functions|Function]], name of the function that called the current one ([[#fnc_scriptName|_fnc_scriptName]] used when not defined) | From within a [[:Category:Functions|Function]], name of the function that called the current one ([[#fnc_scriptName|_fnc_scriptName]] used when not defined) | ||
| |   | |   | ||
| [[String]] | |||
| | | | | ||
| - | - | ||
| Line 438: | Line 362: | ||
| | | | | ||
| _fnc_scriptName | _fnc_scriptName | ||
| | | | | ||
| {{Feature|Informative|not engine-maintained, but added by functions_f/'''initFunctions.sqf''' script – see [[scriptName]]}} From within a [[:Category:Functions|Function]], the '''TAG_fnc_functionName''' function name as string (e.g. "myTag_fnc_myFunction") | {{Feature|Informative|not engine-maintained, but added by functions_f/'''initFunctions.sqf''' script – see [[scriptName]]}} From within a [[:Category:Functions|Function]], the '''TAG_fnc_functionName''' function name as string (e.g. "myTag_fnc_myFunction") | ||
| |   | |   | ||
| [[String]] | |||
| | | | | ||
| - | - | ||
| Line 463: | Line 385: | ||
| _destination | _destination | ||
| | | | | ||
| ? | |||
| |   | |   | ||
| ? | ? | ||
| | | | | ||
| [[commandFSM]], [[doFSM]] | |||
| | | | | ||
| ? | ? | ||
| Line 479: | Line 400: | ||
| [[Boolean]] | [[Boolean]] | ||
| | | | | ||
| onDoubleClick | [[onDoubleClick]], [[onMapSingleClick]] | ||
| | | | | ||
| ? | ? | ||
| |- | |- | ||
| | | | | ||
| _uid | |||
| | | | | ||
| User ID of leaving player. | |||
| |   | |   | ||
| [[String]] | [[String]] | ||
| | | | | ||
| onPlayerDisconnected | [[onPlayerDisconnected]], [[onPlayerConnected]] | ||
| | | | | ||
| ? | ? | ||
Revision as of 12:42, 14 November 2021
Magic variables are engine-maintained variables that serve a specific purpose within a given scope and are often used by the engine to push data to a given script or code fragment.
They are usually no longer present after leaving the scope (e.g. after code execution or after a forEach statement).
| Variable | Description | Data Types | Used In | Introduced With | 
|---|---|---|---|---|
| thisTrigger | Refers to the trigger object itself - accessible within the Condition, On Activation or On Deactivation script. | - | ||
| thisList | "Variable defined by Triggers and Waypoints: 
 | - | ||
| this | 
 | See description. | - | |
| _y | Iterating over a HashMap with forEach will return the key as _x and the value as _y. | See description. | ||
| _x | Represents the current element during a loop with: apply, count, configClasses, configProperties, findIf, forEach, select. | apply, count, configClasses, configProperties, findIf, forEach, select | - | |
| _units | ? | - | ||
| _topic | ? | ? | - | |
| _to | ? | ? | - | |
| _time | SQS ONLY. The time elapsed since the script started running. | In SQS scripts. | - | |
| _thisScript | The execVMed, called or spawned script handle from within itself. | See description. | - | |
| _thisFSM | ||||
| _thisEventHandler | The index for Event Handlers added with addEventHandler, addMPEventHandler or addMissionEventHandler. | ? | ||
| _thisEvent | The name of the Event added with addEventHandler, addMPEventHandler or addMissionEventHandler as well as for config types EHs. | |||
| _thisArgs | Additional event handler arguments available with addMissionEventHandler. | |||
| _this | Is used to make arguments of a script call (call, exec, execVM, spawn) visible and accessible to the script, also used in Event Handlers to pass appropriate params. | addAction, addEventHandler, addMissionEventHandler, addMPEventHandler, addMusicEventHandler, addPublicVariableEventHandler, call, ctrlAddEventHandler, ctrlSetEventHandler, displayAddEventHandler, displaySetEventHandler, editorSetEventHandler, exec, execFSM, execVM, inGameUISetEventHandler, kbAddTopic, onGroupIconClick, setMusicEventHandler, spawn, try | ||
| _target | ? | ? | ? | |
| _shift | ? | ? | ? | |
| _sentenceId | ? | ? | ? | |
| _pos | ? | ? | ? | |
| _owner | ? | ? | ? | |
| _new | Contains the newly created object. Old 3D-Editor only. | ? | ||
| _name | ? | ? | ? | |
| _leader | ? | ? | ? | |
| _jip | ? | ? | ? | |
| _isSelected | ? | ? | ? | |
| _isHighCommand | Returns true if player is in high command. | ? | ||
| _id | ? | ? | ? | |
| _group | Contains the newly selected group. | ? | ||
| _from | ? | ? | ? | |
| _forEachIndex | ? | |||
| _fnc_scriptNameParent | From within a Function, name of the function that called the current one (_fnc_scriptName used when not defined) | - | ? | |
| _fnc_scriptName | From within a Function, the TAG_fnc_functionName function name as string (e.g. "myTag_fnc_myFunction") | - | ? | |
| _exception | Exception handling using a try-catch statement declares this variable which contains details about the thrown exception in the try block. | ? | ? | |
| _destination | ? | ? | ? | |
| _alt | True or false depending on whether ALT Key was pressed | ? | ||
| _uid | User ID of leaving player. | ? | 
 
	