Jump to content




need advanced monitor code can someone help?


  • You cannot reply to this topic
3 replies to this topic

#1 BlueWaste

  • New Members
  • 2 posts

Posted 26 March 2015 - 02:29 PM

I wrote this program:

write("How many Nether Stars do you want?")
local Num = tonumber( read() )
for i=1,Num do
redstone.setOutput("top", false)
sleep(1)
redstone.setOutput("top", true)
sleep(2)
redstone..setOutput("top", false)
sleep(1)
Print("You got "..tostring(i).." Nether Stars."
end

and it's working fine but i want it on a advanced monitor with buttons but i don't know how, can someone help?

Thanks in advance

#2 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 26 March 2015 - 11:38 PM

Are you sure that's what you want? Advanced monitors typically mean you can't use your keyboard, and even if you stuck with the display of an advanced computer, typing numbers is a heck of a lot faster and easier than entering them via any mouse-driven method.

That said, here's an example of a simple mouse-driven menu system, here's a guide about peripherals, and here's some documentation regarding os.pullEvent() - in particular, you're interested in the monitor_touch event.

#3 BlueWaste

  • New Members
  • 2 posts

Posted 27 March 2015 - 05:23 AM

it's not exactly what i want, i want there to be number buttons on the monitor and a + and - button, and maybe some code that detect when x number of items is in the chest and if nothing happens it shut down and on the monitor it prints that something i wrong or missing.

#4 Lupus590

  • Members
  • 2,028 posts
  • LocationUK

Posted 27 March 2015 - 08:10 AM

If you are happy to use a CC addon/peripheral then use the keyboard in this

http://www.computerc...oarperipherals/

Otherwise you will have to build a touch UI like Bomb Bloke suggested





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users