How do I detect imagepoint overlap?

Get help using Construct 2

Post » Fri Aug 14, 2015 5:31 pm

I'm trying to make a simple detection of a sprites imagepoint overlap, but it's not working.

The goal is to change a sprites current animation frame depending on what imagepoint is being overlapped by another sprite. The issue is, there is no function that I can find for this.

I tried using overlap offset and setting the X and Y to the imagepoint but it didn't work.

any ideas?
B
4
Posts: 22
Reputation: 244

Post » Fri Aug 14, 2015 6:30 pm

Just use 'Is overlapping at offset' should work all the time. Adjust the offset value to match imagepoint position. You don't really need extra imagepoint to be honest. Or if you really have to, spawn detectors to those imagepoint then pin them. Another alternative would be comparing distance or relative position.
ImageImage
B
115
S
51
G
24
Posts: 790
Reputation: 23,505

Post » Fri Aug 14, 2015 6:42 pm

alextro wrote:Just use 'Is overlapping at offset' should work all the time. Adjust the offset value to match imagepoint position. You don't really need extra imagepoint to be honest. Or if you really have to, spawn detectors to those imagepoint then pin them. Another alternative would be comparing distance or relative position.


I'll try that. I want each block to have 4 points of detection but because they will only be detecting overlap by the same block (itself) the code won't be too ridiculous. I'll try tonight and post back what I find.

Thank you!
B
4
Posts: 22
Reputation: 244

Post » Sat Aug 15, 2015 12:50 am

You could try:

system pick by overlapping point "object1" at X=(object2.imagepointX(a)),Y=(object2.imagepointY(a))
Image Image
B
26
S
15
G
143
Posts: 882
Reputation: 74,562

Post » Sat Aug 15, 2015 8:02 am

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: draiza and 20 guests