Fandom

武装突袭 Wiki

Magic Variables

简体 | 繁體

4,827个页面创建
于此维基上
添加新页面
评论0 Share

您使用了广告屏蔽软件!


Wikia通过广告运营为用户提供免费的服务。我们对用户通过嵌入广告屏蔽软件访问网站进行了使用调整。

如果您使用了广告屏蔽软件,将无法使用我们的服务。请您移除广告屏蔽软件,以确保页面正常加载。

Introduction 编辑

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).

Uses 编辑

  • The most frequently used magic variable probably is _this, which is used to make arguments of a script call (call, exec, execVM, spawn) visible and accessible to the script.
  • Other uses of magic variables can be seen in forEach, where the current element can be accessed via _x and the current index with _forEachIndex.
  • In the condition of the extended syntax of count variable _x refers to the current tested element.
  • Triggers also define thisList and thisTrigger, which is however only accessible within the activation or deactivation script.
  • Exception handling using a try..catch statement usually declare a magic variable named _exception, which contains details about the exception thrown in the try-block.

更多维基

随机维基