holeow
Terrarian
So, as the ninja mouse I am I played with the WireMod source while the cat was away, and ended up with a new device meant to store values.
(It might be hard to see, but yes, the yellow led gets turned off. )
It would be usefull in plenty of places, such as storing the result of a mathematic addition to then use it later, store the name of a player somewhere to then being able to check if he is the one using the same mechanic stuff at a later time, and I'm wondering about how to use time values (To prevent, for example, a player from using one mechanic stuff twice in a row in less than [1/5/3600/ any constant time value / depending on other variables] seconds. )
This variable device has one issue that I can't fix (lack of knowledge).
If this variable is connected to other variable, it might lead to a loop changing its value once per frame, nothing exceptionally problematic so far, unless it is connected to math devices and to a sensor to create a logic such as this one :
The variable gets incremented by one every frame =>
It stops being incremented once a player gets close =>
It displays its value on text display tiles.
As the framerate is computer dependent, one client might run a bit faster than another one (I don't have the necessary setup right now to test it properly).
Example, one player with a nice computer will see that 7500 frames happened before the end of the loop.
Another one had a few framedrops because some explosions happened and lots of mobs were killed or whatever: He will see that only 7430 frames happened.
I believe those variables should be server-sided only, and should be sent to clients only during the frames where something really happened, such as the variable actually opening a door, changing the value of a torch, but also once in a while (lets say once per second) so a client might watch if the value gets modified. But I have no clue on how to create this behavior, and I'm not even sure if it's actually a good way of doing it, or even if it's worth being considered as there might only be a few cases where such kind of bug might break something .
(It might be hard to see, but yes, the yellow led gets turned off. )
It would be usefull in plenty of places, such as storing the result of a mathematic addition to then use it later, store the name of a player somewhere to then being able to check if he is the one using the same mechanic stuff at a later time, and I'm wondering about how to use time values (To prevent, for example, a player from using one mechanic stuff twice in a row in less than [1/5/3600/ any constant time value / depending on other variables] seconds. )
This variable device has one issue that I can't fix (lack of knowledge).
If this variable is connected to other variable, it might lead to a loop changing its value once per frame, nothing exceptionally problematic so far, unless it is connected to math devices and to a sensor to create a logic such as this one :
The variable gets incremented by one every frame =>
It stops being incremented once a player gets close =>
It displays its value on text display tiles.
As the framerate is computer dependent, one client might run a bit faster than another one (I don't have the necessary setup right now to test it properly).
Example, one player with a nice computer will see that 7500 frames happened before the end of the loop.
Another one had a few framedrops because some explosions happened and lots of mobs were killed or whatever: He will see that only 7430 frames happened.
I believe those variables should be server-sided only, and should be sent to clients only during the frames where something really happened, such as the variable actually opening a door, changing the value of a torch, but also once in a while (lets say once per second) so a client might watch if the value gets modified. But I have no clue on how to create this behavior, and I'm not even sure if it's actually a good way of doing it, or even if it's worth being considered as there might only be a few cases where such kind of bug might break something .
Last edited: