[PLUGIN] TMX importer

0 favourites
From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • Thanks, I got it.

  • Update:

    Try to support compression mode:"zlib" and "gzip"

    The decompression lib is comes from imaya / zlib.js.

  • Try Construct 3

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

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

    ry to support compression mode:"zlib" and "gzip"

    great! i`m waited for it)))

  • Hey Rex

    It seems it's not possible to create a tile object by the tileset name it uses nor the layer it's in. Is that correct?

    Here's what I'm trying to do:

    I have a tileset named "TS_Blocks" and each tile in it has a property called "Type" that is a string. They are placed as tile objects in an object layer called "TS_Interactive"

    I want to check if any tile objects are on the layer "TS_Interactive", then create the tiles, then set their animation to the "Type" property I gave them in the tileset.

    I tried...

    +On Each Object

    +TMXImporter.LayerName = "TS_Interactive"

    -Create tile at x,y

    -Set animation to TMXImporter.ObjectType("Type")

    but that won't even create the tiles. I then tried naming each tile object after its placed, then creating them by the object name instead, but then I could get it to retrieve the property "Type"! Any ideas?

  • Tokinsom

    Sorry, I could not catch your problem.

    There is an example for creating tiles manually in first post.

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

    The tileset name could be got by expression:TilesetName. Combined this string with my nickname plugin, you could create tiles by TilesetName. (Or use some string compare conditions)

  • rexrainbow

    hi. i`m tested support for zlib compression.by the way, i`m using import tmx by Ajax.LastData

    when map is loaded first time, i`ve got error messages, but after several tryes there`s no error alerts.but the problem is: tiles not properly placing - they have wrong and repeating animation frame.

  • ohoh~ I will test it again, more carefully. My mistake.

    I went to support Sprite text last week, sorry.

  • rexrainbow

    ok, i`m waiting. thanks

  • rexrainbow

    i`ve made a new example and still have a problem with tile properties. new tmx map has tile properties with tile id>0, but it still cant`be log to browser. new example: dropbox.com/s/9inqklygdo2llm2/example_tmx_importer3.capx

  • Update

    Fix bug when get tile's properties from 2nd tileset.

    This update would show the log correctly.

    But, there might have some SOL issue in this capx.

    In this capx, do you want to set the opacity to 0 of created instance? You might get the wrong instance, try to log the UID to check it.

  • rexrainbow

    thanks, i`ll try new update.

    n this capx, do you want to set the opacity to 0 of created instance? You might get the wrong instance, try to log the UID to check it.

    no, it is just for example. i`ll try update on working project and write to you results

    update: great! now my project working properly, thanks you <img src="smileys/smiley1.gif" border="0" align="middle" /> waitnig for compression support <img src="smileys/smiley2.gif" border="0" align="middle" />

  • Update:

    Fix decompression bug.

    Try this new updated.

  • Update

    Press "z" in tile map editor could rotate tile in 90 degree clockwise.

    Now this plugin could pick the value (0,90,180,270) of rotate angle, to rotate the created tile instance.

    Add expression:TileAngle.

    Tokinsom

    Finally I found it!

    What feature did I miss for this plugin?

  • rexrainbow

    hat feature did I miss for this plugin?

    Maybe map property "backround color" and "for each map property"?

  • I thought he already added "for each map property". Also you can use a map property to retrieve the BG color in the meantime or if Rex doesn't add it.

    rexrainbow I can't think of anything atm! Great work! I'm still having trouble with the tile object thing I brought up earlier though...I'll see if I can find an easier way to demonstrate the problem (probably just something on my end but I dunno..)

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