Difference between revisions of "Redstone.getOutput"

From ComputerCraft Wiki
Jump to: navigation, search
m (Moved to CAT:LuaCoreFunctions)
Line 12: Line 12:
 
}}
 
}}
 
}}
 
}}
 +
 +
[[Category:Lua_Core_Functions]]

Revision as of 18:53, 28 November 2012


Grid Redstone.png  Function redstone.getOutput
Returns what was set with redstone.setOutput.
Syntax redstone.getOutput(string side)
Returns int
Part of ComputerCraft
API redstone

Examples

Grid paper.png  Example
Set the output of "left" to true, then print the output of "left".
Code
redstone.setOutput("left", true) -- Set the output on the left to true
print(redstone.getOutput("left")) -Print the output