Terraria

Terraria

Not enough ratings
Wiring stuff: How to reset a mechanism, or how to force anything be off (or on, as you want)
By Zozotruc
Mechanisms with wires in Terraria are based on activation. We can toggle [generally between two states: on/off] the state of a component; but we can't choose for it if it will be on or off, just activate it from on to off or from off to on. Really? We cannot?
   
Award
Favorite
Favorited
Unfavorite
Theory time! (you can go directly to wiring if you want)
We have any mechanism, torch, actuator etc. and we can toggle from off to on and from on to off. I'm gonna name it... er... that Thing.

On...


And off.


For example ;)


And we want a switch or a lever that will turn this first part off, and that lever doesn't care whether the Thing is on or off. It will turn the Thing off. I'm gonna name it the Holy Lever.

Yep, I made a screenshot for the Holy Lever. It's just a regular lever with yellow paint.


As I said in the description, it won't be that easy, because it's just impossible to turn it off directly, with a "special switch" or anything.
Algorithmic time! (You can skip to the wiring part, it's dangerous here!)
We can use logic gates and logic lamps to solve the problem

The state of the Thing will be represented by a logic lamp, the L1 and the state of the Holy Lever will be represented by the L2, another logic lamp. The thing we want to change thanks to the logic gate is the state of the Thing, so the logic gate will be connected to the Thing. If you managed to understand me, GG!

So the question is: which logic gate will we be using for the output?

Output is by default off

When L2 is on (Holy lever used):
  • If L1 is on (the Thing on):
    • So the output must be *on* to toggle the state of the Thing.
    • That will make L1 off btw and the game won't be happy because an input and the output are directly connected together
  • If L1 is off:
    • The output stays off.
When L2 is off... just do nothing

So if L1 and L2 are on, switch on the logic gate, in other cases keep it off

We're just gonna use a and logic gate!
Wiring time!
So... do something like this.


The Holy Lever is connected to a logic lamp, the Thing is connected with a logic lamp and the logic gate.
Using the Lever will force the Thing to be switched off and prevent the Thing to be switched on again.

So if you just want to reset your mechanisms, don't forget to switch the Lever two times!


[The particles are completely normal, the game makes these when it is angry for some reasons]

This reset system should be useful...

For upgrading my 7-segment display personally!


Good luck to make it!