TGB AStar editor question
by Randy Condon · in Torque Game Builder · 07/01/2008 (11:57 am) · 4 replies
I've read the Astar docs and all seems wonderful.
I'm having trouble in one area. Is there a way to assign a weight to a tile through the TGB editor? I've looked everywhere to see if this is possible, but have had no luck. My apologies if this is really obvious and I can't find it.
Thanks.
I'm having trouble in one area. Is there a way to assign a weight to a tile through the TGB editor? I've looked everywhere to see if this is possible, but have had no luck. My apologies if this is really obvious and I can't find it.
Thanks.
#2
On further digging, I've seen an old bug where the custom data is not saved from the tile editor. That seems to be what is happening to me.
I'm still looking to see if that bug was fixed. I believe there was an issue where a change might have voided the way previous levels (or tile maps) got loaded?
The example level has all the tiles default to weight zero. I get that result also. What I can't seem to do is change the value from zero to something else for an indivdual tile. I also can't get individual tiles to have their own custom data. If I apply to one tile, it applies to all tiles.
Of course, I might be doing some wrong.
07/01/2008 (12:51 pm)
That's what I thought too.On further digging, I've seen an old bug where the custom data is not saved from the tile editor. That seems to be what is happening to me.
I'm still looking to see if that bug was fixed. I believe there was an issue where a change might have voided the way previous levels (or tile maps) got loaded?
The example level has all the tiles default to weight zero. I get that result also. What I can't seem to do is change the value from zero to something else for an indivdual tile. I also can't get individual tiles to have their own custom data. If I apply to one tile, it applies to all tiles.
Of course, I might be doing some wrong.
#3
07/01/2008 (4:03 pm)
Randy, you need to assign an imagemap to the tile in question. It cannot just contain custom data. You'll have to use a transparent imagemap.
#4
I did try one experiment, and it looks like I can now save out custom data from the tile editor.
If you have the source code, go to around line 5046 in t2dTileMap.cc (this is for 1.7.3).
There is a line to write out the custom data. It is commented. An added comment says this will be added when the new file format is ready. What's a little odd is the line to read custom data is not commented (around line 5204).
So I's held my breath and uncommented the write line. Everything seemed to work, including other scenes I have with layers. Hmm.
And it saved out and reloaded my custom tile data.
I'll update if something untoward happens.
07/01/2008 (8:57 pm)
Thanks for the feedback. I think I see what it can and cannot do now.I did try one experiment, and it looks like I can now save out custom data from the tile editor.
If you have the source code, go to around line 5046 in t2dTileMap.cc (this is for 1.7.3).
There is a line to write out the custom data. It is commented. An added comment says this will be added when the new file format is ready. What's a little odd is the line to read custom data is not commented (around line 5204).
So I's held my breath and uncommented the write line. Everything seemed to work, including other scenes I have with layers. Hmm.
And it saved out and reloaded my custom tile data.
I'll update if something untoward happens.
Associate James Ford
Sickhead Games