Tilemap Origin Point

Get help using Construct 2

Post » Sun Feb 02, 2014 8:41 pm

Wanting to verify...
The origin point of any tilemap object instance is in the top-left corner, correct?

If so, let's say I want to pin-point the center of the instance which is 10x10 pixels... I would simply say:
Tilemap.X+5
Tilemap.Y+5
...yes?
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
142
S
24
G
8
Posts: 793
Reputation: 15,157

Post » Sun Feb 02, 2014 9:35 pm

I would say so, yes.
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Post » Sun Feb 02, 2014 9:48 pm

I've just encountered this yesterday, i use the "Tilemap.x+Tilemap.width/2" so things don't break if i change size of the tilemap.
Be nice until it's time to not be nice
B
36
S
10
G
9
Posts: 293
Reputation: 6,712

Post » Mon Feb 03, 2014 3:51 am

@mindfaQ & @JohnnySheffield - Thanks! And that x/2 is even better.

Now for the bigger question. With Pathfinding, does the condition of "On Path Found" become true when the object doing the behavior collides with the point being sought? Because what I WANT is for the Object.X/.Y values to equal the actual X/Y destination. But it always seems to stop short.
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
142
S
24
G
8
Posts: 793
Reputation: 15,157

Post » Mon Feb 03, 2014 4:17 am

Its short because of the cell offset.
Image ImageImage
B
172
S
50
G
183
Posts: 8,443
Reputation: 115,605

Post » Mon Feb 03, 2014 6:51 am

@newt - THANKS! Got it working! In fact, I FINALLY have a viable patrol system that works better than any of my previous incarnations!
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
142
S
24
G
8
Posts: 793
Reputation: 15,157


Return to How do I....?

Who is online

Users browsing this forum: Bootfit and 17 guests