how to reference an image point in events?

For questions about using Classic.

Post » Wed Aug 01, 2012 11:10 pm

I have a sprite "sprite1" where I have defined an image point that I have called "pointA".

I'm trying to reference it in an event
system->object overlaps point->sprite1.ImagePointX(Imagepoint),sprite1.ImagePointY(Imagepoint)

what I am supposed to write in the parenthesis?
I have tried

sprite1.ImagePointX(pointA)
sprite1.ImagePointX('pointA')
sprite1.ImagePointX("pointA")

none of these work, so what is the correct way to reference an image point that I have created?
B
3
S
1
G
3
Posts: 45
Reputation: 1,140

Post » Wed Aug 01, 2012 11:27 pm

Its sprite1.ImagePointX("pointA")

So you've either got the string wrong, or the system overlaps point does not go off of relative coordinates, or you're never getting that exact point due to subpixel positioning.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Thu Aug 02, 2012 12:15 am

Actually I have found out that you have to reference with the number of the image point, so if it's the first image point it is sopmething like
sprite1.ImagePointX(1)

The quotes don't work
B
3
S
1
G
3
Posts: 45
Reputation: 1,140

Post » Fri Dec 18, 2015 9:34 am

This just really helped me, thanks!
B
6
S
2
Posts: 7
Reputation: 478

Post » Sun Sep 04, 2016 9:34 am

declan_gage wrote:Actually I have found out that you have to reference with the number of the image point, so if it's the first image point it is sopmething like
sprite1.ImagePointX(1)

The quotes don't work


I'm writing this in case someone looks back at this post. Referencing the name of the image point DOES WORK. I don't know if it has been fixed/added in an update after this conversation or has it been there since 2012 but you can do either of these:

sprite1.ImagePointX("PointA")
sprite1.ImagePointX(1)
B
5
S
1
Posts: 4
Reputation: 338


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 10 guests