Skip to main content

trigger_compare

trigger_compare icon
Point entityPorted from Featureful

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:

KeyDescriptionDefault
Base valueinitial_value

Sets the first number, as a number or a locus number, such as a game_number or a calc_ entity.

Default 0
Compare valuecompare_value

Sets the number that the entity compares the Base value with. It takes a number or a locus number, which the entity reads each time.

Default 0
Comparison to passtesttype

Sets 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)
Default Equal (0)
Fire on comparison passpass_target

Fires this target when the Comparison to pass is true.

Fire on comparison failfail_target

Fires this target when the Comparison to pass is false.

Fire on equaltrigger_on_equal

Fires this target when the base value equals the compare value.

Fire on not equaltrigger_on_not_equal

Fires this target when the base value differs from the compare value.

Fire on less thantrigger_on_less

Fires this target when the base value is less than the compare value.

Fire on greater thantrigger_on_greater

Fires this target when the base value is greater than the compare value.

Fire on calc failtrigger_on_fail

Fires 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_compare while 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​

Changes since 1.38​

  • trigger_compare is new