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

#3226 2012-11-18 20:01:01

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Unless he meant "glide those many steps X and those many steps Y", which would need an even uglier script.

Last edited by Hardmath123 (2012-11-18 20:01:15)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#3227 2012-11-18 21:37:41

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: ITopic: Welcome to your local block library!

Hardmath123 wrote:

Unless he meant "glide those many steps X and those many steps Y", which would need an even uglier script.

Nah, it's not too bad:

glide (([sqrt v] of (((x) * (x)) + ((y) * (y)))) / (speed)) secs to x: ((x position) + (x)) y: ((y position) + (y))
…unless you meant this:

glide (([abs v] of ((x position) - (x))) / (speed)) secs to x: (x) y: (y position)
glide (([abs v] of ((y position) - (y))) / (speed)) secs to x: (x position) y: (y)
…or this:

glide (([abs v] of ((y position) - (y))) / (speed)) secs to x: (x position) y: (y)
glide (([abs v] of ((x position) - (x))) / (speed)) secs to x: (x) y: (y position)

Last edited by nXIII (2012-11-18 21:37:59)


nXIII

Offline

 

#3228 2012-11-20 12:03:11

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: ITopic: Welcome to your local block library!

I'm pretty bored, so i'm going to write an auto-block downloader for Panther. What's the last Panther block in the libary (the one with the highest download number)


I'm back.
Maybe.

Offline

 

#3229 2012-11-20 12:32:36

mythbusteranimator
Scratcher
Registered: 2012-02-28
Posts: 1000+

Re: ITopic: Welcome to your local block library!

sounds fun


http://www.foxtrot.com/comics/2012-04-01-fdb37077.gif
clicky

Offline

 

#3230 2012-11-20 15:04:27

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: ITopic: Welcome to your local block library!

mythbusteranimator wrote:

sounds fun

I just finished it.
I'm not uploading it though >:3 you'll have to do it yourself EHEHEH


I'm back.
Maybe.

Offline

 

#3231 2012-11-20 15:27:04

mythbusteranimator
Scratcher
Registered: 2012-02-28
Posts: 1000+

Re: ITopic: Welcome to your local block library!

DigiTechs wrote:

mythbusteranimator wrote:

sounds fun

I just finished it.
I'm not uploading it though >:3 you'll have to do it yourself EHEHEH

You write it in Squeak?


http://www.foxtrot.com/comics/2012-04-01-fdb37077.gif
clicky

Offline

 

#3232 2012-11-20 17:18:03

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: ITopic: Welcome to your local block library!

mythbusteranimator wrote:

DigiTechs wrote:

mythbusteranimator wrote:

sounds fun

I just finished it.
I'm not uploading it though >:3 you'll have to do it yourself EHEHEH

You write it in Squeak?

Maaaaabye.. Yeah I did. The block name is "Download all blocks in the Block Libary"


I'm back.
Maybe.

Offline

 

#3233 2012-11-20 18:12:35

mythbusteranimator
Scratcher
Registered: 2012-02-28
Posts: 1000+

Re: ITopic: Welcome to your local block library!

DigiTechs wrote:

mythbusteranimator wrote:

DigiTechs wrote:


I just finished it.
I'm not uploading it though >:3 you'll have to do it yourself EHEHEH

You write it in Squeak?

Maaaaabye.. Yeah I did. The block name is "Download all blocks in the Block Libary"

It's a block?


http://www.foxtrot.com/comics/2012-04-01-fdb37077.gif
clicky

Offline

 

#3234 2012-11-21 05:45:17

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: ITopic: Welcome to your local block library!

mythbusteranimator wrote:

DigiTechs wrote:

mythbusteranimator wrote:


You write it in Squeak?

Maaaaabye.. Yeah I did. The block name is "Download all blocks in the Block Libary"

It's a block?

Yeah.
It's a pretty funny block.


I'm back.
Maybe.

Offline

 

#3235 2012-11-22 10:16:13

spud2451
Scratcher
Registered: 2010-05-01
Posts: 100+

Re: ITopic: Welcome to your local block library!

i have a block to submit. its a make 3D block.

the code is

blockspec:

Code:

('make 3D  %n times' #- #mk3d:)

code:

Code:

mk3d: i1 
| t1 |

i1 timesRepeat: [
self gotoX: self xpos y: (2+ self ypos).
self stampCostume.
].

http://www.xenopages.comze.com/upload/rippleos.gif

Offline

 

#3236 2012-11-24 02:07:48

danil-kondr
New Scratcher
Registered: 2012-07-05
Posts: 18

Re: ITopic: Welcome to your local block library!

die
http://www.weebly.com/uploads/5/4/1/3/5413503/288022878.gif

Offline

 

#3237 2012-11-24 08:08:23

dvd4
Scratcher
Registered: 2010-06-30
Posts: 1000+

Re: ITopic: Welcome to your local block library!

danil-kondr wrote:

die
http://www.weebly.com/uploads/5/4/1/3/5413503/288022878.gif

Seriously ? -_-


I made a mod  big_smile  It's called blook!
http://i49.tinypic.com/16ia63p.png

Offline

 

#3238 2012-11-24 08:57:22

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: ITopic: Welcome to your local block library!

danil-kondr wrote:

die
http://www.weebly.com/uploads/5/4/1/3/5413503/288022878.gif

try ('die' #- #die)

code

Code:

die
Smalltalk snapshot: false andQuit: true

Offline

 

#3239 2012-11-24 12:41:20

elfin8er
Scratcher
Registered: 2012-01-15
Posts: 1000+

Re: ITopic: Welcome to your local block library!

danwoodski wrote:

elfin8er wrote:

Would it be possible to do Import Panther Project From File block, or Import Panther Project From Web block?

I think that a block NXIII made does something similar to what you want.  It's somewhere on this thread...
EDIT: http://scratch.mit.edu/forums/viewtopic.php?pid=1046802#p1046802
The update from version block, near the bottom.  It checks a text file to see if a new version is available, then downloads the new file (also specified in the text file, I think) from the web, and replaces the original file with the new one.

lol, I know it's been a while, but how would I use that to import the project into the existing project, instead of over-writing it?


http://i1340.photobucket.com/albums/o723/stevetheipad/goldlittlesig.png

Offline

 

#3240 2012-11-25 16:39:20

pokechued
Scratcher
Registered: 2011-08-17
Posts: 48

Re: ITopic: Welcome to your local block library!

dvd4 wrote:

danil-kondr wrote:

die
http://www.weebly.com/uploads/5/4/1/3/5413503/288022878.gif

Seriously ? -_-

LOLXD  lol


http://mag.racked.eu/cimage/6959yxb/Keep+Scratchin%27%21%21%21/Be+a+boss+at+scratch/mca.png
http://mag.racked.eu/mcimage/i57/CLICK/HERE/mca.png

Offline

 

#3241 2012-11-26 10:39:40

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: ITopic: Welcome to your local block library!

e.e My school KILLS the [scratchblocks] - I NO LIEK REKTANGLE BOCKSES FOAH BLOKZ!*
*translation: I don't like square blocks


I'm back.
Maybe.

Offline

 

#3242 2012-11-26 22:42:06

mythbusteranimator
Scratcher
Registered: 2012-02-28
Posts: 1000+

Re: ITopic: Welcome to your local block library!

O_o


http://www.foxtrot.com/comics/2012-04-01-fdb37077.gif
clicky

Offline

 

#3243 2012-12-10 14:59:52

Spartan_Games
New Scratcher
Registered: 2011-08-10
Posts: 1

Re: ITopic: Welcome to your local block library!

Hi i have a request please?

There is a scratch block which is 'play from <> to <> of sound <>'

Block Spec: ('play from %n to %n secs of %S' #- #playFrom:to:ofSound:)

Code: lengthOfSound: t1
    | t2 |
    t2 _ self soundNamed: t1 ifAbsent: [^ 0].
    ^ t2 totalSeconds

Any chance this could become a downloadable BYOB block please?
also how would i know if this becomes avaliable? thanks!

Offline

 

#3244 2012-12-15 06:03:03

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: ITopic: Welcome to your local block library!

I have a block to submit, If you've used Lua you may understand it, if not, I'll provide a handy link to a page to explain what it means. Here it is!
Anyway here's the block! It's name is string.gsub and it's purpose is to find a substring in a string and if it matches the 2nd input then replace it with the third.
BLOCK LOOKS: HERE
CODE: HERE
BLOCK'S OUTPUT: HERE
BLOCK DOWNLOAD: HERE
EDIT: Oops. I did somthing wrong. Fixed!

Last edited by DigiTechs (2012-12-15 06:04:04)


I'm back.
Maybe.

Offline

 

#3245 2012-12-20 00:29:09

Interest
Scratcher
Registered: 2011-12-25
Posts: 43

Re: ITopic: Welcome to your local block library!

you can improve the factorial block:

Code:

factorial: t1
^ t1 factorial

Last edited by Interest (2013-01-21 23:36:32)

Offline

 

#3246 2012-12-22 05:17:59

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: ITopic: Welcome to your local block library!

I'm going to look for a way in Squeak to do somthing - if you change the value of a dropdown, it changes the number of arguments to the block. Any ideas?


I'm back.
Maybe.

Offline

 

#3247 2013-01-19 11:47:24

nickliboo
Scratcher
Registered: 2011-01-22
Posts: 20

Re: ITopic: Welcome to your local block library!

Request: Quit panther
For: Panther

quit panther

Offline

 

#3248 2013-01-19 12:56:17

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: ITopic: Welcome to your local block library!

nickliboo wrote:

Request: Quit panther
For: Panther

quit panther

That's easy:

Code:

Smalltalk snapshot: false andQuit: true

I'm back.
Maybe.

Offline

 

#3249 2013-01-19 13:40:58

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: ITopic: Welcome to your local block library!

DigiTechs wrote:

nickliboo wrote:

Request: Quit panther
For: Panther

quit panther

That's easy:

Code:

Smalltalk snapshot: false andQuit: true

Ah, yes, but that's force quit. Maybe you want to have it quit with a dialog prompting to save? Basically, giving the same effect as selecting Quit from the menu. In that case use

Code:

ScratchFrameMorph quitFromMenu

Offline

 

#3250 2013-01-19 13:43:58

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: ITopic: Welcome to your local block library!

dreamod wrote:

DigiTechs wrote:

nickliboo wrote:

Request: Quit panther
For: Panther

quit panther

That's easy:

Code:

Smalltalk snapshot: false andQuit: true

Ah, yes, but that's force quit. Maybe you want to have it quit with a dialog prompting to save? Basically, giving the same effect as selecting Quit from the menu. In that case use

Code:

ScratchFrameMorph quitFromMenu

Meh, the way it looked, it only looked like he/she wanted to force quit the Squeak VM.


I'm back.
Maybe.

Offline

 

Board footer