Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to I give a clone it's own distinctive data?
- MagnusM2
-
Scratcher
8 posts
How to I give a clone it's own distinctive data?
I want each clone of an object to have it's own value, but I don't want it to be visual. I've tried using variables but I'm just not sure.
- GuineaGod
-
Scratcher
500+ posts
How to I give a clone it's own distinctive data?
Explain the question in depth more. If your trying to create a clown with your own distinctive data, you might want to create another sprite.
- MagnusM2
-
Scratcher
8 posts
How to I give a clone it's own distinctive data?
in my game, I have these clones coming in that you have to time when you press a key, so they disappear in time, but the issue is, when i hit the key, multiple clones that are close enough will also disappear, but for each one i want to give it it's own input to disappear. I have list that says when the clone should appear, so im thinking if i can get it's value as the same as it's number in the list, then I can have it disappear when it has the right input.
- nyankatpro
-
Scratcher
500+ posts
How to I give a clone it's own distinctive data?
Fun fact: if you set a variable as “for this sprite only,” you can use it to give clones their own specific values. Maybe try that?
- StoneNicolas93
-
Scratcher
43 posts
How to I give a clone it's own distinctive data?
Use for this sprite only on variable and then use set the value of that variable under the when I start as a clone script.
- The_Imaginarium
-
Scratcher
1000+ posts
How to I give a clone it's own distinctive data?
The easiest way to edit the values of a clone
when green flag clicked
delete (all v) of [Clone X v]//add more lists if you want, for example clone size, clone costume etc.
delete (all v) of [Clone Y v]
delete (all v) of [Clone Dir v]
set [Clone ID v] to [0]//make sure this variable is local
repeat (N :: #8F939F)//N is the number of clones you want
change [Clone ID v] by [1]
add [0] to [Clone X v]//make sure to add your new lists here too
add [0] to [Clone Y v]
add [0] to [Clone Dir v]
create clone of [myself v]
end
when I start as a clone
forever
go to x:(item (Clone ID) of [Clone X v] :: list) y:(item (Clone ID) of [Clone Y v] :: list)
point in direction (item (Clone ID) of [Clone Dir v] :: list)
//add the values of the clones you want to the lists. You can change these easily at anytime.
end
- Discussion Forums
- » Help with Scripts
-
» How to I give a clone it's own distinctive data?