Discuss Scratch

Sevinj08
Scratcher
5 posts

How can i store link to object(sprite)?

Hi. I want to have a lot of sprites and only active one should move and perform actions.

How can I store link to active sprite(to pass him command)? Or there are another way to do it?

deck26
Scratcher
1000+ posts

How can i store link to object(sprite)?

Perhaps use a variable broadcast - eg

broadcast (activate-sprite)
So if the variable is set to go-sprite1 and only sprite1 has a ‘when I receive go-sprite1’ then that is what will respond. Change the variable to give a different broadcast.
Sevinj08
Scratcher
5 posts

How can i store link to object(sprite)?

deck26 wrote:

Perhaps use a variable broadcast - eg

broadcast (activate-sprite)
So if the variable is set to go-sprite1 and only sprite1 has a ‘when I receive go-sprite1’ then that is what will respond. Change the variable to give a different broadcast.

Thank you very much. Sounds good for me.
ParadoxScratching
Scratcher
100+ posts

How can i store link to object(sprite)?

There is a much easier way to do it. Just do the command to the only sprite that does that, then execute the others as a clone.
Sevinj08
Scratcher
5 posts

How can i store link to object(sprite)?

ParadoxScratching wrote:

There is a much easier way to do it. Just do the command to the only sprite that does that, then execute the others as a clone.
I didn't fully understand you. Can you explain a little?
ParadoxScratching
Scratcher
100+ posts

How can i store link to object(sprite)?

when green flag clicked
execution
repeat (n)
create clone of [myself v]
end

when I start as a clone

Powered by DjangoBB