Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - BigDaddio

Pages: [1]
1
Support / Tilemap doesn't clear prefabs
« on: October 07, 2013, 04:11:41 am »
OK maybe I am doing this wrong, I created a sprite prefab, actually a TK2DtiledSprite. I used it in my tilemap by dragging and dropping it into the TileMapData. OK it displays correctly and works well, until I do something like ClearTile(x, y, 0); where the tile is the prefab, it doesn't get cleared.

The only way to remove the tiles are to destroy the gameobject... that is the tile. This is a real pain. I am using prefabs as doors. When a door is hit I can destroy the object, but lets say I redraw the tilemap. It leaves all the old prefabs, they don't get cleared.

Am I correct in the way I am doing this? I want the doors to have a singular trigger. So I created a sprite prefab with a trigger. I then dragged my sprite prefab into the tk2dTileMapData. Maybe there is a better way or a correct way to erase all the tiles in the map other than stepping though a 2D loop and clearing each tile? I do not draw my tilemaps I generate them procedural.


2
Support / Generating Tilemaps
« on: October 07, 2013, 02:31:17 am »
OK I am creating a tilemap in code completely. No drawing, works great so far but there are some issues. I want all my "doors" to be in layer 3 and the collider to be a trigger not a collider. I have seen that people say do this

Quote
create a prefab which has a trigger collider on it, and hook it up to the prefab spawning system. Now when that tile is spawned, it'll act as a trigger.

WTF? This makes no sense to me, like I do not understand what you are even saying.  Are you saying somehow I can create a separate sprite and set it up then insert it into the tilemap data or what?

On top of that the collders are not really attached to a tile, they are a single large thing. finding the tile that has been hit is a real pain.

Pages: [1]