Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 0
Imaguy1337

How do I print something on to a screen?

Question

I have my computer set up with a screen. Whenever I do print("Hello"), it prints out hello in the next line of code, which is visible on the screen. But how do I get the screen to not display the command log, and instead display text which I can edit? Ex : The screen says "Hello" in big letters but nothing else.

Thanks.

Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
Guest lordwolf76

There is a more efficient way to do it, by using the feature to print in a specific Pixel on the screen, but for Rule Boards and Staff boards that I don't want to change, I do the following. (Basically because I haven't learned the "proper" way to do it yet.

 

it is quick and dirty and works though.

local comp = require("component")
local event = require("event")
local gpu = comp.gpu

while true do

  gpu.setResolution(30, 6)
  gpu.setBackground(0XFF0000)
  gpu.setForeground(0X00CC00)
  print("")
  print("No PVP in Survival Map")
  print("We have an Anarchy World")
  print("and Arenas for PVP")
  print("")
os.sleep(30)

end


Obviously adjust Resolution to just fit your screen.
I use the above on a rather large screen at spawn.
By setting a small resolution it prints nice Large letters.
The while true loop will run forever. 

if set as autorun.lua, the program will run even if the pc gets restarted.
The require event still lets you [Ctrl Alt C] out of the program if you want to edit it.

As I stated this is dirty, but gets the job done.
I have a lot to learn to do it properly, but depending on your needs. This might work for you.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.