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

#1 2010-05-24 14:05:13

blastoisedragon
Scratcher
Registered: 2010-05-18
Posts: 7

Grouping

I want to put all my enemies in a group to avoid having extremely long scripts. Is there a way i can do this?

Offline

 

#2 2010-05-24 14:12:22

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

Re: Grouping

There was a suggestion a while ago from RHY3756547... but it hasn't been implemented yet. For now, you can create a list, and add the names of all the sprites you want in the group to it (make sure you spell them exactly right!). Then, make a sprite like this:

if touching {item( any ) of ( list )}
Do whatever

However, this will only work offline at the moment...  hmm  You'll just have to ask people to download.


"...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

 

#3 2010-05-24 14:44:26

blastoisedragon
Scratcher
Registered: 2010-05-18
Posts: 7

Re: Grouping

Thank you for explaining it to me, I saw the forum page to which you are refering to but i didn't understand it, Ididn't realise it was the any instruction. Thank you again.

Offline

 

#4 2010-05-24 15:17:06

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Grouping

Wolfie1996 wrote:

There was a suggestion a while ago from RHY3756547... but it hasn't been implemented yet. For now, you can create a list, and add the names of all the sprites you want in the group to it (make sure you spell them exactly right!). Then, make a sprite like this:

if touching {item( any ) of ( list )}
Do whatever

However, this will only work offline at the moment...  hmm  You'll just have to ask people to download.

Hey, I never would have thought of that. Thankies, that helped me too!
I'm not entirely sure why that won't work online, though...  hmm  Any ideas?

Offline

 

#5 2010-05-24 15:23:51

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

Re: Grouping

coolstuff wrote:

Wolfie1996 wrote:

There was a suggestion a while ago from RHY3756547... but it hasn't been implemented yet. For now, you can create a list, and add the names of all the sprites you want in the group to it (make sure you spell them exactly right!). Then, make a sprite like this:

if touching {item( any ) of ( list )}
Do whatever

However, this will only work offline at the moment...  hmm  You'll just have to ask people to download.

Hey, I never would have thought of that. Thankies, that helped me too!
I'm not entirely sure why that won't work online, though...  hmm  Any ideas?

I've known how to do that for a while now  big_smile  You're welcome!

'Cos the Java player is grumpy  tongue  It's one of those things that works offline, but not online, I guess... Like the volume blocks... But the Scratch Team said that, when 2.0 comes out, the online player will run in the same way as the offline one, so it should work in future... But RHY's idea is still cool.  big_smile

[shameless advertising]
I uploaded a test a while ago using object groups (pre-test account, so it's on my main account...) It's here
[/shameless advertising]

Last edited by Wolfie1996 (2010-05-24 15:25:11)


"...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