Discuss Scratch

Gamdapiko24
Scratcher
86 posts

How do I detect if a clone is touching a clone of itself

I am making a game and it has a bunch of clones of enemies and I want them to die if they are touching each other. But I don't know how to detect if a clone is touching another clone of itself. This applies to all clones in the sprite “enemy”.

This is the game if you need it:
https://scratch.mit.edu/projects/1121874608

Thank you,
Gamdapiko
paster_master100
Scratcher
100+ posts

How do I detect if a clone is touching a clone of itself

<touching [Myself v] ?>
(the “Myself” has to be the dropdown from the
create clone of [myself v]
block
Gamdapiko24
Scratcher
86 posts

How do I detect if a clone is touching a clone of itself

There is no “Myself” on the drop-down.
paster_master100
Scratcher
100+ posts

How do I detect if a clone is touching a clone of itself

Gamdapiko24 wrote:

There is no “Myself” on the drop-down.
use a separated clone drop down menu to make it!
Gamdapiko24
Scratcher
86 posts

How do I detect if a clone is touching a clone of itself

I am confused.
paster_master100
Scratcher
100+ posts

How do I detect if a clone is touching a clone of itself

Gamdapiko24 wrote:

I am confused.
Here's a project with the separated clone dropdown:
project
Gamdapiko24
Scratcher
86 posts

How do I detect if a clone is touching a clone of itself

THESE ARE TOO MANY BLOCKS
paster_master100
Scratcher
100+ posts

How do I detect if a clone is touching a clone of itself

Gamdapiko24 wrote:

THESE ARE TOO MANY BLOCKS
use the cleanup function and it should be at the top (at least what I think)
shenmuueedoesnumbers
Scratcher
77 posts

How do I detect if a clone is touching a clone of itself

how did you get so many secret blocks
shenmuueedoesnumbers
Scratcher
77 posts

How do I detect if a clone is touching a clone of itself

and why are all of the blocks broken
paster_master100
Scratcher
100+ posts

How do I detect if a clone is touching a clone of itself

shenmuueedoesnumbers wrote:

and why are all of the blocks broken
I SWEAR the (myself v) block worked I tested it in my game and it worked
10goto10
Scratcher
1000+ posts

How do I detect if a clone is touching a clone of itself

You can use a join block inside of a touching block to see if a sprite or a clone of that sprite is touching one if its clones.

So, if a sprite is named “Sprite1” then this

<touching (join [Sprite1] []) ?>

will let you tell when it or its clones is touching another of its clones. That second field has to be nothing, not a space.
Koamodo975
Scratcher
1000+ posts

How do I detect if a clone is touching a clone of itself

10goto10 wrote:

You can use a join block inside of a touching block to see if a sprite or a clone of that sprite is touching one if its clones.

So, if a sprite is named “Sprite1” then this

<touching (join [Sprite1] []) ?>

will let you tell when it or its clones is touching another of its clones. That second field has to be nothing, not a space.
There is another way. Go into a different sprite and get an if touching block for the sprite, then drag it into the first sprite.
jacksonwintle
Scratcher
1 post

How do I detect if a clone is touching a clone of itself

e
Godzillaplayer
Scratcher
5 posts

How do I detect if a clone is touching a clone of itself

jacksonwintle wrote:

e
e
Tornadowrath
Scratcher
66 posts

How do I detect if a clone is touching a clone of itself

k this is actually pretty easy with a bug, just go into another sprite in the editor, and pull a

<touching [ the original sprite] ?>

block into the original sprite and detect for touching that

Powered by DjangoBB