"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
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

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
92
S
31
G
24
Posts: 3,191
Reputation: 32,699

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
399
S
236
G
89
Posts: 24,546
Reputation: 195,436

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
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

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
44
S
11
G
2
Posts: 1,182
Reputation: 6,848


Return to How do I....?

Who is online

Users browsing this forum: Christmas and 24 guests