Advertisement
Marlingaming

Bold Fighter 1 - Game

Feb 16th, 2022
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. local tArg = {...} --Map, Gamemode, AI
  2. local Map = "n"
  3. local Player_Cords = {1,1}
  4. local AI_Char = {}
  5. local AI_Cords = {}
  6. local GameMode = ""
  7.  
  8. local function Clear()
  9. term.clear()
  10. term.setCursorPos(1,1)
  11. end
  12.  
  13. local function DrawMap()
  14. local file = fs.open(fs.combine("os/System/Programs/BoldFighter/Maps",Map..".txt"),"r")
  15. local Content
  16. local X = 0
  17. local Y = 0
  18. repeat
  19. Content = file.readLine()
  20. for i = 1, string.len(Content) do
  21. paintutils.drawPixel(X + Player_Cords[1], Y + Player_Cords[2],string.sub(i,i))
  22. X = X + 1
  23. end
  24. X = 0
  25. Y = Y + 1
  26. until Content == nil
  27. end
  28.  
  29. Clear()
  30. DrawMap()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement