Posted 21 October 2013 - 11:39 AM
So i have no idea how to finish it and making it working correctly.
I got a computer and on top of it i got a speaker.
At the moment i have:
in myprogram i have:
But how do i make so when i press the button (activate the redstone signal) the program will run myprogram?
I have tried with:
But that ended up repeating the speaker all over and i had to close minecraft completly and open it again before it stopped.
So yeah how to make the program only run myprogram once when i press my button? (btw the button is set on a stone block, so the computer is behind that stone block, so not sure if the button can activate the computer without a redstone beside it on another block)
I got a computer and on top of it i got a speaker.
At the moment i have:
if redstone.getInput("left",true) then
shell.run("myprogram")
end
in myprogram i have:
peripheral.wrap("up").speak("Hey there")
But how do i make so when i press the button (activate the redstone signal) the program will run myprogram?
I have tried with:
while true do
if redstone.getInput("left",true) then
shell.run("myprogram")
end
end
But that ended up repeating the speaker all over and i had to close minecraft completly and open it again before it stopped.
So yeah how to make the program only run myprogram once when i press my button? (btw the button is set on a stone block, so the computer is behind that stone block, so not sure if the button can activate the computer without a redstone beside it on another block)