How do I find a tile on a tilemap

Get help using Construct 2

Post » Sun Oct 08, 2017 2:12 pm

I am trying to find the first tile in the tilemap that is tile number 21, thing is, I cant find a way to find its position!

Example

If tile.21 exist anywhere, get the first tile.21's X Position.

Thank you for any help!
B
4
Posts: 7
Reputation: 214

Post » Sun Oct 08, 2017 3:12 pm

Hey @StaticC,

I'm not sure what method you're using, but here's a capx that shows you how to find a tile with a given ID and return it's position.

https://www.dropbox.com/s/mj8zp6tyy0k5g ... .capx?dl=0

For checking if a given tile exist, there are several ways to do that. You may do a similar loop or, if you're storing the tilemap in an array you could check it even easier with the Array>Contains value condition.

Hope this helps. Cheers!
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
22
S
6
G
3
Posts: 722
Reputation: 4,016


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests