Discuss Scratch
- Discussion Forums
- » Suggestions
- » New loop idea
- mica43683
-
500+ posts
New loop idea
My idea:
Another variation of this would be
It would repeat over and over for however many seconds.
How does it work:
"But, Mica, what if someone would put the
My idea for the ”repeat for () secs" block would be that it checks how many times the normal
The “repeat () in () secs” block would be that it divides (number of seconds) by (number of times it repeats), and runs the script once every (time it divided into). Say you put “repeat (10) in (1) secs”. It would divide 1 by 10 (leaving us with 0.1), meaning every 0.1 seconds, it runs the script, meaning the
What this would be useful for:
Off the top of my head, animation.
You want your animation to be a certain frame rate. 30 fps? 24? Solution:
You're making a small animation using the "say " block instead of voice acting, and you need some better timing so as to not clutter up your broadcast list. Solution:
Sprite1:
Supporters:
-Reshiram-
Nambaseking01
Semi-Supporters:
mitzii
venyanwarrior
EZ-Games
Additional Suggestions (regarding these blocks):
repeat () {This would repeat the task () times over the length of () seconds.
} in () secs :: loop control
Another variation of this would be
repeat {
} for () secs :: loop control
It would repeat over and over for however many seconds.
How does it work:
"But, Mica, what if someone would put the
wait () secsblock in there?“, I hear you asking!
My idea for the ”repeat for () secs" block would be that it checks how many times the normal
repeat ()block would run in the span of () seconds, and runs that many times. That way, the
end
wait () secsblock would still work.
The “repeat () in () secs” block would be that it divides (number of seconds) by (number of times it repeats), and runs the script once every (time it divided into). Say you put “repeat (10) in (1) secs”. It would divide 1 by 10 (leaving us with 0.1), meaning every 0.1 seconds, it runs the script, meaning the
wait () secsblock would still work.
What this would be useful for:
Off the top of my head, animation.
You want your animation to be a certain frame rate. 30 fps? 24? Solution:
repeat (24) {
next costume
} in (1) secs :: loop control
You're making a small animation using the "say " block instead of voice acting, and you need some better timing so as to not clutter up your broadcast list. Solution:
Sprite1:
when green flag clickedSprite2:
repeat {
turn ccw (10) degrees
} for (3) secs :: loop control
when green flag clicked
wait (3) secs
say [Wow! Nice backflip!] for (2) secs
Supporters:
-Reshiram-
Nambaseking01
Semi-Supporters:
mitzii
venyanwarrior
EZ-Games
Additional Suggestions (regarding these blocks):
There should be a limit to how low the waiting time should go. Say someone does this:repeat (1000) {
change [i v] by (1)
add (i) to [itineraryArray v]
} in (0.01) secs :: loop control
That would definitely crash the system.
Last edited by mica43683 (Oct. 26, 2019 18:12:42)
I got a lot of compliments on my last signature, and I think that's kind of strange. I wrote it when I was 12 and it wasn't very good. I acted like PS4 controllers were the epitome of human technology, for God's sake! I tried too hard to be philosophical, or maybe I tried too hard to be funny, or maybe it was something else. But that signature was bad. It wasn't good. It might be strange for some of you to hear this, seeing as this site is full of kids, but 12-year-old me was practically a baby. I think that's something you realise when you grow up. That you're always better than you were last year. I was looking through old Skype messages between me and a friend of mine from when we were 12, and as I read them, I couldn't stop thinking, “Woah. I was the worst.” It's important to know that you're always the worst. I can almost guarantee that future you is thinking negatively of you right now, just as future me is thinking negatively of me. It's important not to let that get to you. Remember to stay in the present. Tomorrow hates you, but it can't hurt you because you'll never get to tomorrow. When I was 10 or 11, I remember seeing the world very cynically. I thought that human life was inherently selfish, and that we were only put on this planet to destroy it. I'm so glad 10 or 11 year old me is gone, because 17 year old me would NOT get along with that kid.
- -Reshiram-
-
100+ posts
New loop idea
Support for both, they would be really useful.
Also, I made scratchblocks code for you to use in your post:
Also, I made scratchblocks code for you to use in your post:
repeat () {
} in () secs :: loop control
repeat {
} for () secs :: loop control
Last edited by -Reshiram- (Oct. 9, 2019 11:55:31)
I am now @SquirreIstar with an i, as in “I used to be -Reshiram-”
- WindOctahedron
-
1000+ posts
New loop idea
“repeat for () seconds” has a workaround:
set [limit v] to ((timer) + ()) // you have to put the number of seconds in the blank inputEdit: I was going to say that the workaround will make the page lag when “run without screen resfresh” is turned on, while the block you're suggesting won't, but I eventually decided that it will. You can read imfh's related post in this topic:
repeat until <(timer) > (limit)>
...
end
until it finishes running.Because your suggested block can make the program finish the execution in a longer time, it will make the page lag. A run without screen refresh block prevents the screen and everything else from refreshing
[…]
You should always make sure that Scratch will be able to finish running without screen refresh blocks quickly to prevent that [they meant the lag] from happening.
Last edited by WindOctahedron (Oct. 9, 2019 12:39:07)
The message above may contain wrong information, rude remarks, or something embarrassing to my current self. In this case, please ignore it and remember that I likely wrote it back when I didn't know what “respect” truly meant. I really hate thinking about it again.
- mica43683
-
500+ posts
New loop idea
Thanks! I made scratchblocks code for you to use in your post:repeat () {
} in () secs :: loop control
repeat {
} for () secs :: loop control
Last edited by mica43683 (Oct. 11, 2019 10:02:45)
I got a lot of compliments on my last signature, and I think that's kind of strange. I wrote it when I was 12 and it wasn't very good. I acted like PS4 controllers were the epitome of human technology, for God's sake! I tried too hard to be philosophical, or maybe I tried too hard to be funny, or maybe it was something else. But that signature was bad. It wasn't good. It might be strange for some of you to hear this, seeing as this site is full of kids, but 12-year-old me was practically a baby. I think that's something you realise when you grow up. That you're always better than you were last year. I was looking through old Skype messages between me and a friend of mine from when we were 12, and as I read them, I couldn't stop thinking, “Woah. I was the worst.” It's important to know that you're always the worst. I can almost guarantee that future you is thinking negatively of you right now, just as future me is thinking negatively of me. It's important not to let that get to you. Remember to stay in the present. Tomorrow hates you, but it can't hurt you because you'll never get to tomorrow. When I was 10 or 11, I remember seeing the world very cynically. I thought that human life was inherently selfish, and that we were only put on this planet to destroy it. I'm so glad 10 or 11 year old me is gone, because 17 year old me would NOT get along with that kid.
- mica43683
-
500+ posts
New loop idea
Bump
I got a lot of compliments on my last signature, and I think that's kind of strange. I wrote it when I was 12 and it wasn't very good. I acted like PS4 controllers were the epitome of human technology, for God's sake! I tried too hard to be philosophical, or maybe I tried too hard to be funny, or maybe it was something else. But that signature was bad. It wasn't good. It might be strange for some of you to hear this, seeing as this site is full of kids, but 12-year-old me was practically a baby. I think that's something you realise when you grow up. That you're always better than you were last year. I was looking through old Skype messages between me and a friend of mine from when we were 12, and as I read them, I couldn't stop thinking, “Woah. I was the worst.” It's important to know that you're always the worst. I can almost guarantee that future you is thinking negatively of you right now, just as future me is thinking negatively of me. It's important not to let that get to you. Remember to stay in the present. Tomorrow hates you, but it can't hurt you because you'll never get to tomorrow. When I was 10 or 11, I remember seeing the world very cynically. I thought that human life was inherently selfish, and that we were only put on this planet to destroy it. I'm so glad 10 or 11 year old me is gone, because 17 year old me would NOT get along with that kid.
- mica43683
-
500+ posts
New loop idea
The “repeat for () seconds” has a workaround:set [limit v] to ((timer) + ()) // you have to put the number of seconds in the blank inputEdit: I was going to say that the workaround will make the page lag when “run without screen resfresh” is turned on, while the block you're suggesting won't, but I eventually decided that it will. You can read imfh's related post in this topic:
repeat until <(timer) > (limit)>
...
enduntil it finishes running.Because your suggested block can make the program finish the execution in a longer time, it will make the page lag. A run without screen refresh block prevents the screen and everything else from refreshing
[…]
You should always make sure that Scratch will be able to finish running without screen refresh blocks quickly to prevent that [they meant the lag] from happening.
repeat ()block works the same.
end
I got a lot of compliments on my last signature, and I think that's kind of strange. I wrote it when I was 12 and it wasn't very good. I acted like PS4 controllers were the epitome of human technology, for God's sake! I tried too hard to be philosophical, or maybe I tried too hard to be funny, or maybe it was something else. But that signature was bad. It wasn't good. It might be strange for some of you to hear this, seeing as this site is full of kids, but 12-year-old me was practically a baby. I think that's something you realise when you grow up. That you're always better than you were last year. I was looking through old Skype messages between me and a friend of mine from when we were 12, and as I read them, I couldn't stop thinking, “Woah. I was the worst.” It's important to know that you're always the worst. I can almost guarantee that future you is thinking negatively of you right now, just as future me is thinking negatively of me. It's important not to let that get to you. Remember to stay in the present. Tomorrow hates you, but it can't hurt you because you'll never get to tomorrow. When I was 10 or 11, I remember seeing the world very cynically. I thought that human life was inherently selfish, and that we were only put on this planet to destroy it. I'm so glad 10 or 11 year old me is gone, because 17 year old me would NOT get along with that kid.
- mitzii
-
14 posts
New loop idea
“repeat for () seconds” has a workaround:set [limit v] to ((timer) + ()) // you have to put the number of seconds in the blank input-snip-
repeat until <(timer) > (limit)>
...
end
Semi-support. Support because a lot of programmers are too lazy to make a workaround script.
No support because you could just make the script above, or do this:
reset timer
repeat until <(timer) > []> // here you'd put how long the loop should run
...
end
I use this script often for animating ^^
Last edited by mitzii (Nov. 1, 2019 21:06:12)
this is my invisible siggie. good job on finding it.
now go to my profile and comment, “wahoo, waffles!” to get free art.
now go to my profile and comment, “wahoo, waffles!” to get free art.
- venyanwarrior
-
1000+ posts
New loop idea
Semi-Support. It does look like a worthwhile addition, however, this is a kids programming site, and I think it might be a little bit too complicated.
If you're seeing this signature, that means I've come out of my social anxiety hole.
Also, I edit the Scratch Wiki. Check it out sometime it's cool I guess.
- WindOctahedron
-
1000+ posts
New loop idea
The same as what?The -snip-repeat ()block works the same.
end
If you mean the workaround, then you're not entirely correct. If you want to use the simple “repeat” to repeat something for a fixed amount of time, you'll have to do some division by 1/30 (or multiplication by 30). Why not just enter the number of seconds you want to repeat the action for? You can do so in the workaround I suggested.
But yes, they are both loops and it is possible to program one using the other.
The message above may contain wrong information, rude remarks, or something embarrassing to my current self. In this case, please ignore it and remember that I likely wrote it back when I didn't know what “respect” truly meant. I really hate thinking about it again.
- mica43683
-
500+ posts
New loop idea
I meant the part about running without screen refresh.The same as what?The -snip-repeat ()block works the same.
end
If you mean the workaround, then you're not entirely correct. If you want to use the simple “repeat” to repeat something for a fixed amount of time, you'll have to do some division by 1/30 (or multiplication by 30). Why not just enter the number of seconds you want to repeat the action for? You can do so in the workaround I suggested.
But yes, they are both loops and it is possible to program one using the other.
I got a lot of compliments on my last signature, and I think that's kind of strange. I wrote it when I was 12 and it wasn't very good. I acted like PS4 controllers were the epitome of human technology, for God's sake! I tried too hard to be philosophical, or maybe I tried too hard to be funny, or maybe it was something else. But that signature was bad. It wasn't good. It might be strange for some of you to hear this, seeing as this site is full of kids, but 12-year-old me was practically a baby. I think that's something you realise when you grow up. That you're always better than you were last year. I was looking through old Skype messages between me and a friend of mine from when we were 12, and as I read them, I couldn't stop thinking, “Woah. I was the worst.” It's important to know that you're always the worst. I can almost guarantee that future you is thinking negatively of you right now, just as future me is thinking negatively of me. It's important not to let that get to you. Remember to stay in the present. Tomorrow hates you, but it can't hurt you because you'll never get to tomorrow. When I was 10 or 11, I remember seeing the world very cynically. I thought that human life was inherently selfish, and that we were only put on this planet to destroy it. I'm so glad 10 or 11 year old me is gone, because 17 year old me would NOT get along with that kid.
- mica43683
-
500+ posts
New loop idea
In what way is it too complicated? Please explain more. Semi-Support. It does look like a worthwhile addition, however, this is a kids programming site, and I think it might be a little bit too complicated.
I got a lot of compliments on my last signature, and I think that's kind of strange. I wrote it when I was 12 and it wasn't very good. I acted like PS4 controllers were the epitome of human technology, for God's sake! I tried too hard to be philosophical, or maybe I tried too hard to be funny, or maybe it was something else. But that signature was bad. It wasn't good. It might be strange for some of you to hear this, seeing as this site is full of kids, but 12-year-old me was practically a baby. I think that's something you realise when you grow up. That you're always better than you were last year. I was looking through old Skype messages between me and a friend of mine from when we were 12, and as I read them, I couldn't stop thinking, “Woah. I was the worst.” It's important to know that you're always the worst. I can almost guarantee that future you is thinking negatively of you right now, just as future me is thinking negatively of me. It's important not to let that get to you. Remember to stay in the present. Tomorrow hates you, but it can't hurt you because you'll never get to tomorrow. When I was 10 or 11, I remember seeing the world very cynically. I thought that human life was inherently selfish, and that we were only put on this planet to destroy it. I'm so glad 10 or 11 year old me is gone, because 17 year old me would NOT get along with that kid.
- WindOctahedron
-
1000+ posts
New loop idea
Oh, in that case…I meant the part about running without screen refresh.The same as what?The -snip-repeat ()block works the same.
end
-snip-
The simple “repeat” block can be executed in a single instant (in the cases in which you don't put anything in it that prevents it from doing so, such as the “wait” block), because it is possible to know when the program will end judging only by internal conditions* (in the cases that i mentioned in the brackets/parentheses above). However, the “repeat until” block cannot be executed in a single instant, because the time at which it must stop is always set by external conditions* (that includes the timer).
*“External conditions” means anything other than the number input in the regular “repeat” block.
Last edited by WindOctahedron (Oct. 11, 2019 18:54:08)
The message above may contain wrong information, rude remarks, or something embarrassing to my current self. In this case, please ignore it and remember that I likely wrote it back when I didn't know what “respect” truly meant. I really hate thinking about it again.
- mica43683
-
500+ posts
New loop idea
As I said, it checks how many times the “repeat ()” block would run in the time you input, and runs that many times.Oh, in that case…I meant the part about running without screen refresh.The same as what?The -snip-repeat ()block works the same.
end
-snip-
The simple “repeat” block can be executed in a single instant (in the cases in which you don't put anything in it that prevents it from doing so, such as the “wait” block), because it is possible to know when the program will end judging only by internal conditions* (in the cases that i mentioned in the brackets/parentheses above). However, the “repeat until” block cannot be executed in a single instant, because the time at which it must stop is always set by external conditions* (that includes the timer).
*“External conditions” means anything other than the number input in the regular “repeat” block.
I got a lot of compliments on my last signature, and I think that's kind of strange. I wrote it when I was 12 and it wasn't very good. I acted like PS4 controllers were the epitome of human technology, for God's sake! I tried too hard to be philosophical, or maybe I tried too hard to be funny, or maybe it was something else. But that signature was bad. It wasn't good. It might be strange for some of you to hear this, seeing as this site is full of kids, but 12-year-old me was practically a baby. I think that's something you realise when you grow up. That you're always better than you were last year. I was looking through old Skype messages between me and a friend of mine from when we were 12, and as I read them, I couldn't stop thinking, “Woah. I was the worst.” It's important to know that you're always the worst. I can almost guarantee that future you is thinking negatively of you right now, just as future me is thinking negatively of me. It's important not to let that get to you. Remember to stay in the present. Tomorrow hates you, but it can't hurt you because you'll never get to tomorrow. When I was 10 or 11, I remember seeing the world very cynically. I thought that human life was inherently selfish, and that we were only put on this planet to destroy it. I'm so glad 10 or 11 year old me is gone, because 17 year old me would NOT get along with that kid.
- WindOctahedron
-
1000+ posts
New loop idea
Oh, okay.As I said, it checks how many times the “repeat ()” block would run in the time you input, and runs that many times.-snip-I meant the part about running without screen refresh.The same as what?The -snip-repeat ()block works the same.
end
-snip-
The message above may contain wrong information, rude remarks, or something embarrassing to my current self. In this case, please ignore it and remember that I likely wrote it back when I didn't know what “respect” truly meant. I really hate thinking about it again.
- EZ-Games
-
1000+ posts
New loop idea
Semi-Support for the following reason(s):
- The “repeat () in () secs” block would indeed be very useful for animation.
- The “repeat for () secs” block is also useful, but there is a simple workaround:
set [limit v] to ((timer) + ()) // you have to put the number of seconds in the blank input
repeat until <(timer) > (limit)>
...
end
Last edited by EZ-Games (Oct. 11, 2019 21:09:22)
God did not send his Son into the world to condemn the world, but to save the world through him.
John 3:17
Advice:
Saying “Support” or “No Support” doesn't contribute anything to the conversation.
A question that has already been answered doesn't need to be answered twice with the same answer - bring something new to the table.
- Za-Chary
-
1000+ posts
New loop idea
I'm a little concerned about this. Usually “wait () secs” is my go-to for blocks which would cause this loop to not work, but there are many others: "But, Mica, what if someone would put thewait () secsblock in there?“, I hear you asking!
My idea for the ”repeat for () secs" block would be that it checks how many times the normalrepeat ()block would run in the span of () seconds, and runs that many times. That way, the
endwait () secsblock would still work.
broadcast [ v] and wait
repeat ()
end
ask [] and wait
play sound [ v] until done
The “play sound” block could be especially problematic if another script actively changes the pitch of the block while the loop is running. That might cause your math to break when deciding how many times this loop runs.
And then what if you put something like the “ask” or “forever” blocks in your proposed loop, or even “broadcast and wait” and have it broadcast a “forever” loop? Presumably I'd guess that your proposed loop would check to see if this would happen, and then not run the loop at all if it does.
This all gets into the idea of “Can a program determine whether an algorithm will stop or not before it actually runs the algorithm?” This is known as the Halting Problem, and it was proven that a program cannot determine whether an algorithm will run forever, before actually running the algorithm.
Or would your proposed loop just stop all the code in the broadcasts if it takes longer to run than desired? In that case, I could definitely see some confusion happening with this loop.
I'm not here to reject the suggestion or anything — but this sort of suggestion has come up before, and I still find these sorts of problems, which no one seems to have provided a reasonable solution for yet. (Not to mention that the workarounds are relatively easy and intuitive).
This is my forum signature! On a forum post, it is okay for Scratchers to advertise in their forum signature. The signature is the stuff that shows up below the horizontal line on the post. It will show up on every post I make.
I was a Scratch Team member from May 10th 2019 to October 29th 2021.
my notebook | scratch team essay | accessibility essay
- mica43683
-
500+ posts
New loop idea
What I was thinking is instead of the script strictly running in that length of time, theI'm a little concerned about this. Usually “wait () secs” is my go-to for blocks which would cause this loop to not work, but there are many others: -snip-broadcast [ v] and wait
repeat ()
end
ask [] and wait
play sound [ v] until done
The “play sound” block could be especially problematic if another script actively changes the pitch of the block while the loop is running. That might cause your math to break when deciding how many times this loop runs.
And then what if you put something like the “ask” or “forever” blocks in your proposed loop, or even “broadcast and wait” and have it broadcast a “forever” loop? Presumably I'd guess that your proposed loop would check to see if this would happen, and then not run the loop at all if it does.
This all gets into the idea of “Can a program determine whether an algorithm will stop or not before it actually runs the algorithm?” This is known as the Halting Problem, and it was proven that a program cannot determine whether an algorithm will run forever, before actually running the algorithm.
Or would your proposed loop just stop all the code in the broadcasts if it takes longer to run than desired? In that case, I could definitely see some confusion happening with this loop.
I'm not here to reject the suggestion or anything — but this sort of suggestion has come up before, and I still find these sorts of problems, which no one seems to have provided a reasonable solution for yet. (Not to mention that the workarounds are relatively easy and intuitive).
repeat () {block would divide the number of seconds by the number of times it repeats and use the result as a gap between when the loop finishes running the script it surrounds, and starts running the next time. Say you want it to run 10 times in a second. It would run every 0.1 seconds.
} in () secs::control loop
The
repeat {block would check how many times the
} for () secs::loop control
repeat ()block would run to reach that time, and runs that many times.
end
I got a lot of compliments on my last signature, and I think that's kind of strange. I wrote it when I was 12 and it wasn't very good. I acted like PS4 controllers were the epitome of human technology, for God's sake! I tried too hard to be philosophical, or maybe I tried too hard to be funny, or maybe it was something else. But that signature was bad. It wasn't good. It might be strange for some of you to hear this, seeing as this site is full of kids, but 12-year-old me was practically a baby. I think that's something you realise when you grow up. That you're always better than you were last year. I was looking through old Skype messages between me and a friend of mine from when we were 12, and as I read them, I couldn't stop thinking, “Woah. I was the worst.” It's important to know that you're always the worst. I can almost guarantee that future you is thinking negatively of you right now, just as future me is thinking negatively of me. It's important not to let that get to you. Remember to stay in the present. Tomorrow hates you, but it can't hurt you because you'll never get to tomorrow. When I was 10 or 11, I remember seeing the world very cynically. I thought that human life was inherently selfish, and that we were only put on this planet to destroy it. I'm so glad 10 or 11 year old me is gone, because 17 year old me would NOT get along with that kid.
- WindOctahedron
-
1000+ posts
New loop idea
Yes, but Za-Chary is adressing the problem of the “repeat for () seconds”.What I was thinking is instead of the script strictly running in that length of time, the(Bringing back the quote so that it is clear what Za-Chary means by the word “this”.)I'm a little concerned about this. Usually “wait () secs” is my go-to for blocks which would cause this loop to not work, but there are many others:
"But, Mica, what if someone would put thewait () secsblock in there?“, I hear you asking!
My idea for the ”repeat for () secs" block would be that it checks how many times the normalrepeat ()block would run in the span of () seconds, and runs that many times. That way, the
endwait () secsblock would still work.
-snip-
The “play sound” block could be especially problematic if another script actively changes the pitch of the block while the loop is running. That might cause your math to break when deciding how many times this loop runs.
-snip-repeat () {block would divide the number of seconds by the number of times it repeats and use the result as a gap between when the loop finishes running the script it surrounds, and starts running the next time. Say you want it to run 10 times in a second. It would run every 0.1 seconds.
} in () secs::control loop // Why are you talking about this now?
-snip, because you are repeating what you've already said, and you are not answering to Za-Chary-
In the post that he quoted that you snipped, you talked about the “repeat for () seconds”, so why are you talking about “repeat () in () seconds” now?
Last edited by WindOctahedron (Oct. 12, 2019 08:27:08)
The message above may contain wrong information, rude remarks, or something embarrassing to my current self. In this case, please ignore it and remember that I likely wrote it back when I didn't know what “respect” truly meant. I really hate thinking about it again.
- mica43683
-
500+ posts
New loop idea
I also spoke about the “repeat for () secs.” I was solving the problem for both, as I noticed it's a problem that applies to both. What I meant was that the “repeat for () secs” block checks how many times it runs instead of running over the span of () seconds.Yes, but Za-Chary is adressing the problem of the “repeat for () seconds”.What I was thinking is instead of the script strictly running in that length of time, the(Bringing back the quote so that it is clear what Za-Chary means by the word “this”.)I'm a little concerned about this. Usually “wait () secs” is my go-to for blocks which would cause this loop to not work, but there are many others:
"But, Mica, what if someone would put thewait () secsblock in there?“, I hear you asking!
My idea for the ”repeat for () secs" block would be that it checks how many times the normalrepeat ()block would run in the span of () seconds, and runs that many times. That way, the
endwait () secsblock would still work.
-snip-
The “play sound” block could be especially problematic if another script actively changes the pitch of the block while the loop is running. That might cause your math to break when deciding how many times this loop runs.
-snip-repeat () {block would divide the number of seconds by the number of times it repeats and use the result as a gap between when the loop finishes running the script it surrounds, and starts running the next time. Say you want it to run 10 times in a second. It would run every 0.1 seconds.
} in () secs::control loop // Why are you talking about this now?
-snip, because you are repeating what you've already said, and you are not answering to Za-Chary-
In the post that he quoted that you snipped, you talked about the “repeat for () seconds”, so why are you talking about “repeat () in () seconds” now?
I got a lot of compliments on my last signature, and I think that's kind of strange. I wrote it when I was 12 and it wasn't very good. I acted like PS4 controllers were the epitome of human technology, for God's sake! I tried too hard to be philosophical, or maybe I tried too hard to be funny, or maybe it was something else. But that signature was bad. It wasn't good. It might be strange for some of you to hear this, seeing as this site is full of kids, but 12-year-old me was practically a baby. I think that's something you realise when you grow up. That you're always better than you were last year. I was looking through old Skype messages between me and a friend of mine from when we were 12, and as I read them, I couldn't stop thinking, “Woah. I was the worst.” It's important to know that you're always the worst. I can almost guarantee that future you is thinking negatively of you right now, just as future me is thinking negatively of me. It's important not to let that get to you. Remember to stay in the present. Tomorrow hates you, but it can't hurt you because you'll never get to tomorrow. When I was 10 or 11, I remember seeing the world very cynically. I thought that human life was inherently selfish, and that we were only put on this planet to destroy it. I'm so glad 10 or 11 year old me is gone, because 17 year old me would NOT get along with that kid.
- WindOctahedron
-
1000+ posts
New loop idea
Za-Chary already adressed this way of calculating the number of runs:I also spoke about the “repeat for () secs.” I was solving the problem for both, as I noticed it's a problem that applies to both. What I meant was that the “repeat for () secs” block checks how many times it runs instead of running over the span of () seconds. -snip-
That might cause your math to break when deciding how many times this loop runs.The “play sound” block could be especially problematic if another script actively changes the pitch of the block while the loop is running.
-snip-
The message above may contain wrong information, rude remarks, or something embarrassing to my current self. In this case, please ignore it and remember that I likely wrote it back when I didn't know what “respect” truly meant. I really hate thinking about it again.
- Discussion Forums
- » Suggestions
-
» New loop idea