Discuss Scratch

Winterzalia10
Scratcher
73 posts

'If sprite clicked' boolean block

I know there is a when sprite clicked block, but for example there are two different versions of the key pressed block , so for the same reason we need one boolean block for the sprite clicked ‘when’ block. The ‘touching sprite’ block cannot work for this. Even though there is a workaround, so is there for almost every scratch block and this would make it a lot simpler for everyone else.
if <sprite 1 clicked> then
next costume
Say 'Hello!' for 2 seconds

Last edited by Winterzalia10 (June 12, 2024 06:03:58)

hydrofungus
Scratcher
1000+ posts

'If sprite clicked' boolean block

i can’t believe how hard this is

Sprite 1’s editor
when this sprite clicked
broadcast [Buddy i was clicked *sigma face* v]

Sprite 2’s editor
when I receive [Buddy i was clicked *sigma face* v]
play sound [Sigma v]
julmik6478
Scratcher
500+ posts

'If sprite clicked' boolean block

There is workaround:
<<touching [mouse pointer v] ?> and <mouse down?>>
medians
Scratcher
1000+ posts

'If sprite clicked' boolean block

This has been suggested, right (well with the option to select sprites)

hydrofungus wrote:

i can’t believe how hard this is

I mean, the fact that cleanup sucks in 1.x and 3.0, and the senders/receivers right click options doesn't exist in 3.0..
Though in that case, you could just put the sound in one sprite, there could also be:
when [this sprite v] clicked ::events hat
...
Or.. actually:
when this sprite clicked ::events
run in [Sprite 2 v] {
...
} ::control

Last edited by medians (June 12, 2024 13:30:32)

julmik6478
Scratcher
500+ posts

'If sprite clicked' boolean block

medians wrote:

This has been suggested, right (well with the option to select sprites)

hydrofungus wrote:

i can’t believe how hard this is

I mean, the fact that cleanup sucks in 1.x and 3.0, and the senders/receivers right click options doesn't exist in 3.0..
Though in that case, you could just put the sound in one sprite, there could also be:
when [this sprite v] clicked ::events hat
...
Or.. actually:
when this sprite clicked ::events
run in [Sprite 2 v] {
...
} ::control
Make your topic if you want to suggest something.
medians
Scratcher
1000+ posts

'If sprite clicked' boolean block

julmik6478 wrote:

medians wrote:

This has been suggested, right (well with the option to select sprites)

hydrofungus wrote:

i can’t believe how hard this is

I mean, the fact that cleanup sucks in 1.x and 3.0, and the senders/receivers right click options doesn't exist in 3.0..
Though in that case, you could just put the sound in one sprite, there could also be:
when [this sprite v] clicked ::events hat
...
Or.. actually:
when this sprite clicked ::events
run in [Sprite 2 v] {
...
} ::control
Make your topic if you want to suggest something.
It was related, the original poster suggested if (any sprite) clicked, so if there was a dropdown to the when this sprite clicked block to select other sprites, or a separate block to run scripts in other sprites, this could be done..

Last edited by medians (June 12, 2024 14:25:09)

Powered by DjangoBB