How do I make tiles in tileset not collide

Get help using Construct 2

Post » Sat Apr 05, 2014 12:46 pm

:!: EDIT: I'm really sorry for asking a question explained in the manual. I feel ashamed and very stupid. I would like to apologize for wasting your time. :oops:

I have a tileset with tiles with full collision (block) and partial (slope),but I need some not to collide at all. I want that so I can make the tilemap solid and act as the level platform. If that is not possible, I'd like to know whether there is a way to make only certain tiles be solid following the collision polygon. Is this doable, or do I need two tilemap objects, one for colliding solids and one for non-colliding scenery?

Thanks in advance!
You do not have the required permissions to view the files attached to this post.
Last edited by RecGames on Sat Apr 05, 2014 6:06 pm, edited 2 times in total.
Borka223 from RecGames
B
14
S
4
G
5
Posts: 39
Reputation: 2,987

Post » Sat Apr 05, 2014 3:18 pm

I have a simple solution, if anyone has a different one, please post! I have the main tilemap, non-solid, the solid one and a "solids" variable that looks like this: "0,1,2,5,6,128,234,456" and contains the ids of solid tiles. At start, it loops through all tiles on the non-solid tilemap and compares them to the variable. If a tile matches, it is set in the same position on the solid tilemap and removed from the old one.
Borka223 from RecGames
B
14
S
4
G
5
Posts: 39
Reputation: 2,987

Post » Sat Apr 05, 2014 3:30 pm

From manual:

Collisions

When testing for collisions with a Tilemap object, empty (erased) tiles count as not colliding, and all other tiles count as colliding. A custom collision polygon can be set for individual tiles by clicking the Edit tile collision polygon button in the Tilemap bar, or just double-clicking the tile in the Tilemap bar. Note however the collision polygon cannot be entirely removed from a tile: only an erased tile counts as not colliding at all.

If you wish to have tiles that are visible but do not register a collision, use two Tilemap objects layered on top of each other. Test for collisions with just the top object, and erase any tiles that should not register a collision. These tiles can then be placed on the tilemap object beneath, so they appear in the same place but are not tested for collisions.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,838

Post » Sat Apr 05, 2014 6:02 pm

nimos100 wrote:From manual:

Collisions

When testing for collisions with a Tilemap object, empty (erased) tiles count as not colliding, and all other tiles count as colliding. A custom collision polygon can be set for individual tiles by clicking the Edit tile collision polygon button in the Tilemap bar, or just double-clicking the tile in the Tilemap bar. Note however the collision polygon cannot be entirely removed from a tile: only an erased tile counts as not colliding at all.

If you wish to have tiles that are visible but do not register a collision, use two Tilemap objects layered on top of each other. Test for collisions with just the top object, and erase any tiles that should not register a collision. These tiles can then be placed on the tilemap object beneath, so they appear in the same place but are not tested for collisions.

Must've missed that.
Borka223 from RecGames
B
14
S
4
G
5
Posts: 39
Reputation: 2,987

Post » Fri Apr 25, 2014 4:34 pm

@RecGames nothing to be ashamed about in my opinion... not many of the features of Tiled are supported in C2 currently, and I'm sure someone will inevitably come along with this same question and probably find the answer here. Looking forward to seeing what you're working on, looks interesting.
B
72
S
18
G
9
Posts: 376
Reputation: 9,106

Post » Fri Apr 25, 2014 5:06 pm

mudmask wrote:@RecGames nothing to be ashamed about in my opinion... not many of the features of Tiled are supported in C2 currently, and I'm sure someone will inevitably come along with this same question and probably find the answer here. Looking forward to seeing what you're working on, looks interesting.


Take a look at this (made in Game Maker, source and resources up for download):

http://remar.se/daniel/iji.php

One of my favorite games. The graphics are from there.

EDIT: When asking questions, always read the manual!
Borka223 from RecGames
B
14
S
4
G
5
Posts: 39
Reputation: 2,987


Return to How do I....?

Who is online

Users browsing this forum: elafreat and 17 guests