Destroy tile in tilemap

Get help using Construct 2

Post » Sun Jan 04, 2015 6:36 pm

Hi guys.
If I have a tilemap with each tile 16x16 (solid) and I want, when the bullet collides with tile - the tile (1 block) should be destroyed (erased), not the whole tilemap

Thank you!
B
21
S
4
G
1
Posts: 60
Reputation: 5,124

Post » Tue Mar 03, 2015 1:16 am

Hey man!

I´m having a hard time with this same problem.

How did you finally solved it?
B
4
S
1
Posts: 3
Reputation: 258

Post » Tue Mar 03, 2015 1:45 am

you should trigger erase tile at x.y of actor or mouse or where collision is
B
78
S
23
G
69
Posts: 1,353
Reputation: 44,025

Post » Tue Mar 03, 2015 2:02 am

What gamecorpstudio said. But you have to divide either the mouse position by the size of the tile or the object position by the size of the tile.

See here::
https://dl.dropboxusercontent.com/u/128 ... index.html

TileDestroy.png
You do not have the required permissions to view the files attached to this post.
B
23
S
4
G
2
Posts: 364
Reputation: 2,392

Post » Tue Mar 03, 2015 2:56 am

Thank you!
B
21
S
4
G
1
Posts: 60
Reputation: 5,124

Post » Tue Mar 03, 2015 9:58 am

What about Tilemap.PositiontotileX(Sprite.X)? instead of percise numbers? If you change the tile size you have to rewrite it. Additionally you can even add SnapX.
B
6
S
2
Posts: 24
Reputation: 531

Post » Tue Mar 03, 2015 6:13 pm

@Radiowaves That may work it was a rough throw together. Can't say until I test it. I didn't get an opportune chance to fully evaluate all of the Tilemap offerings
B
23
S
4
G
2
Posts: 364
Reputation: 2,392


Return to How do I....?

Who is online

Users browsing this forum: dop2000, R0J0hound and 8 guests