Discuss Scratch

wisdom_cat42
Scratcher
2 posts

How to do a "when this clone clicked"

I want to make it so that when a clone is clicked it gets deleted, but there are no blocks that could make that happen. The “when sprite clicked” block doesn't apply to clones and there is nothing in sensing that could work. Does anyone have a code or combination of blocks that could work?

Thanks
FoxyTheNeonFox
Scratcher
17 posts

How to do a "when this clone clicked"

when I start as a clone
if <<touching [ Mouse Pointer] ?> and <mouse down?>> then

end

I think this may work, not sure.
wisdom_cat42
Scratcher
2 posts

How to do a "when this clone clicked"

Thanks for the help!
colinmacc
Scratcher
1000+ posts

How to do a "when this clone clicked"

When sprite clicked should work…

when this sprite clicked
delete this clone
deck26
Scratcher
1000+ posts

How to do a "when this clone clicked"

colinmacc wrote:

When sprite clicked should work…

when this sprite clicked
delete this clone
Correct, clicking a clone will run the script for that clone.
semmiesem9
Scratcher
100+ posts

How to do a "when this clone clicked"

FoxyTheNeonFox wrote:

when I start as a clone
if <<touching [ Mouse Pointer] ?> and <mouse down?>> then

end

I think this may work, not sure.
Ah, that wouldn't really work, actually. That script checks if it's being clicked when it starts as a clone, which it will likely not be, and then that script will stop. Here's an alternative:

when I start as a clone
wait until <<touching [mouse pointer v]> and <mouse down?>>
Your script here.::events
kopekope
Scratcher
27 posts

How to do a "when this clone clicked"

semmiesem9 wrote:

FoxyTheNeonFox wrote:

when I start as a clone
if <<touching [ Mouse Pointer] ?> and <mouse down?>> then

end

I think this may work, not sure.
Ah, that wouldn't really work, actually. That script checks if it's being clicked when it starts as a clone, which it will likely not be, and then that script will stop. Here's an alternative:

when I start as a clone
wait until <<touching [mouse pointer v]> and <mouse down?>>
Your script here.::events
That too. so that just waiting to click and move and stop. right Scripts here!
when I start as a clone
forever
if <<touching [Mouse pointer v] ?> and <mouse down?>>then
... :: grey stack
end
end
imfh
Scratcher
1000+ posts

How to do a "when this clone clicked"

It's easier and more efficient to just use when this sprite clicked instead though.

when this sprite clicked // All scripts in the parent sprite are inherited by clones.
...
_-InfinityGames-_
New Scratcher
1 post

How to do a "when this clone clicked"

But if you keep pressing the mouse down and just go to the clone's position, it's going to do the action anyways. Any idea to force the player to click?
Oumuamua
Scratcher
1000+ posts

How to do a "when this clone clicked"

_-InfinityGames-_ wrote:

But if you keep pressing the mouse down and just go to the clone's position, it's going to do the action anyways. Any idea to force the player to click?

Please don´t revive old resolved topics, the response above your post is correct.
Bye.

imfh wrote:

It's easier and more efficient to just use when this sprite clicked instead though.

when this sprite clicked // All scripts in the parent sprite are inherited by clones.
...
oce275
New Scratcher
1 post

How to do a "when this clone clicked"

i have to do something which is ¨ Design a scene that builds and ice cream cone taller and taller with each click ¨
vallere702
Scratcher
100+ posts

How to do a "when this clone clicked"

oce275 wrote:

i have to do something which is ¨ Design a scene that builds and ice cream cone taller and taller with each click ¨
Please create your own topic here if you have a question.
RB4905
Scratcher
35 posts

How to do a "when this clone clicked"

when I start as a clone
wait until <<mouse down> and <touching mouse pointer>>
what you want to happen
lulbelgrade
New Scratcher
3 posts

How to do a "when this clone clicked"

when I start as a clone
forever
if <mouse down?> then
your code.
end
end
Linkin753
Scratcher
100+ posts

How to do a "when this clone clicked"

cool thx i needed help im making a smash bros clicker with platformer mini games and more even the Super Scratch bros made by
@Thesuperguidegames
Linkin753
Scratcher
100+ posts

How to do a "when this clone clicked"

for the clicker the cheacter select lol
nathany100
Scratcher
1 post

How to do a "when this clone clicked"

but the user could just hold down mouse and hover mouse over a clone

Powered by DjangoBB