Magic Variables
Jump to navigation
Jump to search
Introduction
Magic variables are 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. They are usually no longer present after leaving the scope (e.g. after script execution, or after a forEach statement).
The most frequently used magic variable probably is _this, which is used to make execution arguments accessible to a script. Other uses of magic variables can be seen in forEach, where the current element can be accessed via _x. Triggers also define thislist, which is however only accessible within the activation or deactivation script in the editor.