R3vo/Sandbox1 – User
mNo edit summary |
mNo edit summary |
||
Line 14: | Line 14: | ||
| | | | ||
[[Trigger]]s | [[Trigger]]s | ||
| | | {{n/a}} | ||
|- | |- | ||
| | | | ||
Line 31: | Line 31: | ||
| | | | ||
[[Trigger]]s & [[Waypoint]]s | [[Trigger]]s & [[Waypoint]]s | ||
| | | {{n/a}} | ||
|- | |- | ||
| | | | ||
Line 48: | Line 48: | ||
| | | | ||
See description. | See description. | ||
| | | {{n/a}} | ||
|- | |- | ||
| | | | ||
Line 70: | Line 69: | ||
| | | | ||
[[apply]], [[count]], [[configClasses]], [[configProperties]], [[findIf]], [[forEach]], [[select]] | [[apply]], [[count]], [[configClasses]], [[configProperties]], [[findIf]], [[forEach]], [[select]] | ||
| | | {{n/a}} | ||
|- | |- | ||
| | | | ||
_units | _units | ||
| | | | ||
Stores units depending on the context it is used in. | |||
| | | | ||
[[Array]] of [[Object]]s | [[Array]] of [[Object]]s | ||
| | | | ||
[[commandFSM]], [[doFSM]], [[onDoubleClick]], [[onMapSingleClick]] | [[commandFSM]], [[doFSM]], [[onDoubleClick]], [[onMapSingleClick]] | ||
| | | {{GVI|ofp|1.85}} | ||
|- | |- | ||
| | | | ||
_topic | _topic | ||
| | | Stores the topic name. | ||
| [[String]] | |||
| | |||
| | | | ||
[[kbAddTopic]] | [[kbAddTopic]] | ||
| | | {{GVI|arma2|1.00}} | ||
|- | |- | ||
| | | | ||
_to | _to | ||
| | | Stores the unit that was switched to in [[onTeamSwitch]]. | ||
| [[Object]] | |||
| | | [[onTeamSwitch]] | ||
| {{GVI|arma2|1.00}} | |||
[[ | |||
| | |||
|- | |- | ||
| | | | ||
Line 114: | Line 104: | ||
| | | | ||
In SQS scripts. | In SQS scripts. | ||
| | | {{n/a}} | ||
|- | |- | ||
| | | | ||
Line 125: | Line 114: | ||
| | | | ||
See description. | See description. | ||
| | | {{n/a}} | ||
|- | |- | ||
| | | | ||
Line 132: | Line 120: | ||
| | | | ||
The [[FSM]] id for FSMs executed with [[execFSM]]. | The [[FSM]] id for FSMs executed with [[execFSM]]. | ||
| | | [[Number]] | ||
[[Number]] | | [[execFSM]] | ||
| | | {{GVI|arma3|1.54}} | ||
[[execFSM]] | |||
| | |||
{{GVI|arma3|1.54}} | |||
|- | |- | ||
| | | _thisEventHandler | ||
_thisEventHandler | | The index for Event Handlers added with [[addEventHandler]], [[addMPEventHandler]] or [[addMissionEventHandler]]. | ||
| | | [[Number]] | ||
The index for Event Handlers added with [[addEventHandler]], [[addMPEventHandler]] or [[addMissionEventHandler]]. | | [[addEventHandler]], [[addMissionEventHandler]], [[addMPEventHandler]] | ||
| | | {{n/a}} | ||
[[Number]] | |||
| | |||
[[addEventHandler]], [[addMissionEventHandler]], [[addMPEventHandler]] | |||
| | |||
|- | |- | ||
| | | _thisEvent | ||
_thisEvent | | The name of the Event added with [[addEventHandler]], [[addMPEventHandler]] or [[addMissionEventHandler]] as well as for config types EHs. | ||
| | | [[String]] | ||
The name of the Event added with [[addEventHandler]], [[addMPEventHandler]] or [[addMissionEventHandler]] as well as for config types EHs. | | [[addEventHandler]], [[addMissionEventHandler]], [[addMPEventHandler]] | ||
| | | {{GVI|arma3|2.06}} | ||
[[String]] | |||
| | |||
[[addEventHandler]], [[addMissionEventHandler]], [[addMPEventHandler]] | |||
| | |||
{{GVI|arma3|2.06}} | |||
|- | |- | ||
| | | _thisArgs | ||
_thisArgs | | Additional event handler arguments available with [[addMissionEventHandler]]. | ||
| | | [[Array]] | ||
Additional event handler arguments available with [[addMissionEventHandler]]. | | [[addMissionEventHandler]] | ||
| | | {{GVI|arma3|1.54}} | ||
[[Array]] | |||
| | |||
[[addMissionEventHandler]] | |||
| | |||
{{GVI|arma3|1.54}} | |||
|- | |- | ||
| | | _this | ||
_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. | ||
| | | [[String]] | ||
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]] | ||
| | | {{n/a}} | ||
[[String]] | |||
| | |||
[[addAction]], [[addEventHandler]], [[addMissionEventHandler]], [[addMPEventHandler]], [[addMusicEventHandler]], [[addPublicVariableEventHandler]], [[call]], [[ctrlAddEventHandler]], [[ctrlSetEventHandler]], [[displayAddEventHandler]], [[displaySetEventHandler]], [[editorSetEventHandler]], [[exec]], [[execFSM]], [[execVM]], [[inGameUISetEventHandler]], [[kbAddTopic]], [[onGroupIconClick]], [[setMusicEventHandler]], [[spawn]], [[try]] | |||
| | |||
{{ | |||
|- | |- | ||
| | | _target | ||
_target | |||
| | | | ||
| [[Object]] | |||
| | | [[addAction]], [[commandFSM]], [[doFSM]] | ||
[[addAction]], [[commandFSM]], [[doFSM]] | | {{n/a}} | ||
| | |||
|- | |- | ||
| | | _shift | ||
_shift | | Returns whether or not {{KeyboardShortcut|Shift}} was pressed. | ||
| | | [[Boolean]] | ||
| [[onDoubleClick]], [[onMapSingleClick]] | |||
| | | {{GVI|ofp|1.85}} | ||
| | |||
[[onDoubleClick]], [[onMapSingleClick]] | |||
| | |||
|- | |- | ||
| | | _sentenceId | ||
_sentenceId | | Contains the ID of given sentence. | ||
| | | [[String]] ??? | ||
? | | [[kbAddTopic]] | ||
| {{GVI|arma2|1.00}} | |||
? | |||
| | |||
[[kbAddTopic]] | |||
| | |||
|- | |- | ||
| | | _pos | ||
_pos | | Contains a position. What position depends on the command it was used in. | ||
| | | [[Array]] | ||
| [[onDoubleClick]], [[onMapSingleClick]], [[onShowNewObject]] | |||
| | | {{n/a}} | ||
| | |||
[[onDoubleClick]], [[onMapSingleClick]], [[onShowNewObject]] | |||
| | |||
|- | |- | ||
| | | _owner | ||
_owner | | [[owner|Owner]] id of the leaving player. | ||
| | | [[Number]] | ||
| [[onPlayerDisconnected]], [[onPlayerConnected]] | |||
| | | {{GVI|ofpe|1.00}} | ||
| | |||
[[onPlayerDisconnected]], [[onPlayerConnected]] | |||
| | |||
|- | |- | ||
| | | _new | ||
_new | | Contains the newly created object. '''Old''' 3D-Editor only. | ||
| | | [[Object]] | ||
Contains the newly created object. '''Old''' 3D-Editor only. | | [[addEditorObject]] | ||
| | | {{GVI|arma2|1.00}} | ||
[[Object]] | |||
| | |||
[[addEditorObject]] | |||
| | |||
|- | |- | ||
| | | _name | ||
_name | | [[profileName|Profile name]] of the the player. | ||
| | | [[String]] | ||
| [[onPlayerDisconnected]], [[onPlayerConnected]] | |||
| | | {{GVI|ofpe|1.00}} | ||
| | |||
[[onPlayerDisconnected]], [[onPlayerConnected]] | |||
| | |||
|- | |- | ||
| | | _leader | ||
_leader | | Contains the group leader. | ||
| | | [[Object]] | ||
| [[doFSM]] | |||
| {{GVI|arma1|1.00}} | |||
| | |||
[[ | |||
| | |||
|- | |- | ||
| | | _jip | ||
_jip | | Returns whether or not the player joined in progress. | ||
| | | [[Boolean]] | ||
| [[onPlayerDisconnected]], [[onPlayerConnected]] | |||
| | | {{GVI|arma3|1.50}} | ||
| | |||
[[onPlayerDisconnected]], [[onPlayerConnected]] | |||
| | |||
|- | |- | ||
| | | _isSelected | ||
_isSelected | | ? | ||
| | | ? | ||
? | |||
| | |||
? | |||
| | | | ||
[[onHCGroupSelectionChanged]] | [[onHCGroupSelectionChanged]] | ||
Line 393: | Line 310: | ||
? | ? | ||
|- | |- | ||
| | | _alt | ||
_alt | | Returns whether or not {{KeyboardShortcut|Alt}} was pressed | ||
| | | [[Boolean]] | ||
| [[onDoubleClick]], [[onMapSingleClick]] | |||
| | | {{n/a}} | ||
[[Boolean]] | |||
| | |||
[[onDoubleClick]], [[onMapSingleClick]] | |||
| | |||
|- | |- | ||
| | | |
Revision as of 17:27, 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. |
N/A | ||
thisList |
"Variable defined by Triggers and Waypoints:
|
N/A | ||
this |
|
See description. |
N/A | |
_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 |
N/A | |
_units |
Stores units depending on the context it is used in. |
1.85 | ||
_topic |
Stores the topic name. | String | 1.00 | |
_to |
Stores the unit that was switched to in onTeamSwitch. | Object | onTeamSwitch | 1.00 |
_time |
SQS ONLY. The time elapsed since the script started running. |
In SQS scripts. |
N/A | |
_thisScript |
The execVMed, called or spawned script handle from within itself. |
See description. |
N/A | |
_thisFSM |
Number | execFSM | 1.54 | |
_thisEventHandler | The index for Event Handlers added with addEventHandler, addMPEventHandler or addMissionEventHandler. | Number | addEventHandler, addMissionEventHandler, addMPEventHandler | N/A |
_thisEvent | The name of the Event added with addEventHandler, addMPEventHandler or addMissionEventHandler as well as for config types EHs. | String | addEventHandler, addMissionEventHandler, addMPEventHandler | 2.06 |
_thisArgs | Additional event handler arguments available with addMissionEventHandler. | Array | addMissionEventHandler | 1.54 |
_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. | String | addAction, addEventHandler, addMissionEventHandler, addMPEventHandler, addMusicEventHandler, addPublicVariableEventHandler, call, ctrlAddEventHandler, ctrlSetEventHandler, displayAddEventHandler, displaySetEventHandler, editorSetEventHandler, exec, execFSM, execVM, inGameUISetEventHandler, kbAddTopic, onGroupIconClick, setMusicEventHandler, spawn, try | N/A |
_target | Object | addAction, commandFSM, doFSM | N/A | |
_shift | Returns whether or not ⇧ Shift was pressed. | Boolean | onDoubleClick, onMapSingleClick | 1.85 |
_sentenceId | Contains the ID of given sentence. | String ??? | kbAddTopic | 1.00 |
_pos | Contains a position. What position depends on the command it was used in. | Array | onDoubleClick, onMapSingleClick, onShowNewObject | N/A |
_owner | Owner id of the leaving player. | Number | onPlayerDisconnected, onPlayerConnected | 1.00 |
_new | Contains the newly created object. Old 3D-Editor only. | Object | addEditorObject | 1.00 |
_name | Profile name of the the player. | String | onPlayerDisconnected, onPlayerConnected | 1.00 |
_leader | Contains the group leader. | Object | doFSM | 1.00 |
_jip | Returns whether or not the player joined in progress. | Boolean | onPlayerDisconnected, onPlayerConnected | 1.50 |
_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 |
Function, the TAG_fnc_functionName function name as string (e.g. "myTag_fnc_myFunction") | From within a
- |
? | |
_exception |
Exception handling using a try-catch statement declares this variable which contains details about the thrown exception in the try block. |
? |
? | |
_destination |
? |
? |
? | |
_alt | Returns whether or not Alt was pressed | Boolean | onDoubleClick, onMapSingleClick | N/A |
_uid |
User ID of leaving player. |
? |