Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How can i make clones broadcast their x and y positions?
- aklababuptis128
-
New Scratcher
18 posts
How can i make clones broadcast their x and y positions?
Basically all the doors in my game are clones, and when a door is opened i need text to appear in its position for a moment. I can do it with one clone but idk how to have multiple texts appear on different doors at the same time
- -duckergames-
-
New Scratcher
16 posts
How can i make clones broadcast their x and y positions?
you can use two seperate lists and give each clone their own ID
make 2 variables called “ID” and “max ID” and set them both to “For this sprite only”
then do this:
then use this for the clone stuff:
hope this helps
make 2 variables called “ID” and “max ID” and set them both to “For this sprite only”
then do this:
when green flag clicked
set [max ID v] to [0]
repeat (100)
add [] to [clone x v]
add [] to [clone y v]
end
then use this for the clone stuff:
when I start as a clone
set [ID v] to ((max ID) + (1))
set [max ID v] to [ID v]
forever
replace item (ID v) of [clone x v] with [x position]
replace item (ID v) of [clone y v] with [y position]
end
hope this helps

- aklababuptis128
-
New Scratcher
18 posts
How can i make clones broadcast their x and y positions?
Thx, ill try it now 

- aklababuptis128
-
New Scratcher
18 posts
How can i make clones broadcast their x and y positions?
I adjusted it a bit and it works well ty 

- Discussion Forums
- » Help with Scripts
-
» How can i make clones broadcast their x and y positions?