Discuss Scratch

kooqle
Scratcher
100+ posts

Clones responding to messages

Hi everyone! I'm making a game where clones have to respond to messages. Is this possible (the clones already have a clone ID. Thank you

A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature.

when [ follow v] key pressed
think [thanks!] for (2) secs
JASON2811
Scratcher
2 posts

Clones responding to messages

ok
Jaim_animation
Scratcher
77 posts

Clones responding to messages

This Is Possible. Just Use The
when I receive [ Any Massage v]
block and freely put blocks under it, every clone will perform it (yes, clones automatically recieves broadcasts) really really easy! If You Want Clones Do Seperate Things, Simply-
when I receive [ Any Massage v]
if <(cloneID) = (1)> then
//do something
end
if <(cloneID) = (2)>
//do something
//these if continues, as many as you need
end

Last edited by Jaim_animation (March 23, 2024 08:18:21)


Hope It Helps!

—-Hi! I Am Jaim, A 9 Years Old Bangladeshi Boy! I like To Code In Javascript,HTML, Css Aaand Scratch!—
I Like To Make Appel Levels!
My Appel Level Collections-
Desert Appel Collection

scratch blue infection! try to prevent it, but how?
kooqle
Scratcher
100+ posts

Clones responding to messages

Jaim_animation wrote:

This Is Possible. Just Use The
when I receive [ Any Massage v]
block and freely put blocks under it, every clone will perform it (yes, clones automatically recieves broadcasts) really really easy! If You Want Clones Do Seperate Things, Simply-
when I receive [ Any Massage v]
if <(cloneID) = (1)> then
//do something
end
if <(cloneID) = (2)>
//do something
//these if continues, as many as you need
end
Thanks, but anything not under the
when I start as a clone
block will not be ran as a clone, the sprite itself will do it, and there lies my problem. Thank you for your reply, however.
say [Thanks for your reply!]

A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature.

when [ follow v] key pressed
think [thanks!] for (2) secs
TheUltimateHoodie
Scratcher
1000+ posts

Clones responding to messages

kooqle wrote:

Jaim_animation wrote:

This Is Possible. Just Use The
when I receive [ Any Massage v]
block and freely put blocks under it, every clone will perform it (yes, clones automatically recieves broadcasts) really really easy! If You Want Clones Do Seperate Things, Simply-
when I receive [ Any Massage v]
if <(cloneID) = (1)> then
//do something
end
if <(cloneID) = (2)>
//do something
//these if continues, as many as you need
end
Thanks, but anything not under the
when I start as a clone
block will not be ran as a clone, the sprite itself will do it, and there lies my problem. Thank you for your reply, however.
say [Thanks for your reply!]
when green flag clicked
set [am i a clone? v] to [no]
when I start as a clone
set [am i a clone? v] to [yes]
when I receive [something only clones should do v]
if <(am i a clone?) = [yes]> then
do the thing
end
when I receive [something only main sprite should do v]
if <(am i a clone?) = [no]> then
do the thing
end
had to edit this multiple times because scratchblocks kept breaking

Last edited by TheUltimateHoodie (March 23, 2024 09:49:16)


can somebody give me something to put in my signature
kooqle
Scratcher
100+ posts

Clones responding to messages

Thank you!

A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature.

when [ follow v] key pressed
think [thanks!] for (2) secs
kooqle
Scratcher
100+ posts

Clones responding to messages

TheUltimateHoodie wrote:

kooqle wrote:

Jaim_animation wrote:

This Is Possible. Just Use The
when I receive [ Any Message v]
block and freely put blocks under it, every clone will perform it (yes, clones automatically recieves broadcasts) really really easy! If You Want Clones Do Seperate Things, Simply-
when I receive [ Any Message v]
if <(cloneID) = (1)> then
//do something
end
if <(cloneID) = (2)>
//do something
//these if continues, as many as you need
end
Thanks, but anything not under the
when I start as a clone
block will not be ran as a clone, the sprite itself will do it, and there lies my problem. Thank you for your reply, however.
say [Thanks for your reply!]
when green flag clicked
set [am i a clone? v] to [no]
when I start as a clone
set [am i a clone? v] to [yes]
when I receive [something only clones should do v]
if <(am i a clone?) = [yes]> then
do the thing
end
when I receive [something only main sprite should do v]
if <(am i a clone?) = [no]> then
do the thing
end
had to edit this multiple times because scratchblocks kept breaking
Sadly I tried your method and it didn't work, but I asked a friend (@_HelloWorld54) and he came up with this…
when green flag clicked
set [Clonemessage v] to [0]
when I receive [ v]
change [Clonemessage v] by (1)
when I start as a clone
wait until <><(foo) = [1]>
And do whatever it needs to do!

A signature is a small piece of text that is attached to your posts. In it, you can enter just about anything you like. Perhaps you would like to enter your favourite quote or your star sign. It's up to you! In your signature you can use BBCode if it is allowed in this particular forum. You can see the features that are allowed/enabled listed below whenever you edit your signature.

when [ follow v] key pressed
think [thanks!] for (2) secs
Jaim_animation
Scratcher
77 posts

Clones responding to messages

kooqle wrote:

TheUltimateHoodie wrote:

kooqle wrote:

Jaim_animation wrote:

This Is Possible. Just Use The
when I receive [ Any Message v]
block and freely put blocks under it, every clone will perform it (yes, clones automatically recieves broadcasts) really really easy! If You Want Clones Do Seperate Things, Simply-
when I receive [ Any Message v]
if <(cloneID) = (1)> then
//do something
end
if <(cloneID) = (2)>
//do something
//these if continues, as many as you need
end
Thanks, but anything not under the
when I start as a clone
block will not be ran as a clone, the sprite itself will do it, and there lies my problem. Thank you for your reply, however.
say [Thanks for your reply!]
when green flag clicked
set [am i a clone? v] to [no]
when I start as a clone
set [am i a clone? v] to [yes]
when I receive [something only clones should do v]
if <(am i a clone?) = [yes]> then
do the thing
end
when I receive [something only main sprite should do v]
if <(am i a clone?) = [no]> then
do the thing
end
had to edit this multiple times because scratchblocks kept breaking
Sadly I tried your method and it didn't work, but I asked a friend (@_HelloWorld54) and he came up with this…
when green flag clicked
set [Clonemessage v] to [0]
when I receive [ v]
change [Clonemessage v] by (1)
when I start as a clone
wait until <><(foo) = [1]>
And do whatever it needs to do!
This Topic Is For Broadcasting, Not For Another Way Which Works The Same, You Could Tell Us Using Variables Instead Is Also Ok

Hope It Helps!

—-Hi! I Am Jaim, A 9 Years Old Bangladeshi Boy! I like To Code In Javascript,HTML, Css Aaand Scratch!—
I Like To Make Appel Levels!
My Appel Level Collections-
Desert Appel Collection

scratch blue infection! try to prevent it, but how?
Jaim_animation
Scratcher
77 posts

Clones responding to messages

kooqle wrote:

Jaim_animation wrote:

This Is Possible. Just Use The
when I receive [ Any Massage v]
block and freely put blocks under it, every clone will perform it (yes, clones automatically recieves broadcasts) really really easy! If You Want Clones Do Seperate Things, Simply-
when I receive [ Any Massage v]
if <(cloneID) = (1)> then
//do something
end
if <(cloneID) = (2)>
//do something
//these if continues, as many as you need
end
Thanks, but anything not under the
when I start as a clone
block will not be ran as a clone, the sprite itself will do it, and there lies my problem. Thank you for your reply, however.
say [Thanks for your reply!]
Wait, Then How Do
when I receive [Anything v]
delete this clone
Deletes All Of The Clones Of The Sprite? Wait I Got It- The First Method I Described Does Not Works, But Second Method Works!
May Be The Method That Actually Works Is-

when I receive [ Any Massage v]
if <(cloneID) = (1)> then
//do something
end
if <(cloneID) = (2)>
//do something
//these if continues, as many as you need
end
[/scratchblocks]
[/quote]

Last edited by Jaim_animation (March 24, 2024 07:24:23)


Hope It Helps!

—-Hi! I Am Jaim, A 9 Years Old Bangladeshi Boy! I like To Code In Javascript,HTML, Css Aaand Scratch!—
I Like To Make Appel Levels!
My Appel Level Collections-
Desert Appel Collection

scratch blue infection! try to prevent it, but how?
TheUltimateHoodie
Scratcher
1000+ posts

Clones responding to messages

kooqle wrote:

TheUltimateHoodie wrote:

kooqle wrote:

Jaim_animation wrote:

This Is Possible. Just Use The
when I receive [ Any Message v]
block and freely put blocks under it, every clone will perform it (yes, clones automatically recieves broadcasts) really really easy! If You Want Clones Do Seperate Things, Simply-
when I receive [ Any Message v]
if <(cloneID) = (1)> then
//do something
end
if <(cloneID) = (2)>
//do something
//these if continues, as many as you need
end
Thanks, but anything not under the
when I start as a clone
block will not be ran as a clone, the sprite itself will do it, and there lies my problem. Thank you for your reply, however.
say [Thanks for your reply!]
when green flag clicked
set [am i a clone? v] to [no]
when I start as a clone
set [am i a clone? v] to [yes]
when I receive [something only clones should do v]
if <(am i a clone?) = [yes]> then
do the thing
end
when I receive [something only main sprite should do v]
if <(am i a clone?) = [no]> then
do the thing
end
had to edit this multiple times because scratchblocks kept breaking
Sadly I tried your method and it didn't work, but I asked a friend (@_HelloWorld54) and he came up with this…
when green flag clicked
set [Clonemessage v] to [0]
when I receive [ v]
change [Clonemessage v] by (1)
when I start as a clone
wait until <><(foo) = [1]>
And do whatever it needs to do!
I don't know why my method didn't work; I have used it numerous times.
Anyway, your friend's solution still have the same concept.

can somebody give me something to put in my signature
Jaim_animation
Scratcher
77 posts

Clones responding to messages

TheUltimateHoodie wrote:

kooqle wrote:

TheUltimateHoodie wrote:

kooqle wrote:

Jaim_animation wrote:

This Is Possible. Just Use The
when I receive [ Any Message v]
block and freely put blocks under it, every clone will perform it (yes, clones automatically recieves broadcasts) really really easy! If You Want Clones Do Seperate Things, Simply-
when I receive [ Any Message v]
if <(cloneID) = (1)> then
//do something
end
if <(cloneID) = (2)>
//do something
//these if continues, as many as you need
end
Thanks, but anything not under the
when I start as a clone
block will not be ran as a clone, the sprite itself will do it, and there lies my problem. Thank you for your reply, however.
say [Thanks for your reply!]
when green flag clicked
set [am i a clone? v] to [no]
when I start as a clone
set [am i a clone? v] to [yes]
when I receive [something only clones should do v]
if <(am i a clone?) = [yes]> then
do the thing
end
when I receive [something only main sprite should do v]
if <(am i a clone?) = [no]> then
do the thing
end
had to edit this multiple times because scratchblocks kept breaking
Sadly I tried your method and it didn't work, but I asked a friend (@_HelloWorld54) and he came up with this…
when green flag clicked
set [Clonemessage v] to [0]
when I receive [ v]
change [Clonemessage v] by (1)
when I start as a clone
wait until <><(foo) = [1]>
And do whatever it needs to do!
I don't know why my method didn't work; I have used it numerous times.
Anyway, your friend's solution still have the same concept.
Guys What's Going On There? The Problem Is Solved! PLEASE CLOSE THIS TOPIC!

Hope It Helps!

—-Hi! I Am Jaim, A 9 Years Old Bangladeshi Boy! I like To Code In Javascript,HTML, Css Aaand Scratch!—
I Like To Make Appel Levels!
My Appel Level Collections-
Desert Appel Collection

scratch blue infection! try to prevent it, but how?

Powered by DjangoBB