[PLUGIN] TMX importer

From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • rexrainbow

    Hi, I have trouble with your TMX plugin with using XML importer, and with JSON the same problem

    "<?xml version=""1.0"" encoding=""UTF-8""?>
    <map version=""1.0"" orientation=""staggered"" renderorder=""right-down"" width=""30"" height=""120"" tilewidth=""238"" tileheight=""119"" staggeraxis=""y"" staggerindex=""odd"" nextobjectid=""1"">
     <tileset firstgid=""1"" name=""Tiles"" tilewidth=""236"" tileheight=""119"" tilecount=""4"" columns=""2"">
      <image source=""Tiles.png"" width=""472"" height=""238""/>
     </tileset>
     <layer name=""Grid"" width=""30"" height=""120"">
      <data encoding=""csv"">
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,1,1,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
    0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
    </data>
     </layer>
    </map>"
    [/code:3jxom2vv]
  • Update

    Try to support "staggered" map.

    If the implementation of staggered map still has bugs, please send me a simple test capx for this case.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • rexrainbow

    Now it works ok

    But why all Tiles have Tile.LX = 0 and Tile.LY = 0? I think LayoutToBoard works incorrect

  • Plugin LayoutToBoard is used to put all tiles/chess into a rex_board. It will calculate the logical position of all tiles/chess by their related pixel position. It is incorrect in your case since there is only 1 tile put into the board, it is considered to (0,0) always.

    You might try "action: Add chess" of rex_board plugin, to add chess with logic position ( Expression:LogicX , Expression:LogicY ) provided by tmx plugin.

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