Discuss Scratch

ToonPink6
Scratcher
5 posts

touching a clone of myself

.

Last edited by ToonPink6 (March 31, 2025 16:27:41)

deck26
Scratcher
1000+ posts

touching a clone of myself

The touching sprite block does work with clones as well. Does that help? If not we need to have more info or see the project.
seoboyun2013
Scratcher
9 posts

touching a clone of myself

when I start as a clone
forever
if <touching [ sprite1] ?> then
say [...] for (2) secs
end
end



you have to do the touching myself block in another sprite and drag it into the sprite you want

Last edited by seoboyun2013 (April 7, 2022 09:26:38)

SuperDragonStudios
Scratcher
500+ posts

touching a clone of myself

ToonPink6 wrote:

i want to make sprites collide with other sprites. i already have a system for this, but this time i'm trying to make a clone of a sprite collide with other clones of that sprite. how do i do this?
The simplest way to fix this is to use the color detection blocks. First you want to find the main color for the clone, and then implement this into your script:


when I start as a clone
...
if <touching color [#000000] ?> then // Set the color you want to detect to the clone's main color
...
end
If this doesn't help, please share a link to the project you need help with.
Jareddddddd
Scratcher
1000+ posts

touching a clone of myself

there isnt an actualy way for the sprite to detect a clone, other then color sensing, but clones can detect if theyre touching the main sprite : create a new sprite and get out a (touching ( )) block.
<touching [ v] ?>
then just drag that block to the sprite in the menu below the game display. It works only for the clones touching the main sprite

also, clones cannot sense other clones, only the main sprite with this code

Last edited by Jareddddddd (April 7, 2022 15:24:37)

ToonPink6
Scratcher
5 posts

touching a clone of myself

Jareddddddd wrote:

there isnt an actualy way for the sprite to detect a clone, other then color sensing, but clones can detect if theyre touching the main sprite : create a new sprite and get out a (touching ( )) block.
<touching [ v] ?>
then just drag that block to the sprite in the menu below the game display. It works only for the clones touching the main sprite

also, clones cannot sense other clones, only the main sprite with this code
well, i tried this and it actually does detect clones, not just the main sprite, so that worked
gbhiq
Scratcher
10 posts

touching a clone of myself

deck26 wrote:

The touching sprite block does work with clones as well. Does that help? If not we need to have more info or see the project.
Yes, in my experience this does work as well. I'm not sure if it used to work in Scratch 2.0 though, but as I said earlier, it works on scratch 3.0.
gbhiq
Scratcher
10 posts

touching a clone of myself

when I start as a clone
if <> then
<touching [ Cat] ?>
move (99) steps
end
Regressing
Scratcher
1 post

touching a clone of myself

In Scratch 3, the Touching block has a select list of available sprites, however the sprite you are coding isn't in that list. You can trick it by replacing the select list using a Join block where you provide the name of the sprite joined with an empty value. This allows the sprite to detect collisions with clones of itself.

if <touching (join [Sprite Name] []) ?> then
say [Sprite touching clone of self.]
end

You can also give each clone an ID. This will give the ability to test if a specific clone is touching another.



Last edited by Regressing (April 10, 2022 18:02:29)

Powered by DjangoBB