rednet controller able to invert signal order

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Darkwave5

New Member
Jul 29, 2019
1
0
0
So i was wondering if anyone knew how you could invert the order of something within the controller. what i mean is if you turn it on, it does "step A > step B > step C..." but when you turn it off it does "...step C > step B > step A" i know how to do it with old school redstone but it's clunky and doesn't quite fit my needs, was hopeful someone could point me in the right direction for how to do it with rednet.

exactly what I'm trying to get it to do:

press button
toggles t flip-flop
turn on orange line
delay
turn on magenta line
delay
turn on white line


press button again
toggles t flip-flop
turn off white line
delay
turn off magenta line
delay
turn off orange line
 

Platinawolf

New Member
Jul 29, 2019
147
0
0
I'd recommend using a CC computer instead... This code probably wont work right away and I don't have access to the tools I usually do ^^* But it should give you a good bit of the way. Do note that ANY redstone change will trigger the toggle as the code is currently layed out. It will delay for TimeToSLeep seconds (second variable) between each cascade. The first turn off will occur as fast as the signal is recieved. Then it will sleep for BufferTime before quickly returning back to being ready to turn it back on/off. Not sure if it accepts the on = !on . That line is supposed to make on (true if its false) and (false if its true).

on = false
TimeToSleep=5
BufferTime=2
while true do
local event = os.pullEvent("redstone") print("Redstone input changed.")

if !on then
rs.setBundledOutput("top", colors.orange)
sleep(TimeToSleep)
rs.setBundledOutput("top", colors.orange + colors.magenta)
sleep(TimeToSleep)
rs.setBundledOutput("top", colors.orange + colors.magenta + colors.white)
sleep(BufferTime)
end
if on then

rs.setBundledOutput("top", colors.magenta + colors.white)
sleep(TimeToSleep)
rs.setBundledOutput("top", colors.white)
sleep(TimeToSleep)
rs.setBundledOutput("top", 0)
sleep(BufferTime)
end
on = !on
end