Page 15 of 20

Re: [PLUGIN] TMX importer

PostPosted: Fri Jul 05, 2013 4:03 am
by rexrainbow
@7Soul

Thanks, I will check it. Hope rotating will not conflict with mirror/flip.

Re: [PLUGIN] TMX importer

PostPosted: Sat Jul 06, 2013 4:40 am
by rexrainbow
Update

Add "flip"/"mirror" back. The expression:IsFlip will return 1 if the tile is flipped.
BTW, if flipped and mirrored both, it will become "rotate 180 degree".

@7Soul
Try this updated.

Re: [PLUGIN] TMX importer

PostPosted: Sat Jul 06, 2013 5:52 am
by 7Soul
Yeah, kinda works, but shouldn't it take into consideration the origin point? I mean, it flips the tile, but then it will be X pixels off. (my map got all messed up now)

ex:
A tile is at 16,16, it is 8x8 and it's mirrored
In C2 it will be drawn at 8,16 with it's origin on 16,16

Re: [PLUGIN] TMX importer

PostPosted: Sat Jul 06, 2013 9:41 am
by rexrainbow
@7Soul

"flip"/"mirror" works fine in my environment. Could you provide a simple capx?

Re: [PLUGIN] TMX importer

PostPosted: Sat Jul 06, 2013 7:03 pm
by 7Soul
https://dl.dropboxusercontent.com/u/3954039/Temp/tmx_importer.capx
In the example there's a black tile, then a blue tile on top of it, then a mirrored blue tile on top of it.
The thing is, I got it to work fine if I put the origin point is in the center, but then the tiles won't be aligned to the grid.7Soul2013-07-06 19:04:33

Re: [PLUGIN] TMX importer

PostPosted: Sat Jul 06, 2013 7:10 pm
by Tokinsom
Just create the tiles at .PhysicalX+Tile.Width/2Tokinsom2013-07-06 19:10:49

Re: [PLUGIN] TMX importer

PostPosted: Sat Jul 06, 2013 11:22 pm
by 7Soul
@Tokinsom
How do I change the position they are being created at? I'm using the action "Create tiles" and I don't see how to change the position

Re: [PLUGIN] TMX importer

PostPosted: Sun Jul 07, 2013 12:44 am
by rexrainbow
@7Soul

"Condition:in each tile cell" will be trigger for each created tile. Change the properties under this event. The SOL of this tile had been set by tmximporter plugin.

Or using "Action: Retrieve tile array" to create tile manually.

See the first post for more detail.

Re: [PLUGIN] TMX importer

PostPosted: Sun Jul 07, 2013 5:52 am
by 7Soul
Got it working, thanks! Had to put a sub-event with "TMXImporter.IsFlipped = 1" -> "set Tile mirrored"

Re: [PLUGIN] TMX importer

PostPosted: Thu Jul 11, 2013 2:44 am
by 7Soul
Rex, there seems to be a problem with angle in the latest version:

On the editor: 0, 90, 180, 270 (pressing Z to rotate)
In game: 0, ?, ?, ? Using "TMXImporter.TileAngle" to set the angle

Seems like a conflict with flipping and mirroring because it worked after I removed those from my game