How do I test 2 sprites image points?

Get help using Construct 2

Post » Mon May 19, 2014 1:49 pm


I have two sprites and want to test when the first sprite's image point 8 (in other words only a specific image point) touches any of the second sprite's image points. Is this possible?

Thanks very much in advance.
Posts: 2
Reputation: 231

Post » Mon May 19, 2014 3:33 pm

First check this out in system conditions

Compare two values
Compare any two expressions (which can either numbers or text) with each other. They can be compared as Equal, Not equal, Less, Less or equal, Greater or Greater or equal.

and now this in sprite expressions

Retrieve the position of an image point on the currently displaying animation frame of the object. You can pass either the zero-based index of the image point, or a string of its name.
What I know would fill a Book , what I don't know would fill a Library
Posts: 331
Reputation: 16,499

Post » Mon May 19, 2014 5:01 pm

Excellent. Thank you. I think I've got it now. I almost posted a reply to myself to "read the manual" :)

So the event sheet looks like this:

System int(Player.ImagePointX("Nose") = int(Asteroid.ImagePointX(2)) <-- this just tests the "Nose" of my Player with an Asteroid which is rotating 1 degree per system tick.

And, also demonstrates granpa's explanation above using a string name for the first sprite image point and a numeric value for the second sprite image point.

Once I have the the 2 image points in the x-axis equal I can kick off any number of actions! Additionally, I can now add in the y-axis for a precise "connect point".
Posts: 2
Reputation: 231

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests