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

#1 2012-10-20 04:29:45

Chokkan
New Scratcher
Registered: 2011-08-01
Posts: 9

Do it at the same time BLOCK

When we want our sprites to do certain thing at the same time, we have to make another script. So what about a "Do it at the same time" block, what would looks like the If-else block with two sections in it?

Offline

 

#2 2012-10-20 04:34:26

jontmy00
Scratcher
Registered: 2011-11-28
Posts: 1000+

Re: Do it at the same time BLOCK

I don't quite understand why the block is needed. Blocks within the same sprites but in different scripts don't run simultaneously, either.

So do elaborate more.


FOR ALL THE NEWS ON UPDATES FOR SIMPLISTICRAFT, CLICK HERE.

Offline

 

#3 2012-10-20 05:46:14

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

Re: Do it at the same time BLOCK

The ST got rid of it in the alpha, so I doubt they will bring it back


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

Offline

 

#4 2012-10-20 06:16:08

jontmy00
Scratcher
Registered: 2011-11-28
Posts: 1000+

Re: Do it at the same time BLOCK

Do you mean the "all at once" block?


FOR ALL THE NEWS ON UPDATES FOR SIMPLISTICRAFT, CLICK HERE.

Offline

 

#5 2012-10-20 06:36:22

Chokkan
New Scratcher
Registered: 2011-08-01
Posts: 9

Re: Do it at the same time BLOCK

I meant a block like this:
http://i48.tinypic.com/2ykkro8.png
Do you understand?

Offline

 

#6 2012-10-20 06:42:51

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

Re: Do it at the same time BLOCK

Chokkan wrote:

I meant a block like this:
http://i48.tinypic.com/2ykkro8.png
Do you understand?

no, it's more like this:
http://i50.tinypic.com/166jdi.png

Last edited by dvd4 (2012-10-20 06:43:01)


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

Offline

 

#7 2012-10-22 09:52:05

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

Re: Do it at the same time BLOCK

dvd4 wrote:

The ST got rid of it in the alpha, so I doubt they will bring it back

blog post wrote:

The current plan is to make “run without screen refresh” an option for custom blocks you create.

Offline

 

#8 2012-10-22 09:58:09

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

Re: Do it at the same time BLOCK

scimonster wrote:

dvd4 wrote:

The ST got rid of it in the alpha, so I doubt they will bring it back

blog post wrote:

The current plan is to make “run without screen refresh” an option for custom blocks you create.

I see.


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

Offline

 

#9 2012-10-22 13:06:25

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: Do it at the same time BLOCK

jontmy00 wrote:

I don't quite understand why the block is needed. Blocks within the same sprites but in different scripts don't run simultaneously, either.

So do elaborate more.

Different scripts do run simultaneously.
What he wants is a block to run two sets of blocks in the same script simultaneously without making extra scripts, like this:

http://i48.tinypic.com/2ykkro8.png
However, the example above is useless because you cant move ten steps whilst turning 15 degrees, the way scripts run together is by "interleaving" blocks unless a script is waiting. So if you had these scripts:

turn left (15) degrees 
wait (1) secs
move (10) steps
pen down
set [variable v] to (5)
set x to (4)
set pen color to [#FF0000]
go to x:(6) y:(12)
then scratch would check each script in turn. First it checks the first script, and turns 15 degrees. Then it checks the second script, and puts the pen down. Then it checks the third script and sets x to 4. Since there are no more scripts, it goes back to the first one. The next block is wait 1 secs, so it does that. Then it checks the second script and does the next block, which is to set the variable to 5. Then it checks the third script, and sets the pen colour to red. But it can't do the next block of the first script, because it still needs to wait 1 second. It cant do anything with the next script as that is finished. So it goes to the third script and puts the sprite at (6, 12) and that script is now finished. Script 1 can't go on until one second later, after which the sprite moves 10 steps.

At no point does it execute two blocks at the same time, it will only do two sequences of blocks at a time.

The removed "all at once" block would have kept scratch focused on that script alone and will not do anything with other scripts unless it hits wait () secs or wait until <>, or the end of the all at once block.

Last edited by joefarebrother (2012-10-22 13:08:58)


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#10 2012-10-22 14:18:38

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

Re: Do it at the same time BLOCK

If you want two (or more) scripts to run at the same time, just use messages:

when gf clicked
broadcast [RunMyScripts v]
These two scripts will then run at the same time:

when I receive [RunMyScripts v]
repeat (180)
  turn (1) degrees
end

when I receive [RunMyScripts v]
repeat (100)
  move (1) steps
end

Last edited by BoltBait (2012-10-22 14:19:32)


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

#11 2012-10-22 15:34:31

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

Re: Do it at the same time BLOCK

joefarebrother wrote:

jontmy00 wrote:

I don't quite understand why the block is needed. Blocks within the same sprites but in different scripts don't run simultaneously, either.

So do elaborate more.

Different scripts do run simultaneously.
What he wants is a block to run two sets of blocks in the same script simultaneously without making extra scripts, like this:

http://i48.tinypic.com/2ykkro8.png
However, the example above is useless because you cant move ten steps whilst turning 15 degrees, the way scripts run together is by "interleaving" blocks unless a script is waiting. So if you had these scripts:

turn left (15) degrees 
wait (1) secs
move (10) steps
pen down
set [variable v] to (5)
set x to (4)
set pen color to [#FF0000]
go to x:(6) y:(12)
then scratch would check each script in turn. First it checks the first script, and turns 15 degrees. Then it checks the second script, and puts the pen down. Then it checks the third script and sets x to 4. Since there are no more scripts, it goes back to the first one. The next block is wait 1 secs, so it does that. Then it checks the second script and does the next block, which is to set the variable to 5. Then it checks the third script, and sets the pen colour to red. But it can't do the next block of the first script, because it still needs to wait 1 second. It cant do anything with the next script as that is finished. So it goes to the third script and puts the sprite at (6, 12) and that script is now finished. Script 1 can't go on until one second later, after which the sprite moves 10 steps.

At no point does it execute two blocks at the same time, it will only do two sequences of blocks at a time.

The removed "all at once" block would have kept scratch focused on that script alone and will not do anything with other scripts unless it hits wait () secs or wait until <>, or the end of the all at once block.

Atomic speed and turbo speed are different things.


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

Offline

 

#12 2012-10-22 16:20:34

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: Do it at the same time BLOCK

dvd4 wrote:

joefarebrother wrote:

jontmy00 wrote:

I don't quite understand why the block is needed. Blocks within the same sprites but in different scripts don't run simultaneously, either.

So do elaborate more.

Different scripts do run simultaneously.
What he wants is a block to run two sets of blocks in the same script simultaneously without making extra scripts, like this:

http://i48.tinypic.com/2ykkro8.png
However, the example above is useless because you cant move ten steps whilst turning 15 degrees, the way scripts run together is by "interleaving" blocks unless a script is waiting. So if you had these scripts:

turn left (15) degrees 
wait (1) secs
move (10) steps
pen down
set [variable v] to (5)
set x to (4)
set pen color to [#FF0000]
go to x:(6) y:(12)
then scratch would check each script in turn. First it checks the first script, and turns 15 degrees. Then it checks the second script, and puts the pen down. Then it checks the third script and sets x to 4. Since there are no more scripts, it goes back to the first one. The next block is wait 1 secs, so it does that. Then it checks the second script and does the next block, which is to set the variable to 5. Then it checks the third script, and sets the pen colour to red. But it can't do the next block of the first script, because it still needs to wait 1 second. It cant do anything with the next script as that is finished. So it goes to the third script and puts the sprite at (6, 12) and that script is now finished. Script 1 can't go on until one second later, after which the sprite moves 10 steps.

At no point does it execute two blocks at the same time, it will only do two sequences of blocks at a time.

The removed "all at once" block would have kept scratch focused on that script alone and will not do anything with other scripts unless it hits wait () secs or wait until <>, or the end of the all at once block.

Atomic speed and turbo speed are different things.

I know. When did I say otherwise?
The removed "all at once" block was for atomic speed, now procedures have the option of being atomic. I didn't mention anything about turbo speed in the above post.


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#13 2012-10-22 16:30:29

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

Re: Do it at the same time BLOCK

joefarebrother wrote:

dvd4 wrote:

joefarebrother wrote:


Different scripts do run simultaneously.
What he wants is a block to run two sets of blocks in the same script simultaneously without making extra scripts, like this:

http://i48.tinypic.com/2ykkro8.png
However, the example above is useless because you cant move ten steps whilst turning 15 degrees, the way scripts run together is by "interleaving" blocks unless a script is waiting. So if you had these scripts:

turn left (15) degrees 
wait (1) secs
move (10) steps
pen down
set [variable v] to (5)
set x to (4)
set pen color to [#FF0000]
go to x:(6) y:(12)
then scratch would check each script in turn. First it checks the first script, and turns 15 degrees. Then it checks the second script, and puts the pen down. Then it checks the third script and sets x to 4. Since there are no more scripts, it goes back to the first one. The next block is wait 1 secs, so it does that. Then it checks the second script and does the next block, which is to set the variable to 5. Then it checks the third script, and sets the pen colour to red. But it can't do the next block of the first script, because it still needs to wait 1 second. It cant do anything with the next script as that is finished. So it goes to the third script and puts the sprite at (6, 12) and that script is now finished. Script 1 can't go on until one second later, after which the sprite moves 10 steps.

At no point does it execute two blocks at the same time, it will only do two sequences of blocks at a time.

The removed "all at once" block would have kept scratch focused on that script alone and will not do anything with other scripts unless it hits wait () secs or wait until <>, or the end of the all at once block.

Atomic speed and turbo speed are different things.

I know. When did I say otherwise?
The removed "all at once" block was for atomic speed, now procedures have the option of being atomic. I didn't mention anything about turbo speed in the above post.

you didn't ?


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

Offline

 

#14 2012-10-22 16:31:51

joefarebrother
Scratcher
Registered: 2011-04-08
Posts: 1000+

Re: Do it at the same time BLOCK

dvd4 wrote:

joefarebrother wrote:

dvd4 wrote:


Atomic speed and turbo speed are different things.

I know. When did I say otherwise?
The removed "all at once" block was for atomic speed, now procedures have the option of being atomic. I didn't mention anything about turbo speed in the above post.

you didn't ?

No.


My latest project is called http://tinyurl.com/d2m8hne! It has http://tinyurl.com/d395ygk views, http://tinyurl.com/cnasmt7 love-its, and http://tinyurl.com/bwjy8xs comments.
http://tinyurl.com/756anbk   http://tinyurl.com/iplaychess

Offline

 

#15 2012-10-22 16:34:57

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

Re: Do it at the same time BLOCK

joefarebrother wrote:

dvd4 wrote:

joefarebrother wrote:


I know. When did I say otherwise?
The removed "all at once" block was for atomic speed, now procedures have the option of being atomic. I didn't mention anything about turbo speed in the above post.

you didn't ?

No.

I'm pretty sure it wasn't Atomic.


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

Offline

 

#16 2012-10-22 18:58:35

Firedrake969
Scratcher
Registered: 2011-11-24
Posts: 1000+

Re: Do it at the same time BLOCK

joefarebrother wrote:

stuff
I know. When did I say otherwise?
The removed "all at once" block was for atomic speed, now procedures have the option of being atomic. I didn't mention anything about turbo speed in the above post.

How do you know?  I can't find that feature.


Click the sign.
https://s3.amazonaws.com/eterna/eterna2/logo2.png

Offline

 

#17 2012-10-22 19:01:04

Wes64
Scratcher
Registered: 2011-08-19
Posts: 1000+

Re: Do it at the same time BLOCK

Firedrake969 wrote:

joefarebrother wrote:

stuff
I know. When did I say otherwise?
The removed "all at once" block was for atomic speed, now procedures have the option of being atomic. I didn't mention anything about turbo speed in the above post.

How do you know?  I can't find that feature.

http://wiki.scratch.mit.edu/wiki/All_at_Once_(block)


Experienced 2.0 Tester: Ask me questions!
Using Firefox 13.0, Flash plugin version 11.4.402.287, and Windows XP Professional.

Offline

 

#18 2012-10-22 19:54:25

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

Re: Do it at the same time BLOCK

Wes64 wrote:

Firedrake969 wrote:

joefarebrother wrote:

stuff
I know. When did I say otherwise?
The removed "all at once" block was for atomic speed, now procedures have the option of being atomic. I didn't mention anything about turbo speed in the above post.

How do you know?  I can't find that feature.

http://wiki.scratch.mit.edu/wiki/All_at_Once_(block)

wiki knows all  smile


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

Offline

 

#19 2012-10-22 21:35:48

Mokat
Scratcher
Registered: 2011-12-08
Posts: 1000+

Re: Do it at the same time BLOCK

Instead of this, you can have several scripts going at the same time:

when gf clicked
set pen color to [#FACE12]
And this:
when gf clicked 
glide (3) secs to x: (38) y: (-3)


http://www.eggcave.com/egg/977371.pnghttp://www.eggcave.com/egg/977376.pnghttp://www.eggcave.com/egg/1005291.pnghttp://www.eggcave.com/egg/996745.png

Offline

 

Board footer