R3vo/Sandbox1 – User
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 |
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 |
True or false depending on whether ALT Key was pressed |
? | ||
_uid |
User ID of leaving player. |
? |