[PLUGIN] TMX importer

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

    Thanks for trying anyways.

  • slboarder

    Sorry, I don't have enough time to do more testing.

  • Update:

    Add expression:TilesetName to get current tileset name for each tile.

  • Just the ticket! Thanks Rex.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello. I'm really new to this tiled map creation so there are a lot of things I don't understand, I hope you could help me.

    1- How do you get the string from your TMX file? I tried opening it with the notepad but I'm not sure is correct. Maybe because is not oredered like Rex example... but.

    2- The order, I find this labels:

       <properties>

        <property name='solid' value='1'/>

       </properties>

    </tile>

    <tile id='1'>

       <properties>

        <property name='solid' value='1'/>

       </properties>

    Did you write them by hand for each tile? or how can I get them? and that leads me to my last question, which is the one that confuses me more.

    3- There is a sprite named Tile that has all the tileset images inside as animation frames �Where did you get this sprite or how can I make it?

    Thanks guys and thanks Rex for this awesome plugins, I hope I just don't sound too ignorant about them XD

  • Ga2Z

    The TMX string was created by Tile map editor.

  • ummm but I don't know how to export or get that String from the Tiled map editor program... is ther an option?? (As I said, I saved my map as the regular .tmx and openned that file with the notebook, but I'm not sure if that's what i should do)

  • Ga2Z

    Yes, you could open *.tmx file at notepad, it is a text file.

    • You should replace " to ' if you want to copy all string then paste into event sheet.
    • Or using AJAX to get external *.tmx file.

    Make sure the tmx file is saved as

    • Base64 (uncompressed)
    • CSV

    <img src="http://i1081.photobucket.com/albums/j352/rexrainbow1/screen1-20.png" border="0" />

    See first post of this thread.

  • Yes, I know Rex and the part that really was confusing was the number 2- for my first post... Is beacuse I got the text on notepad but there�s nothing similiar to yours at this part:

    The order, I find this labels:

       <properties>

        <property name='solid' value='1'/>

       </properties>

    </tile>

    <tile id='1'>

       <properties>

        <property name='solid' value='1'/>

       </properties>

    So, my question was if you wrote yourself or was in your .tmx text already?

    and the other question was:

    3- There is a sprite named Tile that has all the tileset images inside as animation frames �Where did you get this sprite or how can I make it?

    PS. I've also read the first post, I don't like to ask anoyingly without even reading the whole thread, is just that I don�t really understand about those things I ask :/

  • Ga2Z

    Yes, these content are all made by tile map editor.

  • Okay, I finally understood the whole thing, I'm going to explain it if anybody else, like me, had trouble with it...

    I made my .TMX withe Tiled Map editor and in the Tileset editor on the bottom right, I rightclicked every tile and set a propoertie named "solid" with value 0 and value 1 for the things I want to have collision.

    In C2 I created a new Sprite the size of my tile and added the tile sheet I used for the tiled map as an sprite strip animation.

    Then created the events as Rex's examples an there I had it :) . . . at first was difficult to understand haha.

    Thank you very much for this useful plugin!!!

  • Umm. I have another question.

    I'm using my mouse to move around my character and the enemies are wandering around the map, now I want them to attack me but I ca'nt do it right. I placed a bigger sprite above them to use it as a collision to detect when my player is near the enemy and it kind works but the subtraction of my player health is linked to the wander timer.

    Any recommendation for this?

  • Ga2Z

    Try Grid move behavior.

  • Hi,

    i have made a little tech demo (tryed tmx importer with pathfinder). After parsing map - game has slow fps. Can you help improve it? and another question - how i can make solid tiles for pathfinder?

    you can download example by link

  • I'm not sure the root cause.

    The count of tiles are 50x50=2500 in your capx -- create 2500 instances (call event 2500 times) in one tick. One of solution is dividing the creating progress into many ticks.

    Tile map editor could assign properties for each tile, right click tile in tileset at right-bottom area. Then get properties by "expression:TileProp(name, default_value)"

    I had made some plugins for path finding for tile based game, it could be used for square grid or hex grid.

    Square grid path finding

    Capx

    Hex grid path finding - click any tile

    Capx

    My path finder is slower then rez's, because that my path finder need assign moving cost for each tile from event sheet. Maybe you don't need it.

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