Tilemap object: remove collision?

Get help using Construct 2

Post » Tue Feb 09, 2016 10:09 pm

Is there any way at all to remove collision polygons from some tiles while retaining it in others? I find it difficult to work with "obstacle" blocks, seeing as it takes forever to draw a map to begin with, much less going tile per tile covering it with the proper collision box. I'm sure it could be easily accomplished by using another tilemap object, making one with and the other without collisions, but it seem inefficient...

Also I'm sure this has been asked before, but was hoping maybe it was solved by now, or maybe even if there's an update for tilemap object coming soon that would allow for it?
B
25
S
6
G
6
Posts: 265
Reputation: 3,696

Post » Tue Feb 09, 2016 11:49 pm

If you make the collision box of the tile 0 by 0 (put all the points in the same place) it technically doesn't exist anymore
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Wed Feb 10, 2016 1:20 am

It does exist, it's a pixel but it's there.
B
25
S
6
G
6
Posts: 265
Reputation: 3,696

Post » Wed Feb 10, 2016 6:41 pm

Ah ok. I knew a 0x0 collision box worked in a very specific case so I assumed the reason was that the game ignored it

I usually have another tilemap on top for the collision mask, it's the easier way to do it as far as I know

Image
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Wed Feb 10, 2016 6:56 pm

Yeah that's how I normally do it, I just thought by now the Tilemap would have been updated to support it. But I've already edited my map to using two Tilemaps. The issue I had was time, because it's such a big map and I didn't want to waste too much time re-drawing everything.

I think animated tiles and collision-per-tile would be a good thing for an update in the future. Is this even being discussed somewhere?

But I did find an easy way to save time without hand drawing or hand erasing everything I'd already done:
https://www.scirra.com/forum/viewtopic.php?f=147&t=168371
B
25
S
6
G
6
Posts: 265
Reputation: 3,696

Post » Wed Feb 10, 2016 7:13 pm

I use Tiled to make maps myself. The C2 editor is very limited and Tiled has a lot more tools, then you can save and import into the Tilemap using the "Import TMX to this object" button in the Tilemap window. (You can also export C2 tilemaps)

In Tiled you can select all the tiles you want to be solid using the "Select same tile" tool while holding the shift key. Then create a new layer and paint the selected area with say, tile number 1. Then you can import this layer into the solid Tilemap
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Wed Feb 10, 2016 8:39 pm

Guess I'll cross post this:
another-tilemap-question-copy-all-data-to-new-tilemap_p1013808?#p1013808

If you have a list of tiles that you don't want to be solid, you can copy the tilemap and remove those tiles when the game runs.
B
92
S
32
G
107
Posts: 5,274
Reputation: 69,959


Return to How do I....?

Who is online

Users browsing this forum: jorgmaquoi and 14 guests