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

#1 2011-06-30 00:01:20

CI11932
Scratcher
Registered: 2011-06-04
Posts: 9

stop script blocks.

An issue I have is when I have many different <when I receive[ blocks or many <key[  ]pressed?> blocks. They are forced to run their entire script before finishing. What this does to me is make my sprites movement less smooth, for example I have a sprite that runs in 4 directions and has 8 costumes for each direction so what happens if im trying to quickly move in multiple directions is that my sprite ends up looking like its running backwards because the script is still playing for the costume change in one direction when i have already changed to a different direction. A related issue is when I want a sprite to switch to an attack costume when a button is pressed because the movement script is still running you are able to move the sprite when its not supposed to. So my suggestion to fix this is to make a way to stop or pause script from a different script. It could be like <when[  ]key pressed> pause/stop "insert script here" until done. That solution would probably also mean that you would have to be able to name scripts, but i think it's worth it. I hope you could follow what I was trying to explain, anyways I know there are some ways around my complaint, but they are tedious and are less efficient than this would be.

Offline

 

#2 2011-06-30 01:12:01

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: stop script blocks.

Uh have you seen the [stop script] block? :S

Last edited by Jonathanpb (2011-06-30 01:12:10)


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

#3 2011-06-30 01:14:41

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: stop script blocks.

Um, there is a http://wiki.scratch.mit.edu/images/Stop_Script.png block already.  hmm
EDIT: Outposted because of a lazy internet connection.  hmm

Last edited by scimonster (2011-06-30 01:15:52)

Offline

 

#4 2011-06-30 10:20:18

Kaj_Aliv
Scratcher
Registered: 2011-06-22
Posts: 100+

Re: stop script blocks.

I think he means a "pause script". Stop Script make the script it's in stop; it doesn't make other scripts stop. I support this suggestion. Maybe scripts could be numbered, so that you could say "stop script #(number)". Because even brodcasting doesn't work. Maybe you could do it with variables, but I think that a seperate block would be nice.


Get out. There's no need for that. ~Kaj Aliv

Offline

 

#5 2011-06-30 11:11:55

SpriteMaster
Scratcher
Registered: 2009-01-25
Posts: 1000+

Re: stop script blocks.

They said this was already under construction in Scratch 2.0  tongue


`                        Click here for my YouTube channel!                        `http://i.imgur.com/4Qz3I.jpg

Offline

 

#6 2011-06-30 13:15:31

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: stop script blocks.

Kaj_Aliv wrote:

I think he means a "pause script". Stop Script make the script it's in stop; it doesn't make other scripts stop. I support this suggestion. Maybe scripts could be numbered, so that you could say "stop script #(number)". Because even brodcasting doesn't work. Maybe you could do it with variables, but I think that a seperate block would be nice.

Broadcasting doesn't work, but variables do -- set a global variable and check for it in every important script.

Offline

 

#7 2011-06-30 17:00:36

CI11932
Scratcher
Registered: 2011-06-04
Posts: 9

Re: stop script blocks.

Kaj_Aliv wrote:

I think he means a "pause script". Stop Script make the script it's in stop; it doesn't make other scripts stop. I support this suggestion. Maybe scripts could be numbered, so that you could say "stop script #(number)". Because even brodcasting doesn't work. Maybe you could do it with variables, but I think that a seperate block would be nice.

Yes you understood exactly what im talking about. And like I said yeah you could probably find a way to do it like with variables, but if you could stop script externally it would be really nice.

Offline

 

#8 2011-07-02 15:20:57

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: stop script blocks.

CI11932 wrote:

Kaj_Aliv wrote:

I think he means a "pause script". Stop Script make the script it's in stop; it doesn't make other scripts stop. I support this suggestion. Maybe scripts could be numbered, so that you could say "stop script #(number)". Because even brodcasting doesn't work. Maybe you could do it with variables, but I think that a seperate block would be nice.

Yes you understood exactly what im talking about. And like I said yeah you could probably find a way to do it like with variables, but if you could stop script externally it would be really nice.

Oh, pause. I support!

Offline

 

Board footer