Detecting tiles in tilemap

Get help using Construct 2

Post » Wed Jan 22, 2014 9:06 am

Hi,

Check out the following example;
dropbox.com/s/bbq4aktdy2w5vp9/erasetiles.capx

Left click : fire laser
Right hold : move

I'm trying to find out which tile the laser/HitScanner has collided with to erase it. The HitScanner rotates it's angle which is making it harder to locate the correct tile.

temp (red square) shows the location found using SnapX, SnapY which needs to be adjusted.

ThanksLazyBassTurd2014-01-22 09:10:46
B
3
Posts: 6
Reputation: 187

Post » Wed Jan 22, 2014 12:21 pm

I'm a little closer to finding the correct tile to erase once it's hit by the laser. Since my math and programming skills need developing I cannot figure out how to find the correct offset to find the tile.

The last event is as far as I have got, the (temp) object is just a placeholder to view which position is returned.

Hope that all makes sense I've had a little too many coffees :)

dropbox.com/s/2hnahs2i0sssnpc/erasetiles2.capx
B
3
Posts: 6
Reputation: 187

Post » Thu Jan 23, 2014 1:07 am

Can't get your link to work :(
B
83
S
40
G
15
Posts: 987
Reputation: 16,847

Post » Thu Jan 23, 2014 8:31 am

[QUOTE=justifun] Can't get your link to work :([/QUOTE]

That's odd, I can get to it fine. What do you see?
I have got very close now but, it's still not accurate enough.

https://www.dropbox.com/s/vj1fjokrbhmzhig/erasetiles3.capxLazyBassTurd2014-01-23 08:42:18
B
3
Posts: 6
Reputation: 187


Return to How do I....?

Who is online

Users browsing this forum: adamebastin, Bro7hers, Google [Bot], plinkie and 7 guests