This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Skampi's profile picture

Making an Adv. Map, need help with "Room Solved" Monitor [Lua]

Started by Skampi, 17 April 2013 - 01:23 AM
Skampi #1
Posted 17 April 2013 - 03:23 AM
Hey guys, i'm currently trying to build a adv. map for FTB and i want to have some sort of a monitor that shows the room number and
when the room is solved, the backgroundcolor changes to green ( lime ).

This is what i got so far :


m = peripheral.wrap("back")
local d = 0

  m.setTextScale(4)
  m.setCursorPos(4, 2)
  m.setBackgroundColor(colors.black)
  m.write("1")
  d = 1

while d == 1 do
  if rs.getInput("bottom") then
m.setBackgroundColor(colors.lime)
  end
  sleep(2)
end

The program is getting started on startup with

shell.run("monitor back clear")
shell.run("monitor back text")
( The program is called text ) My problem now is that the background color doesn't change when i apply a rs-signal at the bottom.
Need Help :3
Sincerely,
Skampi.
LBPHacker #2
Posted 17 April 2013 - 03:26 AM
You want the monitor to be filled with only one color?
LordIkol #3
Posted 17 April 2013 - 03:38 AM
Hey guys, i'm currently trying to build a adv. map for FTB and i want to have some sort of a monitor that shows the room number and
when the room is solved, the backgroundcolor changes to green ( lime ).

This is what i got so far :


m = peripheral.wrap("back")
local d = 0

  m.setTextScale(4)
  m.setCursorPos(4, 2)
  m.setBackgroundColor(colors.black)
  m.write("1")
  d = 1

while d == 1 do
  if rs.getInput("bottom") then
m.setBackgroundColor(colors.lime)
  end
  sleep(2)
end

The program is getting started on startup with

shell.run("monitor back clear")
shell.run("monitor back text")
( The program is called text ) My problem now is that the background color doesn't change when i apply a rs-signal at the bottom.
Need Help :3
Sincerely,
Skampi.

after setting the background color you have to perform clear again to make the entire monitor this color.
if you want a specific part in that color you have to write " " to every position that should be colored this way

Greets Loki
Skampi #4
Posted 17 April 2013 - 03:57 AM
Thank you ^_^/>