Unity Plugin (UP) & API
Triggers are State Connections between 2 Nodes. They are identified by their Formula, which is the keyboard’s star symbol (*).
They do not change numeric values the way Formula and Node Modifiers do. Rather, a Trigger fires when all the inputs of its origin Node become satisfied: when each input brings in the number of Resources to the Node as indicated by its flow rate. A firing Trigger will, in turn, fire its target.
State Connections cannot act as triggers for Resource/State Connections (cannot point towards the Formula of a Resource Connection).
Triggers are commonly used in games to react to the redistribution of Resources.
In Monopoly, players might transfer money to the bank in order to trigger the transfer of property from the bank into their possession. Here’s a diagram showcasing this simple exchange of goods, in which a player pays 3 Money Resources to the bank for 1 Property.
Triggers are commonly used to fire passive Nodes that do nothing until the Trigger fires them. This enables you to set up a passive Node that fires only when certain circumstances arise in the game.
Here’s a diagram showcasing possible scenarios for using triggers.
Some games might require negative responses when the player doesn’t have the Resources needed by an automatic or randomly triggered element. For example, in Civilization when the player runs out of gold to pay the upkeep for his cities’ improvements, the game automatically sells some of them.
To simulate this type of event, Machinations includes Reverse Triggers.
A Reverse Trigger is a State Connection that has the formula !
If its source Node tries to pull Resources but cannot pull all Resources as indicated by the Source’s input Connections, the Reverse Trigger will fire its target Node.