[plugin] rex_tmx_importer_v2

  • digitalsoapbox

    Path of image is Expression:ImageSource. And Expression:TilesetName , Expression:Frame also could be used.

    "flip/mirror" features are "Expression:IsMirrored", "Expression:IsFlipped", returns 1 if flip/mirror

    Maybe I'm doing something wrong? The actions below are what I'm doing, but it's not moving to the correct frame. Tiles seem to work as planned, but objects are using the wrong animation frame.

    In Tiled, a square (using an image from the tileset) is stretched to cover the floor area:

    In-Game, it's going to the wrong frame. It's not staying at frame 0, it's just going to the wrong frame - in this case, frame 18, when it should be frame 10:

  • digitalsoapbox

    Could you provide a very simple test capx for this bug?

  • Hello rexrainbow! Enjoying your plugins!

    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

    These plugins only could read tmx file, they could not create tmx file.

  • rexrainbow I know. I just was wondering if you could create a new plugin for exporting. But I know it might be too much work.

  • helena

    Sorry, I don't have plan to make new plugin recently,

  • Hello,

    Ok, thank you for letting me know.

  • 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.)

  • faulknermano

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

  • 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.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you, faulknermano! All tips helps!

  • I don't get object property, on each object > for each object property.

    Work it for layer, dont work for objects.

    Thx for help.

  • 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.

  • 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

    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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)