Connecting two Timers Together Explanation

Spiron

Terrarian
When you connect two timers of the same length with one wire and turn one on this happens:
T1: on T2: off
T1: on T2: on
So far I understand, but then:
T1: off T2: on
T1: on T2: on
T1: on T2: off
And repeats, but I thought that both would turn themselves off. My understanding was that they would each send a signal turning the other off. And as shown before, it doesn't work like that.

PS: I am very new to wiring in terraria, so please go easy on me for not understanding this.
 
T1 turns T2 on. the reason that they do not all turn off is because the signal travels down the wire and activates in sequence, and since one of them turns the other off before it can send its signal, that's why one will always be on.
 
T1 turns T2 on. the reason that they do not all turn off is because the signal travels down the wire and activates in sequence, and since one of them turns the other off before it can send its signal, that's why one will always be on.
Thank you for replying! How does the sequence of wiring work? What I mean is, if the wiring had a bit of delay, from the top it would go:
T1: on T2: off
T1: on T2: on (delay)
T1: on T2: off
Right?
 
T1 turns T2 on. the reason that they do not all turn off is because the signal travels down the wire and activates in sequence, and since one of them turns the other off before it can send its signal, that's why one will always be on.
To clarify, it always happens like this, it's never random. It will loop forever exactly like shown.
 
Wiring doesn't have any sort of delay (except for logic gate stages, but that doesn't matter here). I'll try to give a play-by-play, hopefully, this will clear things up.
First of all, Terraria keeps a list of at most 1000 "mechs", which are essential timers. These keep track of cooldown times for things like dart traps, but timers also use them to activate a wire signal periodically. When a normal trap like mech runs out of time, it just gets removed from the list, but timers instead emit a signal, and then reset their time, always to 18000 frames. (Which then gets divided to form the various different kinds of timer delays.)
So, here's what happens when two timers are connected together, and you turn one on manually:
  • T1 gets added to the mech list with 18000 frames left.
  • Some time passes, the game keeps updating mechs, decrementing their time, until T1 gets sufficiently low to trigger on the next update.
  • The game once again starts looking at the list of mechs, in order.
  • Once it reaches T1, it decrements the time, and sees that it should trigger right now, so it does.
    • Wire triggers always ignore the tile(s) that started them, so T1 is unaffected by this.
    • T2 turn on, it is added to mechs for triggering later, with a time of 18000, but importantly, it will be placed into the list after T1.
  • The mech time value for T1 is reset to 18000.
  • The game continues updating mechs, still during the same frame, and eventually comes upon T2
  • T2 is not ready to trigger, but it's frame time is decreased to 17999.
  • At this point, T2 has less time left than T1, so the next timer to trigger will be T2.
  • Time passes, updates happen.
  • Time is up for T2, it gets triggered, trips the wire, turns T1 off.
  • Time for T2 is reset to 18000.
  • Repeat from point 2, but switch "T1" and "T2" around.
So, basically, the point is, a timer, activated by a another timer with the same length, will always trigger before the timer that activated it. If they are connected, the second timer will turn off the first one, before the first one has a chance to activate.
 
Wiring doesn't have any sort of delay (except for logic gate stages, but that doesn't matter here). I'll try to give a play-by-play, hopefully, this will clear things up.
First of all, Terraria keeps a list of at most 1000 "mechs", which are essential timers. These keep track of cooldown times for things like dart traps, but timers also use them to activate a wire signal periodically. When a normal trap like mech runs out of time, it just gets removed from the list, but timers instead emit a signal, and then reset their time, always to 18000 frames. (Which then gets divided to form the various different kinds of timer delays.)
So, here's what happens when two timers are connected together, and you turn one on manually:
  • T1 gets added to the mech list with 18000 frames left.
  • Some time passes, the game keeps updating mechs, decrementing their time, until T1 gets sufficiently low to trigger on the next update.
  • The game once again starts looking at the list of mechs, in order.
  • Once it reaches T1, it decrements the time, and sees that it should trigger right now, so it does.
    • Wire triggers always ignore the tile(s) that started them, so T1 is unaffected by this.
    • T2 turn on, it is added to mechs for triggering later, with a time of 18000, but importantly, it will be placed into the list after T1.
  • The mech time value for T1 is reset to 18000.
  • The game continues updating mechs, still during the same frame, and eventually comes upon T2
  • T2 is not ready to trigger, but it's frame time is decreased to 17999.
  • At this point, T2 has less time left than T1, so the next timer to trigger will be T2.
  • Time passes, updates happen.
  • Time is up for T2, it gets triggered, trips the wire, turns T1 off.
  • Time for T2 is reset to 18000.
  • Repeat from point 2, but switch "T1" and "T2" around.
So, basically, the point is, a timer, activated by a another timer with the same length, will always trigger before the timer that activated it. If they are connected, the second timer will turn off the first one, before the first one has a chance to activate.
Thank you so very much, I understand now. also, how do I mark this as solved?
 
you can rename the topic to include [Solved], but this isn't just a question and answer forum, it's for discussions, so you don't need to flag it as solved
 
Back
Top Bottom