Mouse Click with images

Hello everyone,

How do I transform this coding from keyboard-related (single number from four numbers) to mouse-related (single click on one of the four images):

elif (key_resp.keys == ‘3’):
CurrentCard= ‘DeckC’

Thanks.

Hello,
Here is an example:

# Before Experiment:
number_of_clicks = 0

# End Routine:
if mouse.isPressedIn(image):
    number_of_clicks += 1

Example download:
clicked in.zip (6.8 KB)

Thanks,
Chen

1 Like

Thank you for your response. Additionally, how do I make one text disappear and another text appear for 2 second after a subject clicks on the image (per routine)?

Thanks.

What have you been trying to do so far?
As I already understood, this is part of an assignment; I will help you only if you try to do it yourself. Please share what you have been trying to do so far and where you got stuck.

Thanks,
Chen