Can You Detect If The Mouse Is Clicked On A Certain Sprite?

Get help using Construct 2

Post » Wed Aug 26, 2015 12:16 am

I'm making a game that uses duck hunt style shooting, but I don't know how to detect if the mouse is clicked over the sprite, any help?
B
5
Posts: 18
Reputation: 269

Post » Wed Aug 26, 2015 12:22 am

The condition "On object clicked".

or if that for some reason doesnt work:


have an event with 2 conditions.

On left button clicked>
Cursor is over "duck">
B
6
S
1
Posts: 54
Reputation: 533

Post » Wed Aug 26, 2015 7:06 pm

bleddyuffles wrote:The condition "On object clicked".


Correct, remembering you need to add the Mouse object to your game.

Also add the condition "object > Pick Top/Bottom > Top" so if you click two objects on top of each other, the game will pick the one in the front
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Wed Aug 26, 2015 9:17 pm

7Soul wrote:
bleddyuffles wrote:The condition "On object clicked".


Correct, remembering you need to add the Mouse object to your game.

Also add the condition "object > Pick Top/Bottom > Top" so if you click two objects on top of each other, the game will pick the one in the front


I learn something new everyday :D Thanks 7Soul
Stuff I'm working on:



http://www.jamdonut.com
B
13
S
3
Posts: 88
Reputation: 1,025


Return to How do I....?

Who is online

Users browsing this forum: WesleyDeveloper9 and 7 guests