[PLUGIN] TMX importer

Post your completed addons to share with the community

Post » Tue Oct 16, 2012 10:38 pm

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!!!
B
4
S
1
Posts: 22
Reputation: 671

Post » Thu Oct 18, 2012 5:37 pm

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?
B
4
S
1
Posts: 22
Reputation: 671

Post » Fri Oct 19, 2012 2:59 am

@Ga2Z

Try Grid move behavior.
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Thu Oct 25, 2012 10:39 am

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
ImageImage
B
68
S
23
G
7
Posts: 186
Reputation: 9,786

Post » Thu Oct 25, 2012 2:15 pm

@SirG

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.rexrainbow2012-10-25 14:33:24
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Thu Nov 01, 2012 10:41 am

thanks for help. new question - are you planning,or can you give me advice how to use some tilesets in one project - and c2 parsing it correstly?i`m trying to use properties in tiles and expression "tilesetname", but still trouble.
ImageImage
B
68
S
23
G
7
Posts: 186
Reputation: 9,786

Post » Sat Nov 03, 2012 2:54 am

@SirG

Put expression "tilesetname" under condition "on each tile cell", then you could get tileset name of (each) current tile.rexrainbow2012-11-03 02:55:29
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Sat Nov 03, 2012 3:45 am

@rexrainbow
thank you for help. next problem (( i made map 20*20 by 32px tile width. Map showing correctly, but player can move in a dimension 960*960px only. Can you advice me why?
ImageImage
B
68
S
23
G
7
Posts: 186
Reputation: 9,786

Post » Sat Nov 03, 2012 2:50 pm

@SirG

Uh, very stupid solution -- you could create 30x30 map, fill "empty" tiles outside of 20x20.
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Sat Nov 03, 2012 4:28 pm

SUPERB!

Oh and btw *cough* path editor *cough*
B
19
S
5
G
4
Posts: 208
Reputation: 3,960

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests