Search found 6 matches

by Kumlin
Sat Sep 21, 2013 2:57 am
Forum: Support and Development
Topic: Tile-map Example help
Replies: 4
Views: 2607

Re: Tile-map Example help

Thanks for your help I got it working now! Pretty new too lua so I sometimes get lost :/
by Kumlin
Fri Sep 20, 2013 11:36 am
Forum: Support and Development
Topic: Tile-map Example help
Replies: 4
Views: 2607

Re: Tile-map Example help

added this line of code under draw_map()

Code: Select all

love.graphics.print(mapY, 100, 100, 0, 1, 1)
And it prints nothing also I would expect to see the tiles moving even if they were all the same I'd give you the file but it says the board quota has been reached so yeah...
by Kumlin
Fri Sep 20, 2013 2:37 am
Forum: Support and Development
Topic: Tile-map Example help
Replies: 4
Views: 2607

Tile-map Example help

Below is my code modified off of the wiki tutorial I cannot use the arrows keys to move my map around I have no idea what I did wrong :/ function love.load() tile = {} tile [0] = love.graphics.newImage("perfectHex.jpg") love.graphics.setBackgroundColor(255, 255, 255) mapW = 132 mapH = 132 ...
by Kumlin
Thu Sep 12, 2013 4:16 pm
Forum: Support and Development
Topic: Need help reading a .txt file
Replies: 4
Views: 3151

Re: Need help reading a .txt file

Thanks so much that worked! Also I need to keep the selector function because I intend to use that throughout my code and rather than typing math.random every time I just want to use the selector function. Another thing I realized is that I need to get the process that selects the item out of the dr...
by Kumlin
Thu Sep 12, 2013 3:56 pm
Forum: Support and Development
Topic: Need help reading a .txt file
Replies: 4
Views: 3151

Re: Need help reading a .txt file

Figured out how to read a file it was really easy once I didn't pack it into the .love file. but I have encountered another problem! In the code below I wanted to select a random line from my text file to print out but I keep getting the same error. grapics.lua:1265: bad argument #1 to 'print1' (str...
by Kumlin
Thu Sep 12, 2013 2:51 pm
Forum: Support and Development
Topic: Need help reading a .txt file
Replies: 4
Views: 3151

Need help reading a .txt file

here is my code function love.load() local file = assert(io.open("obj.txt", "r")) file:seek("set") stringTwo = file:read("*line") end function love.update() end function love.draw() love.graphics.print(stringTwo, 100, 100) end It says the file does not exist e...