[PLUGIN] TMX importer

Post your completed addons to share with the community

Post » Fri Jul 05, 2013 4:03 am

@7Soul

Thanks, I will check it. Hope rotating will not conflict with mirror/flip.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Sat Jul 06, 2013 4:40 am

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.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Sat Jul 06, 2013 5:52 am

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
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,129

Post » Sat Jul 06, 2013 9:41 am

@7Soul

"flip"/"mirror" works fine in my environment. Could you provide a simple capx?
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Sat Jul 06, 2013 7:03 pm

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
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,129

Post » Sat Jul 06, 2013 7:10 pm

Just create the tiles at .PhysicalX+Tile.Width/2Tokinsom2013-07-06 19:10:49
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Sat Jul 06, 2013 11:22 pm

@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
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,129

Post » Sun Jul 07, 2013 12:44 am

@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.
B
97
S
22
G
176
Posts: 4,108
Reputation: 103,019

Post » Sun Jul 07, 2013 5:52 am

Got it working, thanks! Had to put a sub-event with "TMXImporter.IsFlipped = 1" -> "set Tile mirrored"
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,129

Post » Thu Jul 11, 2013 2:44 am

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
B
83
S
21
G
15
Posts: 1,039
Reputation: 15,129

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: antares330 and 2 guests