Var Trigger: Difference between revisions

From Ashes of the Singularity - Official Wiki
Jump to navigation Jump to search
(Created page with "A '''Var trigger''' fires if a variable meets given criteria. ==Arguments== *'''Var''' - The name of the variable to check *'''Operator''' - What logical operator to use whe...")
 
No edit summary
Line 1: Line 1:
[[Category:Triggers]]
A '''Var trigger''' fires if a variable meets given criteria.
A '''Var trigger''' fires if a variable meets given criteria.


==Arguments==
== Arguments ==
 
*'''Var''' - The name of the variable to check  
*'''Var''' - The name of the variable to check  
*'''Operator''' - What logical operator to use when evaluating the variable (equal to, less than, etc) '''[ == | >= | <= | > | < |&nbsp;!= ]'''  
*'''Operator''' - What logical operator to use when evaluating the variable (equal to, less than, etc) '''[ == | >= | <= | > | < |&nbsp;!= ]'''  
*'''Value''' - The (integer) value to compare the variable against  
*'''Value''' - The (integer) value to compare the variable against  
==Common Usage==
 
*Tracking how many enemies have been destroyed for victory purposes
== Common Usage ==
*Having something fire once when one of several things happens
 
==Examples==
*Tracking how many enemies have been destroyed for victory purposes  
*Having something fire once when one of several things happens  
 
== Examples ==
 
  <Trigger Name="tWeasleyDead" Type="Var" Var="vWeasleyDead" Operator="==" Value="1" >
  <Trigger Name="tWeasleyDead" Type="Var" Var="vWeasleyDead" Operator="==" Value="1" >
This fires when the "vWeasleyDead" variable is equal to 1
This fires when the "vWeasleyDead" variable is equal to 1

Revision as of 20:22, 18 January 2017

A Var trigger fires if a variable meets given criteria.

Arguments

  • Var - The name of the variable to check
  • Operator - What logical operator to use when evaluating the variable (equal to, less than, etc) [ == | >= | <= | > | < | != ]
  • Value - The (integer) value to compare the variable against

Common Usage

  • Tracking how many enemies have been destroyed for victory purposes
  • Having something fire once when one of several things happens

Examples

<Trigger Name="tWeasleyDead" Type="Var" Var="vWeasleyDead" Operator="==" Value="1" >

This fires when the "vWeasleyDead" variable is equal to 1