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

#1 2012-05-27 09:04:29

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Grouping sprites and variables

For games that require a single sprite to interact with many other identical ones (like bullet scripts) using the and block is really annoying. I think there should be a new kind of data called groups and you should be able to put sprites in so you can just have

when gf clicked
if <touching [enemygroup v]?>
do stuff

instead of a large and


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#2 2012-05-28 01:11:08

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: Grouping sprites and variables

Sprite and variable grouping would be very cool, but I'm not sure if I'd use it too often  tongue  It would definitely be useful though.

A list can be used as a group of variables in some cases BTW:

if <[list v] contains [thing]>
 do stuff
Each item acts as a variable, and it checks all the items ^^

Last edited by Jonathanpb (2012-05-28 01:12:26)


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#3 2012-05-28 01:21:50

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: Grouping sprites and variables

Jonathanpb wrote:

Sprite and variable grouping would be very cool, but I'm not sure if I'd use it too often  tongue  It would definitely be useful though.

A list can be used as a group of variables in some cases BTW:

if <[list v] contains [thing]>
 do stuff
Each item acts as a variable, and it checks all the items ^^

But scratch doesn't allow

<touching <item (any v) of [objects v]>?>

Offline

 

#4 2012-05-28 01:52:11

trinary
Scratcher
Registered: 2012-01-29
Posts: 1000+

Re: Grouping sprites and variables

I suppose this could be useful.


http://trinary.tk/images/signature_.php

Offline

 

Board footer