Discuss Scratch

-Your_Nightmare-
Scratcher
10 posts

Sharing clone data

I am trying to make a simulation game for fun, but i can't find a way to make 2 clones share data to each other. For example, Clone1 shares to Clone2 that it's random number is 2. But how do i do that so it can write down its variable into a list and tell the other clone what list number it wrote it on. Please help
iloveEVERTONtheyrule
Scratcher
65 posts

Sharing clone data

Yes that is because I believe, I’m not sure though that there isn’t a way to make clone variables.
haha_I_am_god
Scratcher
2 posts

Sharing clone data

I'm pretty sure the only way to make clones share data is by using a broadcast block to change the values or to use variables from another sprite.
for example:
when I start as a clone
forever
go to x: ([ v] of [Sprite of your choicev]) y: (0)
end
i don't use these chat blocks much, so sorry for the poor example.
you get the point.

Last edited by haha_I_am_god (Feb. 19, 2025 02:25:26)

EpicGhoul993
Scratcher
1000+ posts

Sharing clone data

If you have a system that labels each clone with an ID, you can create global lists that those clones can write in.
replace item (cloneID) of [shared list v] with (share)
deck26
Scratcher
1000+ posts

Sharing clone data

Do you only have 2 clones or multiple clones where are two clones may be the pair that need to communicate? Please provide more detail so we can tailor the answer.

Ignore any advice saying you can't make clone variables. Any variable ‘for this sprite only’ is duplicated for the clone when it is created (it inherits the parent's value) but after that the clone can change the value without affecting another object's value for their copy of the variable.
-Your_Nightmare-
Scratcher
10 posts

Sharing clone data

Well i need it to get the Id of a clone and share its data like speed, health, and eyesight to the other clone but the list will not work in this scenario

Powered by DjangoBB