I am building a simple microcontroller to use as a sort of toggle latch. The idea is I'll have multiple buttons connected to different colored wires connected to the input, and pressing one will set that color to ON on the output until the user presses a different button.
The problem is the redstone_changed event doesn't pass back which color initiated the event, and in the time it takes for a For loop to iterate through the colors and find the one that is currently ON, it has already turned OFF again (minecraft buttons only issue a pulse for a moment). Is there any way to get the color that initiated the redstone_changed event or a way to get a snapshot of the current input of all colors that I can then iterate through, or any other solution?
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
I am building a simple microcontroller to use as a sort of toggle latch. The idea is I'll have multiple buttons connected to different colored wires connected to the input, and pressing one will set that color to ON on the output until the user presses a different button.
The problem is the redstone_changed event doesn't pass back which color initiated the event, and in the time it takes for a For loop to iterate through the colors and find the one that is currently ON, it has already turned OFF again (minecraft buttons only issue a pulse for a moment). Is there any way to get the color that initiated the redstone_changed event or a way to get a snapshot of the current input of all colors that I can then iterate through, or any other solution?
Link to post
Share on other sites