Variable Modify Rule
Line 1: | Line 1: | ||
− | The Variable Modify Rule is used to define and modify a custom variable within a [[Session|session]]. | + | The Variable Modify Rule is used to define and modify a custom integer variable within a [[Session|session]]. The variable can then be shown to the player via the [[Variable Show Rule]] or tested to affect the session outcome via the [[Variable Check Rule]]. |
+ | |||
+ | === Configuration Options === | ||
+ | |||
+ | ==== Mode ==== | ||
+ | The rule can be run in three different modes:<br> | ||
+ | '''Add:''' Adds the amount specified to the variable upon execution<br> | ||
+ | '''Subtract:''' Subtracts the amount specified from the variable upon execution<br> | ||
+ | '''Change:''' Sets the value of the variable to the specified amount upon execution<br> | ||
+ | |||
+ | ==== Amount ==== | ||
+ | Specifies the amount to be added to, subtracted from, or set to for the variable. | ||
+ | |||
+ | ==== Variable Name ==== | ||
+ | Specifies the variable name. Variable names are used to identify the variable between rules. They can be anything you like, but be sure the name is meaningful or you may forget what it does. | ||
+ | |||
+ | ==== Undo ==== | ||
+ | In the add and subtract modes it is possible to have the addition/subtraction undone if the rule execution is stopped. This can be handy for performing tests such as whether a train is at a specific location. | ||
+ | |||
+ | ==== Upper/Lower Limits ==== | ||
+ | You can optionally have the rule specify a minimum and maximum value for your defined variable. This option is disabled by default. | ||
+ | |||
[[Category:Rules]] | [[Category:Rules]] | ||
[[Category:TBD]] | [[Category:TBD]] |
Revision as of 00:58, 19 February 2013
The Variable Modify Rule is used to define and modify a custom integer variable within a session. The variable can then be shown to the player via the Variable Show Rule or tested to affect the session outcome via the Variable Check Rule.
Contents |
Configuration Options
Mode
The rule can be run in three different modes:
Add: Adds the amount specified to the variable upon execution
Subtract: Subtracts the amount specified from the variable upon execution
Change: Sets the value of the variable to the specified amount upon execution
Amount
Specifies the amount to be added to, subtracted from, or set to for the variable.
Variable Name
Specifies the variable name. Variable names are used to identify the variable between rules. They can be anything you like, but be sure the name is meaningful or you may forget what it does.
Undo
In the add and subtract modes it is possible to have the addition/subtraction undone if the rule execution is stopped. This can be handy for performing tests such as whether a train is at a specific location.
Upper/Lower Limits
You can optionally have the rule specify a minimum and maximum value for your defined variable. This option is disabled by default.