This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-08-22 04:48:19

colorfusion
Scratcher
Registered: 2009-10-03
Posts: 500+

Multi-select, Grouping and shared scripts

In scratch there has probably been times where you have had to put the same exact script into about 20 sprites, or need to keep changing from one sprite to another toget parts from a script.
I have a few ideas that would solve all this.
Firstly, I need to show you my idea of multi select.
<I did have a picture, but it got lost>
To multi-select all you have to do is either hold CTRL key and click on the sprites you want, or drag a box around them in the sprites section.
Once you have selected the sprites you will see all their scripts something like this:

http://i36.tinypic.com/21nmjoh.jpg

Sprites without scripts will not show up on this list, but this allows scripts to be easily changed and moved from one sprite to another.
It also allows you to lock all at once, or unlock all at once.
As you can see on the picture, unless they all have the same X and Y, X and Y will not show up. And if they have different rotation ability's they all show up but if you change it to something else they all get set to that.

Next is grouping.

<Again, I had a good image for this but lost it>

To group, all you have to do is select the sprites you want, then either click the "Group" button or right click and select "Group"
Once sprites are in a group, they will look like 1 sprite on the sprite list

http://i36.tinypic.com/2yx0ivp.jpg

Except when you double click it, it expands.

http://i34.tinypic.com/16k84xs.jpg

When you have a whole group selected, it will be just like  selecting multiple sprites, except one small thing.
At the bottom of the script section below all the sprites there is a section named "Shared scripts"
Any scripts put here affect the whole group.
For instance if you put "When flag clicked, move 5 steps" The whole group would do it.

This would be really useful when trying to script all sprites to do something, like hide when the game ends or make an earthquake effect.

You can even have groups inside groups and variables for groups!



Problems, and answers:

What about things like "Touching [___]" block when half the group is touching, half is not?
It will act like one sprite when situations like that come up, so if it is touching it at all, it will be true, as something in the the group is touching it.

Last edited by colorfusion (2010-08-22 04:50:47)

Offline

 

#2 2010-08-22 05:11:34

colorfusion
Scratcher
Registered: 2009-10-03
Posts: 500+

Re: Multi-select, Grouping and shared scripts

This was meant to go in suggestions, can a mod please move it?

Offline

 

#3 2010-08-22 05:13:49

Wolfie1996
Retired Community Moderator
Registered: 2009-07-08
Posts: 1000+

Re: Multi-select, Grouping and shared scripts

colorfusion wrote:

This was meant to go in suggestions, can a mod please move it?

Sure  smile


"...Jargon - the practice of never calling a spade a spade, when you might instead call it a manual earth-restructing implement..." - Bill Bryson, Mother Tongue

Offline

 

Board footer