Page 13 of 27

Re: Advanced Tiled Loader

Posted: Wed Aug 29, 2012 5:59 pm
by JumperKenny
In Tiled i have to create a Tilelayer called "ground" and the stone should have the tile property "stone" with no value?

EDIT: Aaaah I think I've got my problem! Seems like I drew some invisible tiles in the tilelayer :P

Re: Advanced Tiled Loader

Posted: Wed Aug 29, 2012 6:24 pm
by KingRecycle
Yeah, I did try map.draw_objects = false but it doesn't seem to work.

Re: Advanced Tiled Loader

Posted: Wed Aug 29, 2012 6:49 pm
by Kadoba
KingRecycle wrote:Yeah, I did try map.draw_objects = false but it doesn't seem to work.
It should be drawObjects.
JumperKenny wrote:In Tiled i have to create a Tilelayer called "ground" and the stone should have the tile property "stone" with no value?

EDIT: Aaaah I think I've got my problem! Seems like I drew some invisible tiles in the tilelayer :P
It can be any value. Anything that isn't false or nil will test true.

Re: Advanced Tiled Loader

Posted: Thu Aug 30, 2012 1:23 am
by KingRecycle
That works. Main post says otherwise is why I got confused.

Re: Advanced Tiled Loader

Posted: Thu Aug 30, 2012 8:57 pm
by tv_user
Awesome library! It makes our days much easier

Re: Advanced Tiled Loader

Posted: Thu Aug 30, 2012 9:26 pm
by Kadoba
tv_user wrote:Awesome library! It makes our days much easier
I'm glad it helps you. :)

Re: Advanced Tiled Loader

Posted: Fri Aug 31, 2012 6:07 pm
by KingRecycle
So last night I remade a test map and set all the tiles to the correct properties.

But for some reason when I pass a variable to get tileData it errors.

So like ground.tileData(5,5).properties will work but

local x = 5
local y = 5

ground.tileData(x,y).properties will error.

I appreciate any help!

P.S. Excuse the messy code. I'm slowly changing everything.

Re: Advanced Tiled Loader

Posted: Sat Sep 01, 2012 9:18 am
by Kadoba
KingRecycle wrote:So last night I remade a test map and set all the tiles to the correct properties.

But for some reason when I pass a variable to get tileData it errors.

So like ground.tileData(5,5).properties will work but

local x = 5
local y = 5

ground.tileData(x,y).properties will error.

I appreciate any help!

P.S. Excuse the messy code. I'm slowly changing everything.
I'm not seeing that. I am however getting a nil index error when I try and move. That's because the code tries to access the tile properties without checking if the tile exists first.

Re: Advanced Tiled Loader

Posted: Sat Sep 01, 2012 4:41 pm
by KingRecycle
Really? Because the code I have now was working perfectly before.

But yeah you are right. Wow I should of tried that but it was working before so I didn't bother.

Thanks a lot.

Re: Advanced Tiled Loader

Posted: Tue Sep 04, 2012 5:57 pm
by Karai17
Hey, I've been trying out ATL and I am loving it so far but I have hit a snag and I cannot understand the issue... I am getting the following error:
Error: libs/AdvTiledLoader/Object.lua:144: attempt to index local 'self' (a number value)
This error makes no sense to me as the library seems to be working flawlessly with the provided example maps. If you could have a quick gander to see if I am totally mucking things up, I'd appreciate it c:

Do excuse the mess, I am learning as I go and will of course pretty things up eventually. c:

https://dl.dropbox.com/u/12958391/ATL-wonky.zip.love