trigger_compare

A trigger_compare compares two numbers when you trigger it and fires targets for the result. It is also a
master that is on while the comparison passes.
Attributes
The entity also has these common keys:
- Naming and triggering: Name
initial_valueSets the first number, as a number or a locus number, such as a game_number or a calc_ entity.
0compare_valueSets the number that the entity compares the Base value with. It takes a number or a locus number, which the entity reads each time.
0testtypeSets the comparison for Fire on comparison pass, Fire on comparison fail and the master.
- Equal (0)
- Greater or equal (1)
- Greater (2)
- Less or equal (3)
- Less (4)
- Not equal (5)
Equal (0)pass_targetFires this target when the Comparison to pass is true.
fail_targetFires this target when the Comparison to pass is false.
trigger_on_equalFires this target when the base value equals the compare value.
trigger_on_not_equalFires this target when the base value differs from the compare value.
trigger_on_lessFires this target when the base value is less than the compare value.
trigger_on_greaterFires this target when the base value is greater than the compare value.
trigger_on_failFires this target when one of the numbers can't be worked out.
Notes
- Every target fires with the use type Toggle and gets the activator of the trigger
- The four targets from Fire on equal to Fire on greater than fire by the result, and Comparison to pass doesn't change them
- A target that triggers the same
trigger_comparewhile it fires is ignored - As a master, it compares at the moment the master is checked, and it is off when a number can't be worked out
See also
game_number- holds a numbercalc_eval_number- works out a number from otherstrigger_condition- compares a key of an entity- Locus guide - setups with
trigger_compare
Changes since 1.38
trigger_compareis new
