Tile map expression

Get help using Construct 2

Post » Fri Feb 21, 2014 4:38 am

I have found this tileX to layout X expression.(Can't remember well)
So I found that tile second tile's finishing part of the Y axis is tileY=1
So does that tileX start with zero?
Is there any easier way to see the tile.X,tile.Y without counting by your self?
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Fri Feb 21, 2014 12:32 pm

Yes. Tiles start at 0,0 on top left corner. Easiest way to count them is to make a simple action
tileXY.capx
B
158
S
67
G
43
Posts: 2,603
Reputation: 36,003

Post » Fri Feb 21, 2014 4:25 pm

@shinkan
Thank you.So If I want to add an object on top of,say tile X0 Y0,Will it's origin be in the center of the of the tile or a corner?I am asking this because I had to use .5 values to put it correctly.
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Fri Feb 21, 2014 5:50 pm

Yes, If You create/spawn object at (Tilemap.TileToPositionX(0), Tilemap.TileToPositionY(0)) it will be in center of that tile.
B
158
S
67
G
43
Posts: 2,603
Reputation: 36,003

Post » Fri Feb 21, 2014 6:20 pm

Tank you so much :)
B
11
S
5
G
2
Posts: 496
Reputation: 2,306


Return to How do I....?

Who is online

Users browsing this forum: Beaverlicious, irina, Yahoo [Bot] and 11 guests