Discuss Scratch
- Discussion Forums
- » Suggestions
- » An edit to the "Forever" block
- Botcho_Otkho
-
Scratcher
1000+ posts
An edit to the "Forever" block
At snap.berkely.edu you can useBut I'm talking about Scratch,not Snap or BYOB.run {forever(It's a stack block on Snap, but I'm just bad at scratchblocks
end} :: stack control)
- awsome_guy_360
-
Scratcher
1000+ posts
An edit to the "Forever" block
I suppose the stacking function in this case only applies to the “forever” blocks, correct?Yep.
Mkay, I guess I support then…
Reduces the amount of scripts we need to use, shows extremely New Scratchers that the Forever loop doesn't need to be the end of a project, ideal for many genres, such as animation and games, and something I wish I had suggested.
I support!
- TheMonsterOfTheDeep
-
Scratcher
1000+ posts
An edit to the "Forever" block
Note that:
The disadvantage to the suggested form is that it is not particularly clear or explicit. It would also uniquely be the only block in Scratch (with the possible exception of broadcasts) that begins a new thread inside the same script.
when gf clickedis equivalent to:
forever {
first thing :: grey
} :: control
forever {
second thing :: grey
} :: control
when gf clicked
forever
first thing :: grey
end
when gf clicked
forever
second thing :: grey
end
The disadvantage to the suggested form is that it is not particularly clear or explicit. It would also uniquely be the only block in Scratch (with the possible exception of broadcasts) that begins a new thread inside the same script.
- LuckyLucky7
-
Scratcher
1000+ posts
An edit to the "Forever" block
I've already posted in this topic, and I support because it would occupy less space.
- YubNubEwok
-
Scratcher
1000+ posts
An edit to the "Forever" block
Semi-support.
I see your thinking of how this could be useful by not confusing new Scratchers.
Isn't it easy enough to just put everything in one forever loop?
I see your thinking of how this could be useful by not confusing new Scratchers.
Isn't it easy enough to just put everything in one forever loop?
- -ShadowOfTheFuture-
-
Scratcher
1000+ posts
An edit to the "Forever" block
I still don't see anything wrong with just using messages. It takes up more space, true, but it's pretty simple.
I'll go with semi-support since I can still see how this suggestion might be useful.
I'll go with semi-support since I can still see how this suggestion might be useful.
- FuturePr0
-
Scratcher
100+ posts
An edit to the "Forever" block
No support. Because then the scripts under the forever block would Be cancelled. You know how the repeat block repeats its thing before going on to the next thing? Well the forever block is like that only it does it forever, so the scripts underneath wouldn't work. I learnt this from a book about scratch.
I'm sorry if I offended anyone. I wasn't trying to be offensive.
I'm sorry if I offended anyone. I wasn't trying to be offensive.
- RPP-Exploration
-
Scratcher
1000+ posts
An edit to the "Forever" block
I’m not so sure - Scratch runs blocks after each other so that the timing stays how you want it. No support
- Botcho_Otkho
-
Scratcher
1000+ posts
An edit to the "Forever" block
No support. Because then the scripts under the forever block would Be cancelled. You know how the repeat block repeats its thing before going on to the next thing? Well the forever block is like that only it does it forever, so the scripts underneath wouldn't work. I learnt this from a book about scratch.Basically this block executes the “forever” loop and without waiting jumps to the next script,while the forever loop keeps goin'.
I'm sorry if I offended anyone. I wasn't trying to be offensive.
- Botcho_Otkho
-
Scratcher
1000+ posts
An edit to the "Forever" block
Note that:Hmm… I see your point.when gf clickedis equivalent to:
forever {
first thing :: grey
} :: control
forever {
second thing :: grey
} :: controlwhen gf clicked
forever
first thing :: grey
end
when gf clicked
forever
second thing :: grey
end
The disadvantage to the suggested form is that it is not particularly clear or explicit. It would also uniquely be the only block in Scratch (with the possible exception of broadcasts) that begins a new thread inside the same script.
- DeleteThisAcount
-
Scratcher
1000+ posts
An edit to the "Forever" block
i populatatate this idea
i think they daond g sg because fwe luhr.
i think they daond g sg because fwe luhr.
- Botcho_Otkho
-
Scratcher
1000+ posts
An edit to the "Forever" block
i populatatate this idea???
i think they daond g sg because fwe luhr.
- Botcho_Otkho
-
Scratcher
1000+ posts
An edit to the "Forever" block
<snip>The example I wrote first is pretty clear,but here is the reason:
Isn't it easy enough to just put everything in one forever loop?
Imagine there are things that the sprite needs to do separately but at the same moment,for example,playing music,talking and rotate. With everything in the same loop,the events occour in order one before the other.
For example,if I do this:
when green flag clickedIt says “Hey!”,then rotates and then plays the soundtrack,while my block is mainly used to occupy less space and in the same time to do more things at once instead of using a lot of “green flag clicked” and then “forever”. Also,with that block,when the soundtrack starts,the other two scripts occour only when the soundtrack is over,when instead the actions should occour WHILE the soundtrack is playing. Hope I was clear.
forever
say [Hey!] for (2) secs
turn cw (15) degrees
play sound [soundtrack v] until done
end
Last edited by Botcho_Otkho (March 2, 2018 11:55:50)
- YubNubEwok
-
Scratcher
1000+ posts
An edit to the "Forever" block
i populatatate this ideaWhat? I can't understand you!
i think they daond g sg because fwe luhr.
- YubNubEwok
-
Scratcher
1000+ posts
An edit to the "Forever" block
Hmm, that makes sense, but I still don't see a problem with using broadcasts and green flag clicks beside lag. But I thought that was when you have a LOT of those.<snip>The example I wrote first is pretty clear,but here is the reason:
Isn't it easy enough to just put everything in one forever loop?
Imagine there are things that the sprite needs to do separately but at the same moment,for example,playing music,talking and rotate. With everything in the same loop,the events occour in order one before the other.
For example,if I do this:when green flag clickedIt says “Hey!”,then rotates and then plays the soundtrack,while my block is mainly used to occupy less space and in the same time to do more things at once instead of using a lot of “green flag clicked” and then “forever”. Also,with that block,when the soundtrack starts,the other two scripts occour only when the soundtrack is over,when instead the actions should occour WHILE the soundtrack is playing. Hope I was clear.
forever
say [Hey!] for (2) secs
turn cw (15) degrees
play sound [soundtrack v] until done
end
- Botcho_Otkho
-
Scratcher
1000+ posts
An edit to the "Forever" block
It's to occupy less space too,as you can see on the main example in the first post of this topic,there's a big difference.Hmm, that makes sense, but I still don't see a problem with using broadcasts and green flag clicks beside lag. But I thought that was when you have a LOT of those.<snip>The example I wrote first is pretty clear,but here is the reason:
Isn't it easy enough to just put everything in one forever loop?
Imagine there are things that the sprite needs to do separately but at the same moment,for example,playing music,talking and rotate. With everything in the same loop,the events occour in order one before the other.
For example,if I do this:when green flag clickedIt says “Hey!”,then rotates and then plays the soundtrack,while my block is mainly used to occupy less space and in the same time to do more things at once instead of using a lot of “green flag clicked” and then “forever”. Also,with that block,when the soundtrack starts,the other two scripts occour only when the soundtrack is over,when instead the actions should occour WHILE the soundtrack is playing. Hope I was clear.
forever
say [Hey!] for (2) secs
turn cw (15) degrees
play sound [soundtrack v] until done
end
Last edited by Botcho_Otkho (March 2, 2018 18:49:32)
- stickfiregames
-
Scratcher
1000+ posts
An edit to the "Forever" block
No support because jumping to the next block before the current one has finished is nonstandard behaviour, and attaching that functionality to the forever block might be confusing.
Instead I support having a block that explicitly starts a new thread, like Snap!'s run block. There's also a suggestion for adding this functionality as an option for custom blocks, I'm not going to look for it now but it's called something like “asynchronous/threaded custom blocks” if anyone else wants to look for it.
Instead I support having a block that explicitly starts a new thread, like Snap!'s run block. There's also a suggestion for adding this functionality as an option for custom blocks, I'm not going to look for it now but it's called something like “asynchronous/threaded custom blocks” if anyone else wants to look for it.
- -ShadowOfTheFuture-
-
Scratcher
1000+ posts
An edit to the "Forever" block
Once again,
I still don't see anything wrong with just using messages. It takes up more space, true, but it's pretty simple.
- FuturePr0
-
Scratcher
100+ posts
An edit to the "Forever" block
Hmmm, I don't see much use for that.No support. Because then the scripts under the forever block would Be cancelled. You know how the repeat block repeats its thing before going on to the next thing? Well the forever block is like that only it does it forever, so the scripts underneath wouldn't work. I learnt this from a book about scratch.Basically this block executes the “forever” loop and without waiting jumps to the next script,while the forever loop keeps goin'.
I'm sorry if I offended anyone. I wasn't trying to be offensive.
- kenny2scratch
-
Scratcher
500+ posts
An edit to the "Forever" block
So you're saying the “forever” block kinda starts a new thread that loops the blocks inside it, then moves on to the next block? I'm not sure about that, it doesn't fit well with the logic. The point of the “forever” block is that it does the stuff inside it forever - it wouldn't make sense if it could move on. I think multiple when green flag clicked then forever stacks aren't a bad thing - this suggestion does effectively the same thing as that, but although it saves space it is a lot more confusing. Also, it actually doesn't save that much space - only maybe about a block's worth of space, nothing significant. I don't really support.
- Discussion Forums
- » Suggestions
-
» An edit to the "Forever" block
)