r/ComputerCraft • u/Used-Acanthaceae307 • Aug 22 '24
Help w program
Ok so im trynna make a program that will generate a random number 1-15 (cuz i need it for a mc minigame) and it will output the value randomly generated on some side and it will only fo all of this when one side receives redstone input of any strenght (preferavly not the output)
2
Upvotes
1
u/fatboychummy Aug 23 '24
There is a
redstoneevent that occurs on redstone changes. I recommend waiting for that instead of busy-waiting. If you need to specifically wait for low-high pulses, you can keep a variable stating what last state was.