[plugin] rex_tmx_importer_v2

Post your completed addons to share with the community

Post » Wed Feb 22, 2017 7:04 pm

@helena

Sorry, I don't have plan to make new plugin recently,
B
108
S
26
G
271
Posts: 4,471
Reputation: 151,777

Post » Wed Feb 22, 2017 7:49 pm

Hello,
Ok, thank you for letting me know.
B
58
S
18
G
13
Posts: 447
Reputation: 10,735

Post » Wed Feb 22, 2017 11:38 pm

@digitalsoapbox
Bit of an old thread, but I just noticed this and saw that you are iterating through TMX Objects (not Tiles). I had mention this to @rexrainbow recently about adding support to reference Tileset-related parameters for Objects. At the moment, if I'm not mistaken, only Tiles properly reference their Tilesets. In Objects (and in Tiled, that's the Tile Image Object), the plugin is required to make a connection with the 'gid' parameter to the Tileset.

Anyway, I was wondering if you solved your issue and how.

(For personal use, I modified Rex's code and got Image Objects to reference their frame, but I think Rex might be doing his own modifications, if indeed what you're experiencing is rooted in this.)
B
41
S
12
G
1
Posts: 68
Reputation: 2,955

Post » Thu Feb 23, 2017 7:02 am

@faulknermano

I can work on it 2 or 3 days later. Now I am away from keyboard.
B
108
S
26
G
271
Posts: 4,471
Reputation: 151,777

Post » Thu Feb 23, 2017 7:55 am

rexrainbow wrote:@faulknermano

I can work on it 2 or 3 days later. Now I am away from keyboard.


Oh hey @rexrainbow no pressure! If I came across in any way pestering or nagging, it's not the case. Thanks very much for all your work to date. I'm leaning a lot from reading your code especially because its functionality is a perfect fit for the stuff that I'm doing. It's much better to learn code examples of things that are actually useful. :-)
B
41
S
12
G
1
Posts: 68
Reputation: 2,955

Post » Mon Feb 27, 2017 3:10 am

helena wrote:I have considered adding an ingame level editor to my game. I wonder if it is possible for you to create TMX-exporter to json files. Or maybe it is not good idea and too complicated?


@helena, have you considered using Rex's JSON builder (http://c2rexplugins.weebly.com/rex_json_buider.html) in order to construct your JSON strings and then write them back via the AJAX object?

Of course, it is a bit of work, but much more convenient than doing it manually.

If you want to export TMX, you could also try rex_xmlwriter (http://c2rexplugins.weebly.com/rex_xmlwriter.html), but like before, you'd still need to read up on TMX format. But it is quite doable, I think.
B
41
S
12
G
1
Posts: 68
Reputation: 2,955

Post » Mon Feb 27, 2017 4:48 pm

Thank you, @faulknermano! All tips helps!
B
58
S
18
G
13
Posts: 447
Reputation: 10,735

Post » Wed Mar 22, 2017 3:34 pm

I don't get object property, on each object > for each object property.
Image
Image
Work it for layer, dont work for objects.
Thx for help.
B
3
Posts: 6
Reputation: 181

Post » Fri Mar 24, 2017 5:09 pm

faulknermano wrote:@digitalsoapbox
Bit of an old thread, but I just noticed this and saw that you are iterating through TMX Objects (not Tiles). I had mention this to @rexrainbow recently about adding support to reference Tileset-related parameters for Objects. At the moment, if I'm not mistaken, only Tiles properly reference their Tilesets. In Objects (and in Tiled, that's the Tile Image Object), the plugin is required to make a connection with the 'gid' parameter to the Tileset.

Anyway, I was wondering if you solved your issue and how.

(For personal use, I modified Rex's code and got Image Objects to reference their frame, but I think Rex might be doing his own modifications, if indeed what you're experiencing is rooted in this.)


I missed this comment originally. I still can't get the correct frame from objects using this importer.
B
80
S
46
G
24
Posts: 525
Reputation: 20,955

Post » Fri Mar 24, 2017 5:42 pm

@digitalsoapbox
Rex PM'd me about a TMX Importer V2 update but it seems he had forgotten to update this thread.

Here's a direct quote from @rexrainbow
rexrainbow wrote:Please update tmx related plugins.

Add new expression:ObjectRefGID to get reference gid of an object, and extend expression:TilesetName( gid ) to get tileset name of a specific tile (gid).
ex : TMXImporterV2.TilesetName( TMXImporterV2.ObjectRefGID )
Hereis a sample capx.



The 'gid' is what you're looking for. It's basically the 'frame number' of the Object, as it were.

I also believe that Rex updated only the one in his main site, not the Github one, last I checked.
B
41
S
12
G
1
Posts: 68
Reputation: 2,955

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 5 guests