Advertisement
karelvysinka

Minicraft posuvny text

Feb 25th, 2014
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. --Nastaveni
  2. mon = peripheral.wrap("back") --umisteni monitoru (left, right, front, back)
  3. mon.setTextScale(4)           --Velikost textu
  4. strtpos = 12                  --Startovaci pozice na obrazovce
  5. speed = 0.2                   --rychlost posunu (v sekundach)
  6. text = "Toto je zobrazovany text"    --Zobrazovany text
  7.  
  8. pos = strtpos
  9. poslimit = 0 - strtpos
  10.  
  11. while true do
  12.  mon.clear()
  13.  mon.setCursorPos(pos, 1)
  14.  mon.write(text)
  15.  sleep(speed)
  16.  if pos == poslimit then
  17.   pos = strtpos
  18.  else
  19.   pos = pos - 1
  20.  end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement