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

#1 2009-06-19 17:26:01

FoxDur
Scratcher
Registered: 2008-07-07
Posts: 87

Blocks

Do you want a new block in scratch? Recently, I saw a project with someone who wanted a block to be put in to scratch. Fortunately, it was something that I knew how to do with existing blocks. That inspired me to create this post. If you have a block that you want in scratch, post it here, and I'll try my best to give you a solution on how to get what it would do with the blocks we have now!

I'm not really sure what forum section to put this in, so I put it in show and tell. If anyone has an idea that I should put it somewhere else, please tell me, and I'll post a new topic there, and leave a link to it on this one.

The blocks (and ways to get the equivalent) I explained:
http://scratch.mit.edu/projects/timjawsome/568619
http://scratch.mit.edu/projects/shrieker/568693

So ask away!

Last edited by FoxDur (2009-06-19 17:34:13)


Do you want an icon? Check out here. Bored? Do you want to animate something? Look here.

Offline

 

#2 2009-06-19 17:33:35

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Blocks

I wish there was a create savedata block. But there really isn't any way to make it work just using code.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#3 2009-06-19 17:35:41

kgordon
Scratcher
Registered: 2009-02-26
Posts: 100+

Re: Blocks

If anyone asks for an if touching color bounce block, something I don't think you could make, just give credit and tell them to look here.

Offline

 

#4 2009-06-19 17:36:17

scmb1
Scratch Team
Registered: 2009-03-19
Posts: 1000+

Re: Blocks

Go to Sprite (pick random 1 to 25)
I know a way to do it but its kind of complicated and takes FOREVER. I really think a Go to Sprite() block should be added to the next version of scratch. I made a block on BYOB, but you can't share BYOB projects.

The way I do it now is make a variable (such as a) than set that to a random number between 1 and 25. Then I say, If (a = 1) { Go to Sprite 1}, If (a=2) { Go to Sprite 2}, ect. 

If you can think of a fairly simple way, please tell me.


http://i48.tinypic.com/2z5pqad.png

Offline

 

#5 2009-06-19 17:37:02

FoxDur
Scratcher
Registered: 2008-07-07
Posts: 87

Re: Blocks

archmage wrote:

I wish there was a create savedata block. But there really isn't any way to make it work just using code.

Lol, yeah. I guess that would be kind of hard to do. I had the one idea of having a save variable that wasn't reset by the green flag, and once you wanted to save you manually saved on scratch, but that would be kind of complicated for the user. Oh well. That would be awesome though.


Do you want an icon? Check out here. Bored? Do you want to animate something? Look here.

Offline

 

#6 2009-06-19 17:37:30

norberts
Scratcher
Registered: 2009-06-06
Posts: 1000+

Re: Blocks

You could make a game where it only changes variables to 0 at the start of the game, so then all those numbers can be saved as long as you don't restart the 'new game' broadcast or whatever.


Coming soon: Super Hero RPG - Based off the forum game.
http://i712.photobucket.com/albums/ww129/Ultratronbot/SuperHeroRPGbanner2.jpg

Offline

 

#7 2009-06-19 17:39:53

FoxDur
Scratcher
Registered: 2008-07-07
Posts: 87

Re: Blocks

scmb1 wrote:

Go to Sprite (pick random 1 to 25)
I know a way to do it but its kind of complicated and takes FOREVER. I really think a Go to Sprite() block should be added to the next version of scratch. I made a block on BYOB, but you can't share BYOB projects.

The way I do it now is make a variable (such as a) than set that to a random number between 1 and 25. Then I say, If (a = 1) { Go to Sprite 1}, If (a=2) { Go to Sprite 2}, ect. 

If you can think of a fairly simple way, please tell me.

I can't think of any super easy way, but you could have a list with the x and a list with the y of all of the sprites, and have it constantly updated, and have the sprite go to the coordinates of a random list item. That would probably lag even more though because of the giant forever loop.


Do you want an icon? Check out here. Bored? Do you want to animate something? Look here.

Offline

 

#8 2009-06-19 17:47:35

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Blocks

norberts wrote:

You could make a game where it only changes variables to 0 at the start of the game, so then all those numbers can be saved as long as you don't restart the 'new game' broadcast or whatever.

But that doesn't do what I want. I want a save data file, not variables saved to ram. The only way this is possible now is to manually click the save button in scratch.  You could also import lists but that would be a hassle.

Last edited by archmage (2009-06-19 17:48:51)


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#9 2009-06-19 20:00:11

FoxDur
Scratcher
Registered: 2008-07-07
Posts: 87

Re: Blocks

archmage wrote:

norberts wrote:

You could make a game where it only changes variables to 0 at the start of the game, so then all those numbers can be saved as long as you don't restart the 'new game' broadcast or whatever.

But that doesn't do what I want. I want a save data file, not variables saved to ram. The only way this is possible now is to manually click the save button in scratch.  You could also import lists but that would be a hassle.

It would be SO helpful if scratch did have that save block! Maybe something with cookies...


Do you want an icon? Check out here. Bored? Do you want to animate something? Look here.

Offline

 

#10 2009-06-20 10:31:34

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

Re: Blocks

FoxDur wrote:

archmage wrote:

norberts wrote:

You could make a game where it only changes variables to 0 at the start of the game, so then all those numbers can be saved as long as you don't restart the 'new game' broadcast or whatever.

But that doesn't do what I want. I want a save data file, not variables saved to ram. The only way this is possible now is to manually click the save button in scratch.  You could also import lists but that would be a hassle.

It would be SO helpful if scratch did have that save block! Maybe something with cookies...

But you can't really do that in Scratch itself...

Offline

 

#11 2009-06-20 10:59:00

FoxDur
Scratcher
Registered: 2008-07-07
Posts: 87

Re: Blocks

coolstuff wrote:

FoxDur wrote:

archmage wrote:


But that doesn't do what I want. I want a save data file, not variables saved to ram. The only way this is possible now is to manually click the save button in scratch.  You could also import lists but that would be a hassle.

It would be SO helpful if scratch did have that save block! Maybe something with cookies...

But you can't really do that in Scratch itself...

Yeah, unfortunately


Do you want an icon? Check out here. Bored? Do you want to animate something? Look here.

Offline

 

#12 2009-06-20 11:01:32

FoxDur
Scratcher
Registered: 2008-07-07
Posts: 87

Re: Blocks

coolstuff wrote:

FoxDur wrote:

archmage wrote:

But that doesn't do what I want. I want a save data file, not variables saved to ram. The only way this is possible now is to manually click the save button in scratch.  You could also import lists but that would be a hassle.

It would be SO helpful if scratch did have that save block! Maybe something with cookies...

But you can't really do that in Scratch itself...

lol, nice signature. "Scratch is like pie... awesome"


Do you want an icon? Check out here. Bored? Do you want to animate something? Look here.

Offline

 

#13 2009-06-20 11:20:25

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

Re: Blocks

Yeah.

Offline

 

Board footer