"Cursor over" affecting several objects

Get help using Construct 2

Post » Mon Sep 24, 2012 12:25 am

Hi

Im pretty new to Construct 2, so hope someone can help me with this probably fairly easy question about cursor over

I have made a game where if you hold the cursor over an object and press a key it changes to another object. Which is working fine.

My problem is if the objects are close together (not overlapping) and you have the cursor on the edge of one objects and press the key it will change both objects.

Is there a way to only change the one where the cursor is most overlapping. Or is there some other way to do this?    


B
40
S
10
G
2
Posts: 1,153
Reputation: 6,505

Post » Mon Sep 24, 2012 12:40 am

I'm not sure if this will fix it, but have you tried adjusting the collision polygon?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Mon Sep 24, 2012 1:02 am

The cursor can be over two objects at once. If you only want to modify one, you might want to add a 'pick topmost' condition to pick the top object the cursor is over.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Mon Sep 24, 2012 1:16 am

I did some testing with that, and i think i can get it working by careful adjusting the collision polygons.

Thanks for that :D
B
40
S
10
G
2
Posts: 1,153
Reputation: 6,505

Post » Mon Sep 24, 2012 1:22 am

[QUOTE=Ashley] The cursor can be over two objects at once. If you only want to modify one, you might want to add a 'pick topmost' condition to pick the top object the cursor is over.[/QUOTE]

That was exactly what i needed
B
40
S
10
G
2
Posts: 1,153
Reputation: 6,505


Return to How do I....?

Who is online

Users browsing this forum: Zebbi and 22 guests