this: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
Line 14: Line 14:
*'''In Triggers'''
*'''In Triggers'''
**''"Condition" line'': The [[Boolean]] return value of the [[Mission Editor: Triggers|trigger]]'s conditions (e.g. "East Not Present" etc).
**''"Condition" line'': The [[Boolean]] return value of the [[Mission Editor: Triggers|trigger]]'s conditions (e.g. "East Not Present" etc).
**''"On Activation/Deactivation" line'': Returns the trigger name. ''(Seems to always return [[false]] in other games)''.
**''"On Activation/Deactivation" line'': Seems to always return false.
*'''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).

Revision as of 01:12, 20 September 2013


_this

  • In Scripts/Functions: The given arguments that were passed by a call, exec, execVM or spawn.
    For the arguments in scripts executed by mission-made actions or Event Handlers, check addAction and Event Handlers.
  • In Addons' config files: An array with the current object as its first (and only) element.
  • In Addons' custom UserActions: Unit that is activating the action.
  • In Dialogs: An array with the current control as its first (and only) element (only available during runtime).

this

  • In Addons' config files (e.g. UserActions, onInit, etc.): The object the entry belongs to.
  • In Dialogs: The player unit that activated control (e.g. via mouseEnter). false if non-activated.
  • In Object's "Init" line: The object the init line belongs to.
  • 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).

thislist

  • In Triggers ("Condition" or "On Activation/Deactivation" line): An Array of objects that are currently fulfilling the trigger's condition (same as the what is returned by the list command).
  • In Waypoints ("Condition" or "On Activation" line): An Array containing all group members that completed the respective waypoint.
    (thislist in a trigger's 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.)

thisTrigger

  • In Triggers ("Condition" or "On Activation/Deactivation" line): thisTrigger refers to the trigger itself.

See Also

About "This" A detailed tutorial by General Barron on the various forms of 'this' and where to use them.