[Solved] Tiles removed leave their collision shapes behind.

Fayabella

  • Posts: 239
Heya, I just added water tiles to my game, and I added collision shapes so that the player cannot just walk across the water. It works, but when I generate another level, the collision shapes of the old pond remain, as well as the new ones. I can see this in Debug drawing mode. The player just collides with invisible walls.

I read that you need to use the tile API to remove them, which I am, and that the tiles had to have been created with the API, which they are. I delete all of the tiles in the scene before I make the new level.

What am I doing wrong?

« Last Edit: January 14, 2019, 08:21:53 pm by Fayabella »

CmdrWhitey13

  • Posts: 505
Could see if  you could delete and recreate the layer. Probably create a layer over this  and remove the old one after new one is created.

Hope it helps.

Fayabella

  • Posts: 239
Didn't work.
Here's an image of the problem:

It's the collision shape of a pond from a previous world generation.

« Last Edit: January 12, 2019, 04:33:57 pm by Fayabella »

Fayabella

  • Posts: 239
Is there, perhaps, some way to remove tile collision shapes and then remove the tile?

LIBERADO

  • *
  • Posts: 2720
If you create the tiles at runtime instead of creating them in the scene editor, their collision shapes will disappear when you remove them.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

Fayabella

  • Posts: 239
If you create the tiles at runtime instead of creating them in the scene editor, their collision shapes will disappear when you remove them.

That's the thing. I do create them at runtime using the Tile API. I also remove them with the API before generating a new set of tiles.

LIBERADO

  • *
  • Posts: 2720
In my tests, when I remove any tile created at runtime, its collision shape is also removed.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

Fayabella

  • Posts: 239
Then perhaps it is a bug?

vicevicebingo

  • Posts: 80
Yes it is a bug
I use stencyl 3.4 as same as you

« Last Edit: January 12, 2019, 09:05:10 pm by vicevicebingo »

Fayabella

  • Posts: 239
Is there any way to get around this?

vicevicebingo

  • Posts: 80
If you searched the solution starting from yesterday
UNTIL TODAY also can't find a solution, then
why there will be a possible solution? Just say
it's stencyl 3.4's false just okay but not stencyl 3.5 okay? $$$

vicevicebingo

  • Posts: 80
In my tests, when I remove any tile created at runtime, its collision shape is also removed.
^ lol
also 9 replies are from Fayabella, so crazy awesome!!

« Last Edit: January 12, 2019, 11:34:10 pm by vicevicebingo »

LIBERADO

  • *
  • Posts: 2720
@vicevicebingo, for your example, you have created the tiles in the scene editor, for that reason you can't remove their collision shapes.

@Fayabella, I think it is not a bug. Make sure you have not those tiles created in the scene editor too.

« Last Edit: January 12, 2019, 09:50:51 pm by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

Fayabella

  • Posts: 239
I'm absolutely sure I haven't placed them in the scene editor. When I run the game, there are no tiles until I hit Enter, which is when they are created.

LIBERADO

  • *
  • Posts: 2720
Wait a moment, I am going to create a basic playable sample showing that it works.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.