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

#1 2008-09-18 14:37:41

zawicki1fromyoutube
Scratcher
Registered: 2008-07-31
Posts: 1000+

Stop all until

I think there should be a stop all until: example block. So if you did like "If Space Pressed, Stop all, broadcast: paused" and then "When I recieve: paused, stop all until <space key pressed>


|Call Of Duty: Black Ops Wii Friend Code: 3519-4456-0013|
|Follow me on Twitter|Subscribe To My Youtube Channel

Offline

 

#2 2008-09-18 14:50:55

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

Re: Stop all until

I don't think this is nessary. Just use a variable.

//for example
var paused=0
forever if (paused==0){
//do stuff
}

If space pressed
if (pause==0)
set pause to 1
else
set pause to 0


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 2008-09-18 15:02:26

zawicki1fromyoutube
Scratcher
Registered: 2008-07-31
Posts: 1000+

Re: Stop all until

archmage wrote:

I don't think this is nessary. Just use a variable.

//for example
var paused=0
forever if (paused==0){
//do stuff
}

If space pressed
if (pause==0)
set pause to 1
else
set pause to 0

but that will take <forever>


|Call Of Duty: Black Ops Wii Friend Code: 3519-4456-0013|
|Follow me on Twitter|Subscribe To My Youtube Channel

Offline

 

#4 2008-09-18 15:04:01

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

Re: Stop all until

zawicki1fromyoutube wrote:

archmage wrote:

I don't think this is nessary. Just use a variable.

//for example
var paused=0
forever if (paused==0){
//do stuff
}

If space pressed
if (pause==0)
set pause to 1
else
set pause to 0

but that will take <forever>

Scratch already does lots of stuff for you that saves you time. Sometimes coding does take a long time but putting forever if blocks into your code shouldn't take that long.

Don't be lazy  tongue


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

 

#5 2008-09-18 15:08:22

zawicki1fromyoutube
Scratcher
Registered: 2008-07-31
Posts: 1000+

Re: Stop all until

archmage wrote:

zawicki1fromyoutube wrote:

archmage wrote:

I don't think this is nessary. Just use a variable.

//for example
var paused=0
forever if (paused==0){
//do stuff
}

If space pressed
if (pause==0)
set pause to 1
else
set pause to 0

but that will take <forever>

Scratch already does lots of stuff for you that saves you time. Sometimes coding does take a long time but putting forever if blocks into your code shouldn't take that long.

Don't be lazy  tongue

I will not be lazy  tongue


|Call Of Duty: Black Ops Wii Friend Code: 3519-4456-0013|
|Follow me on Twitter|Subscribe To My Youtube Channel

Offline

 

#6 2008-09-19 10:19:16

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Stop all until

zawicki1fromyoutube wrote:

archmage wrote:

zawicki1fromyoutube wrote:


but that will take <forever>

Scratch already does lots of stuff for you that saves you time. Sometimes coding does take a long time but putting forever if blocks into your code shouldn't take that long.

Don't be lazy  tongue

I will not be lazy  tongue

Cheak out my jet dog, it has a working pause  wink

Offline

 

#7 2008-09-19 10:41:24

zawicki1fromyoutube
Scratcher
Registered: 2008-07-31
Posts: 1000+

Re: Stop all until

yambanshee wrote:

zawicki1fromyoutube wrote:

archmage wrote:


Scratch already does lots of stuff for you that saves you time. Sometimes coding does take a long time but putting forever if blocks into your code shouldn't take that long.

Don't be lazy  tongue

I will not be lazy  tongue

Cheak out my jet dog, it has a working pause  wink

but it is super glitchy. like the fact I could only go up after i paused.


|Call Of Duty: Black Ops Wii Friend Code: 3519-4456-0013|
|Follow me on Twitter|Subscribe To My Youtube Channel

Offline

 

#8 2008-09-19 13:02:03

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

Re: Stop all until

Honestly, making a pause isn't hard. All you need to do is forever if (pause==0)

This block is not necessary. There are many more block that would be way more important to include.


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 2008-09-19 13:19:20

music_man
Scratcher
Registered: 2007-09-22
Posts: 100+

Re: Stop all until

One of my games has a pause feature in it.  For some reason it is not working to well online.  You will need to download it to work.  It used to work online.  Here is the link to my Ping Pong game.


The fool has said in his heart, "There is no God."...  Psalms 14:1

Offline

 

#10 2008-09-19 13:24:03

zawicki1fromyoutube
Scratcher
Registered: 2008-07-31
Posts: 1000+

Re: Stop all until

music_man wrote:

One of my games has a pause feature in it.  For some reason it is not working to well online.  You will need to download it to work.  It used to work online.  Here is the link to my Ping Pong game.

are you a christian? i just noticed you sig.


|Call Of Duty: Black Ops Wii Friend Code: 3519-4456-0013|
|Follow me on Twitter|Subscribe To My Youtube Channel

Offline

 

#11 2008-09-20 13:33:01

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Stop all until

zawicki1fromyoutube wrote:

yambanshee wrote:

zawicki1fromyoutube wrote:


I will not be lazy  tongue

Cheak out my jet dog, it has a working pause  wink

but it is super glitchy. like the fact I could only go up after i paused.

Jet dog is very glitchy online, id be suprised if you got past the menus, download it. But like arch mage said, all it is are forever if pause=0 blocks around the constant moving blocks

Offline

 

#12 2008-09-22 09:09:42

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Stop all until

likegames wrote:

yambanshee wrote:

zawicki1fromyoutube wrote:


but it is super glitchy. like the fact I could only go up after i paused.

Jet dog is very glitchy online, id be suprised if you got past the menus, download it. But like arch mage said, all it is are forever if pause=0 blocks around the constant moving blocks

no place for chatting., this is scratch..

technicly u broke the topic. anyways, zawicki, you got what you wanted? if you want i might be able to make it work for you?

Offline

 

#13 2008-09-23 09:41:11

zawicki1fromyoutube
Scratcher
Registered: 2008-07-31
Posts: 1000+

Re: Stop all until

yambanshee wrote:

likegames wrote:

yambanshee wrote:


Jet dog is very glitchy online, id be suprised if you got past the menus, download it. But like arch mage said, all it is are forever if pause=0 blocks around the constant moving blocks

no place for chatting., this is scratch..

technicly u broke the topic. anyways, zawicki, you got what you wanted? if you want i might be able to make it work for you?

i will just do it later...but yeah. this question is not off-topic, because I want to link it, then delete the post, can you tell me how to make a link to a project, and then make it so if you click it, you download it? i don't want to release it on the scratch website, so i will let you make it, yambashee, you do the same, you make it pause, and post it again in a new topic, when i reply on it, delete the topic, please.


|Call Of Duty: Black Ops Wii Friend Code: 3519-4456-0013|
|Follow me on Twitter|Subscribe To My Youtube Channel

Offline

 

#14 2008-09-23 13:32:04

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Stop all until

I guess i could. But first, what is the game about and about how many sprites does it have?

Offline

 

#15 2008-09-23 13:35:53

zawicki1fromyoutube
Scratcher
Registered: 2008-07-31
Posts: 1000+

Re: Stop all until

yambanshee wrote:

I guess i could. But first, what is the game about and about how many sprites does it have?

Well, for now i have notworked on the game. may i finish school work first? sorry  sad  for now just make a project, I will tell you when I downloaded it, and just make what you NEED in it. i will just export the stuff, and say that the pausing script is by you.


|Call Of Duty: Black Ops Wii Friend Code: 3519-4456-0013|
|Follow me on Twitter|Subscribe To My Youtube Channel

Offline

 

#16 2008-09-23 13:53:02

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

Re: Stop all until

Ok, why do you need to have to have such a lengthy discussion for a pause script? I gave an explanation in the first post I made here.

I'll give you the script here with the block pictures. Maybe this will be easier to understand.

<when green flag clicked>
<forever if><(  pause <=> 0 )>
//insert main codes
//Any script that you want to have paused MUST have the forever if pause= 0 code
<end>

<when[ space  ]key pressed>
<if> pause=0
set pause to 1
<else>
set pause to 0
<end>

Last edited by archmage (2008-09-23 13:53:45)


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

 

#17 2008-09-23 13:54:53

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Stop all until

archmage wrote:

Ok, why do you need to have to have such a lengthy discussion for a pause script? I gave an explanation in the first post I made here.

I'll give you the script here with the block pictures. Maybe this will be easier to understand.

<when green flag clicked>
<forever if><(  pause <=> 0 )>
//insert main codes
//Any script that you want to have paused MUST have the forever if pause= 0 code
<end>

<when[ space  ]key pressed>
<if> pause=0
set pause to 1
<else>
set pause to 0
<end>

I know... lol, but i got nothing better to do and im running out of ideas for good projects so y not help someone that helped me with amazing graphics

Offline

 

#18 2008-09-23 14:03:54

zawicki1fromyoutube
Scratcher
Registered: 2008-07-31
Posts: 1000+

Re: Stop all until

yambanshee wrote:

archmage wrote:

Ok, why do you need to have to have such a lengthy discussion for a pause script? I gave an explanation in the first post I made here.

I'll give you the script here with the block pictures. Maybe this will be easier to understand.

<when green flag clicked>
<forever if><(  pause <=> 0 )>
//insert main codes
//Any script that you want to have paused MUST have the forever if pause= 0 code
<end>

<when[ space  ]key pressed>
<if> pause=0
set pause to 1
<else>
set pause to 0
<end>

I know... lol, but i got nothing better to do and im running out of ideas for good projects so y not help someone that helped me with amazing graphics

thank you!  lol


|Call Of Duty: Black Ops Wii Friend Code: 3519-4456-0013|
|Follow me on Twitter|Subscribe To My Youtube Channel

Offline

 

#19 2008-09-23 14:07:18

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Stop all until

zawicki1fromyoutube wrote:

yambanshee wrote:

archmage wrote:

Ok, why do you need to have to have such a lengthy discussion for a pause script? I gave an explanation in the first post I made here.

I'll give you the script here with the block pictures. Maybe this will be easier to understand.

<when green flag clicked>
<forever if><(  pause <=> 0 )>
//insert main codes
//Any script that you want to have paused MUST have the forever if pause= 0 code
<end>

<when[ space  ]key pressed>
<if> pause=0
set pause to 1
<else>
set pause to 0
<end>

I know... lol, but i got nothing better to do and im running out of ideas for good projects so y not help someone that helped me with amazing graphics

thank you!  lol

Lol, np but i cant do it now, its 9pm

Offline

 

#20 2008-09-24 07:13:33

Nikimax
Scratcher
Registered: 2008-06-22
Posts: 36

Re: Stop all until

Forever block does not work in some cases!
Write:
forever is (pause = 0){
move (10)
wait (1) sec.
turn (10) degrees
wait (1) sec.
}
If pause setted to 1 but script is not completed (it takes 2 seconds) the script will continue working!


http://scratch.mit.edu/projects/Nikimax/291754
Test yourself=)

Offline

 

#21 2008-09-24 09:11:31

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

Re: Stop all until

Nikimax wrote:

Forever block does not work in some cases!
Write:
forever is (pause = 0){
move (10)
wait (1) sec.
turn (10) degrees
wait (1) sec.
}
If pause setted to 1 but script is not completed (it takes 2 seconds) the script will continue working!

You are right...

Just don't use waits  tongue


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

 

Board footer