How to set cool downs for buttons trigger zones

Solution 1:

There are a few ways you can do this, each having tradeoffs of complexity and ink cost.

Timer Chip Method

This circuit gives the button a 10 tick cooldown configured on the green pin of the Timer chip.

Timer Chip Method

Notes:

  • Cheapest cooldown circuit possible currently.
  • Reliable; it should always recover from any reasonable circuit glitches
  • Can have a dynamic cooldown by connecting the green pin of the timer chip to some circuit logic.
  • Cooldown can be activated from multiple sources by simply plugging each one into the OR chip.
  • Cannot be reset without an additional chip.

State Machine Method

This circuit relies on the "Minimum Time In State" setting on the Cool state. Configure the cooldown duration in the Cool state.

State Machine Method

Notes:

  • One chip more expensive than the Timer Chip Method
  • Cannot change cooldown duration dynamically with circuits
  • Easily add indicators for a cooldown by utilizing the variables stored in states. For instance, change text to red when the button is on cooldown.
  • The circuit can be reset with the Reset pin of the State Machine which might be useful when dealing with long cooldowns.

Combined Timer and State Machine

If you wish to apply cooldowns to particular pathways in a complex state machine, or if you wish to just simply have a dynamic cooldown time for the state machine method, this circuit will achieve that.

Combined State and Timer Method

Notes:

  • Is two chips more expensive than the Timer Chip Method
  • Has all the benefits of the State Machine Method and some of the benefits of the Timer Chip Method
  • Can be used on arbitrary edges in a larger state machine to manage complex cooldowns. For instance, this might be used to manage the cooldowns for a player's various special abilities.

All of these circuits are available for you to tinker with here.