How do I make something happen at an imagepoint?

Get help using Construct 2

Post » Sat Oct 22, 2016 5:24 am

I want something to happen when an object touches a certain imagepoint on another object. How do I achieve this?
B
3
Posts: 6
Reputation: 187

Post » Sat Oct 22, 2016 9:51 am

It depends if the object that touches the imagepoint of the other is square. If it's square you could use distance, otherwise you have to distinguish between height and width.

In this example if the green rectangle overlaps the purple one on the upper left (Imagepoint1) you get an overlap.
https://drive.google.com/file/d/0B5FlDY ... sp=sharing

Please feel free to ask is something unclear.
B
24
S
3
G
1
Posts: 451
Reputation: 2,165

Post » Sat Oct 22, 2016 10:04 am

Hi @AwesomePuppy! You can use System condition "Overlapping Point" :

Object = (object1);
X = Object2.ImagePointX(ID_of_image_point);
Y = Object2.ImagePointY(ID_of_image_point);

And you're done. :)
Image
B
10
S
3
G
2
Posts: 75
Reputation: 1,708

Post » Sat Oct 22, 2016 10:23 am

Letting C2 do the math and the stuff:

https://www.dropbox.com/s/penjf5xt5q2gf ... .capx?dl=0


Edit: Above solution in practice.
B
33
S
18
G
28
Posts: 2,477
Reputation: 20,918

Post » Sat Oct 22, 2016 3:49 pm

Here's the code i'm using: file:///C:/Edit%20screen.PNG
What's wrong with it? (Also, I want the same thing to happen if I touch any of several imagepoints)
B
3
Posts: 6
Reputation: 187

Post » Sat Oct 22, 2016 3:50 pm

That is a local file URL, we cant see it. ^^
Image
B
10
S
3
G
2
Posts: 75
Reputation: 1,708

Post » Sat Oct 22, 2016 4:01 pm

Message: AwesomePuppy can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Okay then, here's the dropbox: https://www.dropbox.com/s/0zuj5xlpgplnm ... .capx?dl=0
Same questions as in my last post.
B
3
Posts: 6
Reputation: 187


Return to How do I....?

Who is online

Users browsing this forum: Sparkz and 3 guests