Game Development Community

Getting Tile Data?

by Scott Johnson · in Torque Game Builder · 09/09/2006 (2:23 pm) · 2 replies

Is there a way to retrieve the underlying tile info, besides customData?

Primarily interested in:

Brush data.
Sprite data

I'm not able to .dump() on a tile, so I'm assuming that means it's not a typical object.

If this kind of data isn't available now, will it become so in the future?

Thanks.

#1
09/09/2006 (2:48 pm)
Try:
echo($layer.getTileType(%x, %y));
Obviously replace the $layer with what ever your layer is called, and %x and %y with the coords of the tile you're interested in.

I do this in my current project to find out if the tile actually has an image in it, or if it's empty.
#2
09/09/2006 (3:30 pm)
I get a response back like:

static tileMapImageMap 5

Which is perfect, as long as my assumption that the 5 is the "frame" being used (which it looks to be)

Thank you Philip!