How do I check if an object overlaps an image point ?

Get help using Construct 2

Post » Thu Apr 10, 2014 11:50 pm

How do I check if an object overlaps an image point from another object ?

Something like this:
Check if sprite1 overlaps sprite2.imagepoint(1)
or
Check if sprite1 overlaps sprite2 at imagepoint(1)
B
49
S
15
G
6
Posts: 531
Reputation: 7,189

Post » Fri Apr 11, 2014 12:06 am

This might work..........+system Pick overlapping point
Pick all instances of a given object type that are overlapping a point in the layout. The given X and Y position in the layout will be tested against the instance's collision polygons.
replace the x and y with the x and y of the image point of the sprite you want to check , i found it in the manual under system conditions .
What I know would fill a Book , what I don't know would fill a Library
B
37
S
12
G
29
Posts: 331
Reputation: 16,499

Post » Fri Apr 11, 2014 4:22 pm

@granpa

So there is no "easy" way to do that ? :(
Thanks, I will try your advice ;)
B
49
S
15
G
6
Posts: 531
Reputation: 7,189

Post » Fri Apr 11, 2014 4:51 pm

You can also create a helper sprite. Just a sprite with 1px² and pin it to the sprite object you will check if overlapping.
Then you only have to check if the helper sprite is overlapping with the other sprite.
You know what I mean? If so your problem solved?
B
13
S
4
G
1
Posts: 107
Reputation: 1,337

Post » Sun Apr 13, 2014 6:23 pm

@DAG

Thanks, that is the method I am currently using (named them pointer1, pointer2 ... etc). I thought that I could delete the pointers (objects) since I already have the imagepoint's coordinates.
B
49
S
15
G
6
Posts: 531
Reputation: 7,189


Return to How do I....?

Who is online

Users browsing this forum: NadeemAbbass, plinkie and 10 guests