R3vo/Sandbox1 – User

From Bohemia Interactive Community
Jump to navigation Jump to search
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.
|
[[Object]] or [[Boolean]]
|
|
-
-
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]]
doFSM
onDoubleClick
onMapSingleClick
|
|
-
-
Line 105: Line 102:
?
?
|
|
kbAddTopic
[[kbAddTopic]], [[onTeamSwitch]]
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]]
addMissionEventHandler
addMPEventHandler
|
|
?
?
Line 164: Line 157:
[[String]]
[[String]]
|
|
addEventHandler
[[addEventHandler]], [[addMissionEventHandler]], [[addMPEventHandler]]
addMissionEventHandler
addMPEventHandler
|
|
{{GVI|arma3|2.06}}
{{GVI|arma3|2.06}}
Line 173: Line 164:
_thisArgs
_thisArgs
|
|
Additional Event Handler arguments available with [[addMissionEventHandler]]
Additional event handler arguments available with [[addMissionEventHandler]].
|  
|  
[[String]]
[[Array]]
|
|
addMissionEventHandler
[[addMissionEventHandler]]
|
{{GVI|arma3|1.54}}
|-
|
_thisArgs
|
Additional Event Handler arguments available with [[addMissionEventHandler]]
|
[[String]]
|
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
[[addAction]], [[addEventHandler]], [[addMissionEventHandler]], [[addMPEventHandler]], [[addMusicEventHandler]], [[addPublicVariableEventHandler]], [[call]], [[ctrlAddEventHandler]], [[ctrlSetEventHandler]], [[displayAddEventHandler]], [[displaySetEventHandler]], [[editorSetEventHandler]], [[exec]], [[execFSM]], [[execVM]], [[inGameUISetEventHandler]], [[kbAddTopic]], [[onGroupIconClick]], [[setMusicEventHandler]], [[spawn]], [[try]]
addEventHandler
addMissionEventHandler
  addMPEventHandler
addMusicEventHandler
addPublicVariableEventHandler
call
ctrlAddEventHandler
ctrlSetEventHandler
displayAddEventHandler
displaySetEventHandler
editorSetEventHandler
exec
execFSM
execVM
inGameUISetEventHandler
kbAddTopic
onGroupIconClick
setMusicEventHandler
spawn
try"
 
|
|
{{GVI|arma3|1.54}}
{{GVI|arma3|1.54}}
Line 228: Line 186:
_target
_target
|
|
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
[[addAction]], [[commandFSM]], [[doFSM]]
commandFSM
doFSM"
 
 
|
|
?
?
Line 244: Line 197:
_shift
_shift
|
|
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.
?
 
|  
|  
?
?
|
|
onDoubleClick
[[onDoubleClick]], [[onMapSingleClick]]
  onMapSingleClick
|
|
?
?
Line 256: Line 207:
|
|
_sentenceId
_sentenceId
|
|
 
?
|  
|  
?
?
|
|
kbAddTopic
[[kbAddTopic]]
|
|
?
?
Line 268: Line 218:
|
|
_pos
_pos
|
|
 
?
|  
|  
?
?
|
|
onDoubleClick
[[onDoubleClick]], [[onMapSingleClick]], [[onShowNewObject]]
onMapSingleClick
onShowNewObject
|
|
?
?
Line 283: Line 229:
|
|
_owner
_owner
|
|
 
?
|  
|  
?
?
|
|
onPlayerDisconnected
[[onPlayerDisconnected]], [[onPlayerConnected]]
onPlayerConnected
|
|
?
?
Line 299: Line 241:
_new
_new
|
|
 
Contains the newly created object. '''Old''' 3D-Editor only.
|  
|  
?
[[Object]]
|
|
 addEditorObject
[[addEditorObject]]
|
|
?
?
Line 310: Line 252:
_name
_name
|
|
 
?
|  
|  
?
?
|
|
onPlayerDisconnected
[[onPlayerDisconnected]], [[onPlayerConnected]]
onPlayerConnected
|
|
?
?
Line 322: Line 263:
_leader
_leader
|
|
 
?
|  
|  
?
?
|
|
commandFSM
[[commandFSM]], [[doFSM]]
doFSM
|
|
?
?
Line 333: Line 273:
|
|
_jip
_jip
|
|
 
?
|  
|  
?
?
|
|
onPlayerDisconnected
[[onPlayerDisconnected]], [[onPlayerConnected]]
onPlayerConnected
|
|
?
?
Line 346: Line 284:
|
|
_isSelected
_isSelected
|
|
 
?
|  
|  
?
?
|
|
 onHCGroupSelectionChanged
[[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
[[kbAddTopic]], [[onTeamSwitch]]
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
|
|
[[Exception handling]] using a [[try]]-[[catch]] statement declares this variable which contains details about the [[throw|thrown]] exception in the try block.
?
|  
|  
?
?
|
|
commandFSM
[[commandFSM]], [[doFSM]]
doFSM
|
|
?
?
Line 479: Line 400:
[[Boolean]]
[[Boolean]]
|
|
onDoubleClick
[[onDoubleClick]], [[onMapSingleClick]]
onMapSingleClick
|
|
?
?
|-
|-
|
|
 _uid
_uid
|
|
?
User ID of leaving player.
|  
|  
[[String]]
[[String]]
|
|
onPlayerDisconnected
[[onPlayerDisconnected]], [[onPlayerConnected]]
onPlayerConnected
|
|
?
?

Revision as of 13: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.

Object

Triggers

-

thisList

"Variable defined by Triggers and Waypoints:

  • Triggers:
    • accessible within the Condition, On Activation or On Deactivation script
    • defines an array of objects that have been detected by the trigger (same as what is returned by the list command)
    • thisList in a trigger's On Deactivation field seems to be undefined, and should not be used. It will either return an empty array, or possibly the contents of a different trigger.
  • Waypoints:
    • accessible within the Condition or On Activation script
    • defines an array containing all group members that completed the respective waypoint"

Array of Objects

Triggers & Waypoints

-

this

  • In Addons' config files (e.g. UserActions, onInit, etc.): The object to which the entry belongs
  • In Dialogs: The player unit that activated control (e.g. via mouseEnter). false if non-activated
  • In Object's ""Init"" line: The object to which the init line belongs
  • In Triggers
    • ""Condition"" line: The Boolean return value of the trigger's conditions (e.g. ""East Not Present"" etc)
    • ""On Activation/Deactivation"" line: Seems to always return false
  • 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)"

Object or Boolean

See description.

-

_y

Iterating over a HashMap with forEach will return the key as _x and the value as _y.

Anything

See description.

Arma 3 logo black.png2.02

_x

Represents the current element during a loop with: apply, count, configClasses, configProperties, findIf, forEach, select.

Anything

apply, count, configClasses, configProperties, findIf, forEach, select

-

_units

?

Array of Objects

commandFSM, doFSM, onDoubleClick, onMapSingleClick

-

_topic

?

?

kbAddTopic

-

_to

?

?

kbAddTopic, onTeamSwitch

-

_time

SQS ONLY. The time elapsed since the script started running.

Number

In SQS scripts.

-

_thisScript

The execVMed, called or spawned script handle from within itself.

Script Handle

See description.

-

_thisFSM

The FSM id for FSMs executed with execFSM.

Number

execFSM

Arma 3 logo black.png1.54

_thisEventHandler

The index for Event Handlers added with addEventHandler, addMPEventHandler or addMissionEventHandler.

Number

addEventHandler, addMissionEventHandler, addMPEventHandler

?

_thisEvent

The name of the Event added with addEventHandler, addMPEventHandler or addMissionEventHandler as well as for config types EHs.

String

addEventHandler, addMissionEventHandler, addMPEventHandler

Arma 3 logo black.png2.06

_thisArgs

Additional event handler arguments available with addMissionEventHandler.

Array

addMissionEventHandler

Arma 3 logo black.png1.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

Arma 3 logo black.png1.54

_target

?

?

addAction, commandFSM, doFSM

?

_shift

?

?

onDoubleClick, onMapSingleClick

?

_sentenceId

?

?

kbAddTopic

?

_pos

?

?

onDoubleClick, onMapSingleClick, onShowNewObject

?

_owner

?

?

onPlayerDisconnected, onPlayerConnected

?

_new

Contains the newly created object. Old 3D-Editor only.

Object

addEditorObject

?

_name

?

?

onPlayerDisconnected, onPlayerConnected

?

_leader

?

?

commandFSM, doFSM

?

_jip

?

?

onPlayerDisconnected, onPlayerConnected

?

_isSelected

?

?

onHCGroupSelectionChanged

?

_isHighCommand

Returns true if player is in high command.

Boolean

onCommandModeChanged

?

_id

?

?

onPlayerDisconnected

?

_group

Contains the newly selected group.

Group

onHCGroupSelectionChanged

?

_from

?

?

kbAddTopic, onTeamSwitch

?

_forEachIndex

Represents the (zero-based) index of a forEach _x element.

Number

forEach

?

_fnc_scriptNameParent

not engine-maintained, but added by functions_f/initFunctions.sqf script – see scriptName

From within a Function, name of the function that called the current one (_fnc_scriptName used when not defined)

String

-

?

_fnc_scriptName

not engine-maintained, but added by functions_f/initFunctions.sqf script – see scriptName
From within a Function, the TAG_fnc_functionName function name as string (e.g. "myTag_fnc_myFunction")

String

-

?

_exception

Exception handling using a try-catch statement declares this variable which contains details about the thrown exception in the try block.

?

try-catch

?

_destination

?

?

commandFSM, doFSM

?

_alt

True or false depending on whether ALT Key was pressed

Boolean

onDoubleClick, onMapSingleClick

?

_uid

User ID of leaving player.

String

onPlayerDisconnected, onPlayerConnected

?