[PLUGIN] TMX importer

Post your completed addons to share with the community

Post » Wed Nov 21, 2012 7:01 pm

@rexrainbow
hi. i made for you demo map with object layer. it is your demo from first post with new object layer. on this map there are objects-triggers for map transitions, object for chest and object for showing info from sign/board. I need simply make basic objects on a place where object placed. It can be, for example, simple red rectangle. Can you help me?
link for map: https://www.dropbox.com/s/nr6vwardbzefnx5/tmx_import_objects.zip
ImageImage
B
68
S
23
G
7
Posts: 186
Reputation: 9,786

Post » Wed Nov 21, 2012 11:37 pm

@SirG

Thanks, I will take a look on it. I have saw object layer in text editor.rexrainbow2012-11-21 23:37:58
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Wed Nov 21, 2012 11:39 pm

@Equinox80

Uh, I'm not sure. I always use the same tmx file at first post.rexrainbow2012-11-21 23:41:40
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Fri Nov 23, 2012 2:58 pm

[QUOTE=rexrainbow] @Equinox80

Uh, I'm not sure. I always use the same tmx file at first post.[/QUOTE]

I don't mean different TMX files, I just mean for instance, My TMX file has 8 different tilesets. Now right now I am only using 1 tileset of course, but my first tileset is like an old medieval military (tent-based) camp ground currently at 700+ tiles (anims). Now I have more tilesets since I had to cut them up because C2 crashes at 1000+ anims. So if I want to add different types of trees, I need to use Tileset 2 which has several trees.

How do I import tileset 1 AND 2 in C2, as it's already made in TMX.
B
26
S
5
G
5
Posts: 98
Reputation: 4,734

Post » Fri Nov 23, 2012 4:11 pm

@Equinox80

Hum... do you mean that you might want to get tile image at runtime without stored in sprite in C2?
You might use "Action: Retrieve tile array" + load image from url

Action: Retrieve tile array:
"Action: Retrieve tile array". This action will not create any instance, it only trigger "Condition:On each tile cell" for each available cell. You can get properties stored in layer/tileset/tile to create instance manually.

See test_TMXImporter_adv.capx in first post.rexrainbow2012-11-23 16:11:57
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Fri Nov 23, 2012 4:31 pm

@rexrainbow
any luck with objects ?
ImageImage
B
68
S
23
G
7
Posts: 186
Reputation: 9,786

Post » Fri Nov 23, 2012 11:05 pm

@SirG

Work in progress. I had read "object" into plugin.
Now I need to add a condition and some expressions to fetch information at event sheet.


BTW. The "object" could be a "trigger area". It might be a useful things in my board system. I would like to create an "area" plugin to handle the logical "trigger area".rexrainbow2012-11-23 23:10:21
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Sat Nov 24, 2012 7:46 am

Update:

Add "condition:On each object", "expression:ObjGroupName", "expression:ObjGroupWidth" , "expression:ObjGroupHeight", "expression:ObjectName" , "expression:ObjectType", "expression:ObjectWidth" , "expression:ObjectHeight", "expression:ObjectX" , "expression:ObjectY", "expression:ObjectProp" to read "object layer" into event sheet.

"condition:On each object" will be triggered when executing "action:Create tiles", or "action:Retrieve tile array" for each object. Then use these expressions to get information of (each) object.
Capx


@SirG

Here it is.rexrainbow2012-11-24 07:51:59
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

Post » Mon Nov 26, 2012 10:43 am

@rexrainbow
this is amazing! thank you!!!
i need your advice - where to make hotpoint (i placed at 0.0) in tiles (in C2) to make them work properly? it seems like tiles placing correct, but other objects (when i make them on objects layers) - staying not correct above tiles. i have to add in TMXimporter objects parser "+8" to position to place objects properly.
ImageImage
B
68
S
23
G
7
Posts: 186
Reputation: 9,786

Post » Mon Nov 26, 2012 11:06 am

@SirG

Hum... I might add some expression to get physical position from logical index.

Edit:

Please redownload this plugin, I had added expression:ObjectPX, expression:ObjectPY, these two values will map to the same position of logical X,Y, (the position of tile).rexrainbow2012-11-26 11:33:30
B
97
S
22
G
178
Posts: 4,118
Reputation: 104,043

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 3 guests