Customise "when I am pressed" for a determined time , or alternative way to achieve it... how can it be done?

Hi !
Is it possible to set up "when I am pressed" for a determined duration (i.e. 2 seconds, 10 seconds, etc)?

Is this good enough?


This is perfect! thank you! :slight_smile:

by the way, I think the topic would go under help with snap, and not how to...

The problem is that that code will be fooled by a quick click followed by another click less than two seconds later (maybe not even on the same sprite). I would do it this way:
untitled script pic  untitled script pic (1)

Thank you ! :slight_smile:

I would save the time in milliseconds and then check it out, because some projects use the timer...

With this script you can test for as many timeouts as you want.

LongPress script pic

Or simplified version with parametrized broadcast.

LongPress script pic (1)
LongPress script pic (2)

thank you very much :slight_smile: