6 posts
Posted 15 November 2014 - 06:34 AM
I don't know how to code what so ever and im trying to make a redstone activated computer to put a message on a monitor
I know how do print("Hello World") and thats it
3057 posts
Location
United States of America
Posted 15 November 2014 - 10:36 PM
Here's some resources:
rs,getInputIterm.redirectperipheral.wrapredstone eventLoops, if, else, etc.Here's some example code:
local mon = peripheral.wrap( "side" ) --#change side to where the monitor is located
term.redirect( mon ) --#redirect the terminal
print( "This should appear on the monitor" ) --#this line isn't really necessary, it's just there to help
while true do --#start infinite loop
os.pullEvent( "redstone" ) --#wait for a change in the redstone state
if rs.getInput( "side" ) then --#change side to where the redstone is connected
print( "Your message" )
end
end --#end infinite loop