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

#1 2008-01-09 20:44:38

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

script numbers

You know what would be usefull? Having scripts have numbers in order when you make them and a script number block for example:   when i recive "stop this but not this"
                                                                 stop script no. 1

   Ive always wanted that block.


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#2 2008-01-10 13:54:44

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: script numbers

Being able to stop specific scripts is the first good argument I've seen for having humbers or labels for scripts.

There are currently 3 stop commands:
    stop all scripts
    stop this script
    stop all sounds

People have asked for "stop all scripts in this sprite" before, but this is the first request I've seen for stopping a specific script.

The numbers or labels would have to be an integral part of the script, since scripts are often rearranged on the screen (for example, by the "cleanup" button).

Offline

 

#3 2008-01-10 20:25:13

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: script numbers

i didnt know there was stop all sounds. oh must be new downloadeble one. well yeah i hope we get this block


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#4 2008-02-26 20:13:27

FPSFelix
Scratcher
Registered: 2008-02-06
Posts: 100+

Re: script numbers

yeah, that is something that would be good.
also a subroutine call wouldnt be bad.


this is what i brought you, this you can keep.
this is what i brought, you may forget me.
i promise to depart, just promise one thing...
kiss my eyes and lay me to sleep.

Offline

 

#5 2008-02-26 20:50:37

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: script numbers

subroutine call? you mean every like minute it would see if a script is working?


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#6 2008-02-26 20:54:12

FPSFelix
Scratcher
Registered: 2008-02-06
Posts: 100+

Re: script numbers

no, a block that says:
if i get triggered, then do:

this (in other area, or other sprite)

you could have it so that multiple soldiers die from the same things.


this is what i brought you, this you can keep.
this is what i brought, you may forget me.
i promise to depart, just promise one thing...
kiss my eyes and lay me to sleep.

Offline

 

#7 2008-02-26 22:02:55

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: script numbers

when im triggered? you mean like the flag clicked type of blocks? the curvy ones


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#8 2008-02-26 23:00:56

FPSFelix
Scratcher
Registered: 2008-02-06
Posts: 100+

Re: script numbers

no, like you put something in a special block that can be triggered by more than one thing


this is what i brought you, this you can keep.
this is what i brought, you may forget me.
i promise to depart, just promise one thing...
kiss my eyes and lay me to sleep.

Offline

 

#9 2008-02-27 00:14:09

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: script numbers

i really dont get it.


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#10 2008-02-27 19:39:40

FPSFelix
Scratcher
Registered: 2008-02-06
Posts: 100+

Re: script numbers

what grade are you in!
its really simple.

you put something in a block that is like a forever, or an if, but it gets triggered by something outside of that particular script.
it would look like this:

when green flag pressed
-forever:
--if: space pressed:
---activate: subroutine 1
-------------------------------



subroutine 1:
-play sound: duhh......
-------------------------------


this is what i brought you, this you can keep.
this is what i brought, you may forget me.
i promise to depart, just promise one thing...
kiss my eyes and lay me to sleep.

Offline

 

#11 2008-02-27 19:51:45

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: script numbers

well cant you do that with broadcasts



           <when[space  ]key pressed>
           <broadcast[ subroutine 1



            <when I receive[ subroutine1
            <play sound[ dance!




  Jeez what grade are you in? lololololololol


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#12 2008-02-27 19:57:09

FPSFelix
Scratcher
Registered: 2008-02-06
Posts: 100+

Re: script numbers

yeah, but it lags a lot.
and subroutines are for more than that.
i just gave a less complicated explanation.
at the end of a subroutine, it goes back to the script.
if you simply broadcast"done" then all things listening will do that.
if its a sub. then only triggered stuff will continue.


this is what i brought you, this you can keep.
this is what i brought, you may forget me.
i promise to depart, just promise one thing...
kiss my eyes and lay me to sleep.

Offline

 

#13 2008-02-27 20:47:41

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: script numbers

its called:broadcast and wait


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#14 2008-02-27 22:07:21

FPSFelix
Scratcher
Registered: 2008-02-06
Posts: 100+

Re: script numbers

you really dont get it do you?


this is what i brought you, this you can keep.
this is what i brought, you may forget me.
i promise to depart, just promise one thing...
kiss my eyes and lay me to sleep.

Offline

 

#15 2008-02-27 22:55:44

Heybrian
Scratcher
Registered: 2007-12-05
Posts: 100+

Re: script numbers

your mom doesn't get it.


Black Mesa. go here to get a game 10 times better than SN or FW.  http://scratch.mit.edu/galleries/view/10650
Smiley! copy and paste these into your post or signature!  smile   sad    yikes                 big_smile     wink    tongue    hmm    neutral   cool   lol   mad   roll

Offline

 

#16 2008-02-28 01:22:59

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: script numbers

FPSFelix and Heybrian, please cool it! There's no reason to insult each other just because you feel the other one doesn't get the point of what you're trying to explain. I've been following this discussion with great interest, because you both have done a wonderful job of asking the right questions and suggesting possible solutions! It is fantastic and inspiring to watch both of you exploring programming techniques and language-design issues.

FPSFelix is right to point out that function calls are currently not a feature of Scratch, and Heybrian is right to point out, that you can accomplish the same results by using broadcast commands and variables. Both of these observations are insightful and show, that you are thinking about the language design of Scratch itself! Isn't it just great how Scratch provokes and promotes these kinds of discussions?


Jens Mönig

Offline

 

#17 2008-03-01 16:46:31

andresmh
Scratch Team at MIT
Registered: 2007-03-05
Posts: 1000+

Re: script numbers

Thank you Jens.


Andres Monroy-Hernandez | Scratch Team at the MIT Media Lab
on identi.ca and  twitter

Offline

 

#18 2008-03-02 16:05:59

richiepoo
Scratcher
Registered: 2007-12-20
Posts: 31

Re: script numbers

There should be a resume script block to go with the stop block
and a stop and resume for the script numbering thingymabob

[blocks]               [<say[ shut up ]for(9999999  )secs> [/blocks]

Offline

 

#19 2008-03-02 18:56:14

heybrian1
Scratcher
Registered: 2008-03-02
Posts: 100+

Re: script numbers

lol


I am Heybrian. Yes, the "Ask me anything, for i am a pro scratcher" Thread IS mine.

Offline

 

Board footer