Need help for output randomization

Kymiro

Terrarian
So I myself have basically no idea what a smart use of logic gates looks like, so please help me like a five year old.

Within an adventure map I'm currently working on there's something that the player can activate after a certain amount of time
has passed - through a player sensor. That's this part I made with the little skill I have:

Terraria_cy4X0gS4xN.png


The blue wire on the bottom is then supposed to be connected to a randomizer which has to always choose one option from around 10-15 (I'm not sure as of now).

I've usually seen setups like this:

Terraria_kYOswNEHFX.png


But that's somehow not working. It sometimes doesn't activate an option at all or multiple at once, or did I do something wrong there?
And no, I don't really understand how it works.

So, if someone could help me I would thank you very much and maybe give you a hug if you ask nicely.
 
Last edited:
So I myself have basically no idea what a smart use of logic gates looks like, so please help me like a five year old.

Within an adventure map I'm currently working on there's something that the player can activate after a certain amount of time
has passed - through a player sensor. That's this part I made with the little skill I have:

Terraria_cy4X0gS4xN.png
That's no too bad. :) It looks a little funky, but as far as I can tell, it should work fine. The thing you made in the middle with the logic gate is essentially a transistor, with the player sensor as the "collector" and the timer output as the "base". (More info in the second section here: Guide - A reference guide for simple logic devices)

I've usually seen setups like this:

Terraria_HmSHMxWRWD.png


But that's somehow not working. It sometimes doesn't activate an option at all or multiple at once, or did I do something wrong there?
And no, I don't really understand how it works.
The idea behind this, is to only have one of those 16 gates in the decoder part active at a time. To achieve this, all of the gates should have a different starting pattern. Right now the 3rd and 10th gate look the same, so if you randomly only trigger the bottom most faulty logic gate, you'll get an output from both of them.
A simple way to make all of your gate patterns unique, is to think about them as binary numbers, with, let's say, the bottom lamp being the least significant digit. On the first gate, you have 0, then you keep counting up, like this:

Capture 2020-03-31 23_14_20.png

(+one OFF lamp at the top of these, for the trigger. I forgot to add that.)

Another way to think about this same patter, is to say that the topmost lamp selects between the left and right half of all the gates, then the second lamp says which half of that bunch you want to activate, and so on.
 
That's no too bad. :) It looks a little funky, but as far as I can tell, it should work fine. The thing you made in the middle with the logic gate is essentially a transistor, with the player sensor as the "collector" and the timer output as the "base". (More info in the second section here: Guide - A reference guide for simple logic devices)


The idea behind this, is to only have one of those 16 gates in the decoder part active at a time. To achieve this, all of the gates should have a different starting pattern. Right now the 3rd and 10th gate look the same, so if you randomly only trigger the bottom most faulty logic gate, you'll get an output from both of them.
A simple way to make all of your gate patterns unique, is to think about them as binary numbers, with, let's say, the bottom lamp being the least significant digit. On the first gate, you have 0, then you keep counting up, like this:

View attachment 251519
(+one OFF lamp at the top of these, for the trigger. I forgot to add that.)

Another way to think about this same patter, is to say that the topmost lamp selects between the left and right half of all the gates, then the second lamp says which half of that bunch you want to activate, and so on.

Ah, okay. So it was me being stupid after all! It's working fine now.
I checked these darn gates many multiple times but alas it was simply me messing up.

But either way, thank you a lot and especially for the small explanation! <3
 
Back
Top Bottom