How do I Copy a Tilemap to another Layout

Get help using Construct 2

Post » Sat Mar 15, 2014 9:23 am

Hello.

I let the user draw tiles on a Tilemap, but I want to copy the drawn map to another layout. How can I do it please ?
I have tried looping on each tile and redraw it on the other map, but I thought maybe the source Object is destroyed when the next layout is shown, that's why I can't copy tiles from it.

Code: Select all
+ System: Repeat TileCount time
-> Set tile (loopindex%8, int(loopindex/8)) to tile Source.TileAt(loopindex%8,int(loopindex/8))


Thank you
B
7
S
1
G
1
Posts: 11
Reputation: 552

Post » Sat Mar 15, 2014 4:14 pm

Think you can solve it by making the tilemaps global, and if that doesn't work try to add the persist behaviour as well. But I would assume that making them global would be enough.

You make them global by selecting them and in the properties mark it "yes" in global.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Sat Mar 15, 2014 9:38 pm

It works! Thanks a lot, nimos :)
B
7
S
1
G
1
Posts: 11
Reputation: 552


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 34 guests