Search found 10 matches
- Mon Oct 21, 2013 8:44 pm
- Forum: Support and Development
- Topic: set mouseklick start
- Replies: 7
- Views: 3756
Re: set mouseklick start
Hi, I still need your help. Please, I could not implement the suggestion. Can someone tell me what's wrong in my code? Thank you
- Sun Oct 20, 2013 11:26 am
- Forum: Support and Development
- Topic: set mouseklick start
- Replies: 7
- Views: 3756
Re: set mouseklick start
Sorry, now the lua file
- Thu Oct 17, 2013 9:45 am
- Forum: Support and Development
- Topic: set mouseklick start
- Replies: 7
- Views: 3756
Re: set mouseklick start
Thank you,Roland, I tried a variable named status true or false but it doesn't work function love.load() map={} k=1 v=1 for line in love.filesystem.lines("labyrinth1.txt") do map[k] = {} for i in string.gmatch(line,"%S+") do map[k][v] = tonumber(i) v= v+1 end k= k+1 v=1 end targe...
- Wed Oct 16, 2013 9:53 pm
- Forum: Support and Development
- Topic: set mouseklick start
- Replies: 7
- Views: 3756
Re: set mouseklick start
I tried so . i took x ,y =0 . the start image was drawn at x,y =0 and as I klicked with the mouse it disappered
- Wed Oct 16, 2013 9:09 pm
- Forum: Support and Development
- Topic: set mouseklick start
- Replies: 7
- Views: 3756
set mouseklick start
Hi, I have a labyrinth and want to click with the mouse to set the start point. I call love.mousepressed(x, y, button) and have defined start, but love draw is executed at first and if I say start point in love.draw , it has a nil value. So the start image should appear when the mouse is clicked.Can...
- Wed Oct 16, 2013 8:39 pm
- Forum: Support and Development
- Topic: read textfile and save in a multidimensional table
- Replies: 11
- Views: 5039
Re: read textfile and save in a multidimensional table
Hi,
thank you all for the big help. It works and that's the code
thank you all for the big help. It works and that's the code
Code: Select all
map={}
k=1
v=1
for line in love.filesystem.lines("labyrinth1.txt") do
map[k] = {}
for i in string.gmatch(line,"%S+") do
map[k][v] = tonumber(i)
v= v+1
end
k= k+1
v=1
end
- Sun Oct 13, 2013 8:51 pm
- Forum: Support and Development
- Topic: read textfile and save in a multidimensional table
- Replies: 11
- Views: 5039
Re: read textfile and save in a multidimensional table
Hi, these are the files, there also asstets but I can't post them,because of the limit of files. The txt is that: 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 1 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 1 1 1 1 0 1 ...
- Sun Oct 13, 2013 3:41 pm
- Forum: Support and Development
- Topic: read textfile and save in a multidimensional table
- Replies: 11
- Views: 5039
Re: read textfile and save in a multidimensional table
Hi, thanks for the answer. I've tried with the code last posted. but I can still not load the txt file and I need it so much. that's my code please tell me what is wrong, I can't find the mistake. tabstring = {} for line in love.filesystem.lines("assets/labyrinth3.txt") do table.insert(tab...
- Tue Oct 08, 2013 8:16 pm
- Forum: Support and Development
- Topic: read textfile and save in a multidimensional table
- Replies: 11
- Views: 5039
Re: read textfile and save in a multidimensional table
Hi, thank you very much and sorry that I answer so late, I didn't have much time recently. I've tried Plu's Code, but it didn't work. I tried something else, that I thought it would work, but it still doesn't. So my file looks like this now: 1 1 1 1 0 0 0 0 0 1 1 0 0 0 1 1 1 1 0 0 0 0 and that's my ...
- Wed Sep 25, 2013 12:52 pm
- Forum: Support and Development
- Topic: read textfile and save in a multidimensional table
- Replies: 11
- Views: 5039
read textfile and save in a multidimensional table
Hi, i,m trying to read a .txt that represents a labyrinth in the form and than put it in a table 1 1 0 1 1 1 0 this is my code, but it doesn#t really work. Can someone tell me whats the problem, that happens in conf.lua map = {} for line in love.filesystem.lines("labyrinth2.txt") do for x ...