How do I can measure dis. to defined image point? [Solved]

Get help using Construct 2

Post » Tue Jan 27, 2015 11:19 pm

Hi

Maybe I am wrong, but by default distance is measured to imagepoint 0. I need to different image point, for example 1, 2 in other part of sprite/object. I know how to get distance from x.y, but I can't see option, how to get it to defined image point.

THanks!
Last edited by Facet on Tue Jan 27, 2015 11:37 pm, edited 1 time in total.
B
10
S
1
Posts: 30
Reputation: 594

Post » Tue Jan 27, 2015 11:31 pm

Use the ImagePointX and ImagePointY expressions of your sprites, passing in either your image point index or name in parentheses after the expression. For example

Sprite.ImagePointX(0) returns the X coordinate of the image point at index 0(which is the origin) of Sprite.
Sprite.ImagePointX("bob") returns the X coordinate of the image point named "bob" of Sprite.
Moderator
B
113
S
41
G
20
Posts: 1,586
Reputation: 19,106

Post » Tue Jan 27, 2015 11:36 pm

haha, thank you :) I was sure, something is wrong with my eyes!
B
10
S
1
Posts: 30
Reputation: 594


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests