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

#26 2010-01-25 12:53:23

RHY3756547
Scratcher
Registered: 2009-08-15
Posts: 1000+

Re: Object Groups - shorter scripts FTW!

Bippity bumpity boo

Offline

 

#27 2010-01-25 15:41:27

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: Object Groups - shorter scripts FTW!

RHY3756547 wrote:

Bippity bumpity boo

Lol  tongue


http://i.imgur.com/WBkM2QQ.png

Offline

 

#28 2010-01-25 15:44:04

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: Object Groups - shorter scripts FTW!

Lucario621 wrote:

RHY3756547 wrote:

Bippity bumpity boo

Lol  tongue

http://img638.imageshack.us/img638/7123/waffleface.png
O RLY?

Sorry...


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#29 2010-01-25 16:00:11

shamrocker
Scratcher
Registered: 2009-03-19
Posts: 1000+

Re: Object Groups - shorter scripts FTW!

i SUPPORT!


http://i46.tinypic.com/2s1b32e.png
respect the oxford comma

Offline

 

#30 2010-01-25 16:14:14

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

Re: Object Groups - shorter scripts FTW!

Uh, RHY - you can already do object groups - I'll upload a project with it in.


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

 

#31 2010-01-25 17:11:50

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

Re: Object Groups - shorter scripts FTW!

I've uploaded the project containing object groups here: http://scratch.mit.edu/projects/Wolfie1996/860165

It doesn't work online, though. Which isn't ideal  hmm  Sorry for double posting!

Last edited by Wolfie1996 (2010-01-25 17:12:14)


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

 

#32 2010-01-25 18:29:22

RHY3756547
Scratcher
Registered: 2009-08-15
Posts: 1000+

Re: Object Groups - shorter scripts FTW!

But for one, that doesn't work online because they didn't foresee anyone using it. Two - that doesn't work with the *trigger if* function I mentioned so that the application could grab the variable from the item it touched.

Offline

 

#33 2010-01-25 21:41:49

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: Object Groups - shorter scripts FTW!

well this reminds me BYOB thats getting b8r then scratch as the BYOBs block building capability allows the reporter and balloeen U talked about what u say.

Just make an atomic block.
repeat (lnList)
||i = i+1;
||if(item (i) of list = = desired object)
|||stop script;
set i = = \0;

now for a balloen (tru or fals)
u can do if i = = \0
set reportr  to false;
else
set reportr to true;

report reportr.


and for a reporter
just report i for which entity it is touching.

I wonder u couldnt figure that out.

BUT oh yeash BYOB projects cannot be uploaded on site.

WHY DONT THEY GIVE BLOCK BUILDING CAPABILITY USING C++ like headers.


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#34 2010-01-25 21:47:35

greenflash
Scratcher
Registered: 2009-05-27
Posts: 1000+

Re: Object Groups - shorter scripts FTW!

RHY3756547 wrote:

greenflash wrote:

This would be awesome! I don't think it needs to be broken into other categories though.

Yeah - I just think they should also rename the "Variables" section to something more general though.

Definately.


http://i48.tinypic.com/2wrkirk.pnghttp://i46.tinypic.com/6r5zk7.pnghttp://i45.tinypic.com/2vtxr1t.png

Offline

 

#35 2010-01-25 21:49:23

fireball123
Scratcher
Registered: 2008-05-08
Posts: 1000+

Re: Object Groups - shorter scripts FTW!

I've also tried suggesting this several times before, to much the same response.


I did it for the Lolz

Offline

 

#36 2010-01-26 12:11:13

RHY3756547
Scratcher
Registered: 2009-08-15
Posts: 1000+

Re: Object Groups - shorter scripts FTW!

Bippity Bumpity Boo.
Add this Noo-w!

Fanofcena:

Doing everything in the bloody universe with the current scratch blocks just results in lag. ...and a lot.

Offline

 

#37 2010-01-27 12:07:56

RHY3756547
Scratcher
Registered: 2009-08-15
Posts: 1000+

Re: Object Groups - shorter scripts FTW!

It'd also be nice if the existing list and variable blocks could go into things and work online.

If touching (Item (any) of list) doesn't work online, nor does (variable (bla) of (variable) )

Offline

 

#38 2010-01-27 19:55:05

carnack
Scratcher
Registered: 2009-06-30
Posts: 100+

Re: Object Groups - shorter scripts FTW!

I support 110%. This is an amazing Idea, and useful too.


http://i853.photobucket.com/albums/ab95/7x9/Carnack.png
Carnack The Bug

Offline

 

#39 2010-01-29 03:22:37

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Object Groups - shorter scripts FTW!

illusionist wrote:

http://i45.tinypic.com/20rtvmw.png

How is this?
I think its about time we broke up the variables category!  lol

Tell me the code of it!
Tell me the code of it for Squeak!

Offline

 

#40 2010-01-29 11:10:31

filo5
Scratcher
Registered: 2008-01-08
Posts: 1000+

Re: Object Groups - shorter scripts FTW!

RHY3756547 wrote:

It'd also be nice if the existing list and variable blocks could go into things and work online.

If touching (Item (any) of list) doesn't work online, nor does (variable (bla) of (variable) )

... which are quite good workarounds and/or little-known thingies, thank you for mentioning it!


Converting my Scratch projects to Python!

Offline

 

#41 2010-01-30 19:22:56

RHY3756547
Scratcher
Registered: 2009-08-15
Posts: 1000+

Re: Object Groups - shorter scripts FTW!

*bump*
Hopefully this will be in the next version.  smile

Offline

 

#42 2010-01-31 11:08:03

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: Object Groups - shorter scripts FTW!

This idea can actually be implemented now but it's not very easy. Just create a list named "enemies" and fill it with the sprite names of all enemy sprites. Then to check collisions against them:

Code:

i=0
repeat( length of (enemies)) {
  if(touching (item i of enemies)){
    broadcast("something bad")
  }
  change i by 1
}

What would be really helpful is a (my name) reporter that holds the name of a sprite. That way you wouldn't have to populate the enemies list manually.


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#43 2010-01-31 11:13:48

The-Whiz
Scratcher
Registered: 2007-07-09
Posts: 1000+

Re: Object Groups - shorter scripts FTW!

fullmoon wrote:

This idea can actually be implemented now but it's not very easy. Just create a list named "enemies" and fill it with the sprite names of all enemy sprites. Then to check collisions against them:

Code:

i=0
repeat( length of (enemies)) {
  if(touching (item i of enemies)){
    broadcast("something bad")
  }
  change i by 1
}

What would be really helpful is a (my name) reporter that holds the name of a sprite. That way you wouldn't have to populate the enemies list manually.

Yeah... I've used that before, and it works well offline, but not at all online. I call it "sprite iteration".

Offline

 

#44 2010-01-31 11:21:45

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: Object Groups - shorter scripts FTW!

The-Whiz wrote:

Yeah... I've used that before, and it works well offline, but not at all online. I call it "sprite iteration".

Really? Weird! I've never tried this in practice, so I'll take your word for it  smile . It's a shame the Scratch team hasn't paid more attention to this feature, it's really useful.


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

#45 2010-01-31 13:22:11

RHY3756547
Scratcher
Registered: 2009-08-15
Posts: 1000+

Re: Object Groups - shorter scripts FTW!

Using more blocks just makes the program run slower - as it has to interpret more. What I want is direct funtionality so that new users can easily create enemies groups etc. without the complications and slowdowns of using more advanced ways. For me - it's the slowdowns.

Offline

 

#46 2010-01-31 13:40:08

The-Whiz
Scratcher
Registered: 2007-07-09
Posts: 1000+

Re: Object Groups - shorter scripts FTW!

fullmoon wrote:

The-Whiz wrote:

Yeah... I've used that before, and it works well offline, but not at all online. I call it "sprite iteration".

Really? Weird! I've never tried this in practice, so I'll take your word for it  smile . It's a shame the Scratch team hasn't paid more attention to this feature, it's really useful.

Yeah... This project. The ball uses the sprite iteration... But, as you can see, it doesn't work online. I think it is because the Scratch project player can't process variables or lists in blocks like [go to []] and <touching []>.

Offline

 

#47 2010-02-01 12:48:03

RHY3756547
Scratcher
Registered: 2009-08-15
Posts: 1000+

Re: Object Groups - shorter scripts FTW!

The-Whiz wrote:

fullmoon wrote:

The-Whiz wrote:

Yeah... I've used that before, and it works well offline, but not at all online. I call it "sprite iteration".

Really? Weird! I've never tried this in practice, so I'll take your word for it  smile . It's a shame the Scratch team hasn't paid more attention to this feature, it's really useful.

Yeah... This project. The ball uses the sprite iteration... But, as you can see, it doesn't work online. I think it is because the Scratch project player can't process variables or lists in blocks like [go to []] and <touching []>.

It's a bit laggy with more platforms...

Offline

 

#48 2010-02-03 15:37:54

j22m
Scratcher
Registered: 2009-10-18
Posts: 3

Re: Object Groups - shorter scripts FTW!

GirWaffles64 wrote:

RHY3756547 wrote:

It would be great if objects could be put in groups that we could use to detect collisions for objects of the same type, report variables and much more.

Here's how it would work.

Say we made a group called enemies. There would be "Add me to group ()" and "Remove me from group()" blocks, as well as "Empty group" etc. Now, we make a lot of enemies and add them to the Ememies group. Now - in the unfortunate player who has to face these enemies' scripts we put something like "if touching (Group (enemies)) { Set (Y-velocity) to (Y-velocity of (Trigger If))". Trigger if would refrence to the object from the group that the script interacted with.

An example of this would be the implementation in The Sims Carnival Game Creator. Trust me - it made multiple object collision a LOT easier.

This idea has been in my head for years. Now somebody agrees with me!

(does victory dance)

Good Idea I Agree

"Sarcasm doesn't work on paper"  big_smile

Offline

 

#49 2010-02-06 01:43:42

Keani
Scratcher
Registered: 2009-08-15
Posts: 39

Re: Object Groups - shorter scripts FTW!

that would be sooo helpful for my space invaders game


http://internetometer.com/image/9932.png

Offline

 

#50 2010-02-08 12:31:55

RHY3756547
Scratcher
Registered: 2009-08-15
Posts: 1000+

Re: Object Groups - shorter scripts FTW!

I just noticed that Wolfie's method DOES NOT WORK RIGHT. Implementing it in a game I am making allows my character to go through the wall sometimes because the item selected from the list is random.

There is no other way (without atomicism, but even then scratch's interpreter would make games too darn slow). We need object groups. D:

Offline

 

Board footer