2 posts
Posted 12 November 2012 - 04:12 PM
I am a beginner and am trying to make a rock paper scissors program to learn and better understand lua and computercraft. I immediately ran into a problem. I want to do it using 4 buttons, a rock, paper, scissors, and start button. I want it to say "press start to begin" and start the game when they press start obviously. But I cant find a way to make my program wait for an input. I tried os.pullEvent(redstone.getInput('input side') == true) but it didn't seem to work. Any help is appreciated, thanks in advance.
671 posts
Location
That place over there. Y'know. The one where I am.
Posted 12 November 2012 - 08:47 PM
In this case, you would type:
if redstone.getInput("side") then
--What you want to do when you get the input
Glad to help,
[indent=2]Shnup :P/>/>[/indent]
252 posts
Location
The Netherlands
Posted 13 November 2012 - 04:57 AM
I understand that using redstone outside of the computer is easier, so I would also go with Shnup's solution.
But another way is to use the recently added Advanced Computers. They have mouse click support and can also show color.
I don't think that helped but if it did, you're welcome.
2 posts
Posted 13 November 2012 - 11:37 AM
Thanks, that was a pretty simple solution, hope to increase my lua knowledge from here! :P/>/>