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
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... You'll just have to ask people to download.
Offline
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
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...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... Any ideas?
Offline
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...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...Any ideas?
I've known how to do that for a while now You're welcome!
'Cos the Java player is grumpy 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.
[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)
Offline