Is there a way to access to the properties of a tile of a tilemap?
by Oriol "Orgarus" Garcia · in Torque Game Builder · 08/13/2009 (6:55 am) · 4 replies
Hello there,
I want to access a tile of a tilemap as the game is running to change the frame of the image, is it possible or I have to make a tilemap via script instead of the tilemap editor?
Thanks in advance.
I want to access a tile of a tilemap as the game is running to change the frame of the image, is it possible or I have to make a tilemap via script instead of the tilemap editor?
Thanks in advance.
About the author
Recent Threads
#2
I hadn't seen this thread earlier.
From what I can tell you want to simply update the image that is being displayed at a given tileMap location?
You can create the tileMap in the editor and name it something in the scripting rollout, such as testTileMap. Then use the following code to updated what imageMap is displayed in that tile:
and clear it using:
Best - patrick
08/14/2009 (12:54 pm)
Hey Oriol,I hadn't seen this thread earlier.
From what I can tell you want to simply update the image that is being displayed at a given tileMap location?
You can create the tileMap in the editor and name it something in the scripting rollout, such as testTileMap. Then use the following code to updated what imageMap is displayed in that tile:
testTileMap.setStaticTile(%column, %row, ImageMapName);...where ImageMapName is the name of an imageMap that you created. (usually in the editor)
and clear it using:
testTileMap.clearTile(%column, %row)
Best - patrick
#3
I pretend to do a minimap for my game and my idea was (now IS again) to change the frame of a tile.
My comment of today was the consequence of days and days coding, improvising solutions to do relatively simple things, learning the way to make the GUI's Hell bend, hitting my head against the wall (figuratively speaking... or not :)), visiting the forums... this sort of things. It's fun, anyway.
Thanks again Patrick, see you here in the forums (or preferably presenting a finished project, huh?).
08/14/2009 (2:02 pm)
THANKS Patrick! It will be very useful. I pretend to do a minimap for my game and my idea was (now IS again) to change the frame of a tile.
My comment of today was the consequence of days and days coding, improvising solutions to do relatively simple things, learning the way to make the GUI's Hell bend, hitting my head against the wall (figuratively speaking... or not :)), visiting the forums... this sort of things. It's fun, anyway.
Thanks again Patrick, see you here in the forums (or preferably presenting a finished project, huh?).
Torque Owner Oriol "Orgarus" Garcia
Default Studio Name
Fine.
I'll find my own solution without using a tilemap (another point in TGB's score in addition to a poor documentation).