Redstone.getBundledOutput

From ComputerCraft Wiki
Revision as of 19:42, 6 July 2012 by 92.4.7.184 (Talk) (Undo revision 1968 by 91.121.27.33 (talk))

Jump to: navigation, search

----------------------------------------------------------------------------

if(rs.getBundledOutput("back") > "0") then

rs.setBundledOutput("back", 0)

else

rs.setBundledOutput("back", colors.red+colors.yellow)

end

----------------------------------------------------------------------------

this code will either power everything off or

everything(dependant on the colours you use)

on

----------------------------------------------------------------------------

if(rs.getBundledOutput("back") > "0") then

----------------------------------------------------------------------------

this part identifies ant bundled outputs that are on

using the greater than symbol

" > "

after they are identified if they are on or not

they are changed to the opposite state

1 = on

0 = off

1 goes to 0

0 goes to 1

----

----

----

Page created by acecheesecr14