Discuss Scratch
- Discussion Forums
- » Suggestions
- » Scratch Workaround Guide VII
- _nix
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
I don't know if this is the right place to put this, but I made a timer variable that can be incremented or decremented, and maybe even paused once I figure out how to do that.Ooh, I like this idea a lot! That's a similar concept to some video game and animation engines, where if you don't know how much lag there will be between one frame and the next, you can still make the animation look smooth by comparing how much time passed. That's what “reset timer” at the end of one frame, then “change variable by (timer)” at the start of the next frame does. Plus, a rewindable/skippable timer is a nice and simple functionality that is really idea-sparking. I like it!
Let me know if you figure out pausing/resuming — I think once that's ready it would be a cool addition to the guide!
Maybe for broadcast to specific clone, have this?Yeah, I've done a bunch of work with clones and broadcasts before so I've got that gist down. It reminded me though, it might be a good idea to talk in the examples about using manually specified words for ID instead of just a generated number! Numbers and “my clones” lists are handy for if you're going to dynamically create a bunch of clones and don't want to give each one a specific name (but still need to keep track of them)… but if you're just making a few clones which you want to be able to conveniently access from anywhere in the project, giving them text/word IDs instead of numbers (or a mix, such as player1, player2, enemy1, enemy2) can work better. I'd definitely want to include some real-world examples of both approaches.
Also, switch to costume is the 1.x name for the switch costume to block.I haven't even used 1.4 in ages, it just seemed like the more natural phrasing to me lol. It's better than switch costume to! I didn't really preview the post before putting what I had online, but I went over it now and it should be mostly tidied up.
I didn't do any really new content today (besides the extra implementation for “parent ID”), but I did some polishing, and like I mentioned in the previous post, a bunch of experimenting with the formatting. I'm gonna keep messing with this and working it into new examples later, and input is always welcome!
- _nix
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
Uhm, why is it not:Have a lookie at my other posts, you caught me as I was still working/writingdelete (all v) of [list v]Also what’s the point of the new colors (just wondering)

It's “delete all of (list)” because that's what that block looks like in 3.0. “Combo” inputs which could hold a number (which you typed) or a special value (from a dropdown) were removed in 3.0, probably because they were awkward to use on touch screens (or might have been confusing). So instead in 3.0, you've got dedicated blocks like “delete all of (list)” and, occasionally, workarounds like “delete (random 1 to (length of (list)) of (list)”.
- medians
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
…Okay I completely forgot LOL you got me, and the sections crash on the device I’m on currentlyUhm, why is it not (2.0 user moment):Have a lookie at my other posts, you caught me as I was still working/writingdelete (all v) of [list v]Also what’s the point of the new colors (just wondering)
It's “delete all of (list)” because that's what that block looks like in 3.0. “Combo” inputs which could hold a number (which you typed) or a special value (from a dropdown) were removed in 3.0, probably because they were awkward to use on touch screens (or might have been confusing). So instead in 3.0, you've got dedicated blocks like “delete all of (list)” and, occasionally, workarounds like “delete (random 1 to (length of (list)) of (list)”.
Also that block had no random dropdown
Last edited by medians (April 7, 2023 20:05:53)
- INSERT-USER_NAME
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
I figured the pausing out, and after taking way longer than I'd like to admit on a nice “little” proof-of-concept project, I have something to show you now.I don't know if this is the right place to put this, but I made a timer variable that can be incremented or decremented, and maybe even paused once I figure out how to do that.Ooh, I like this idea a lot! That's a similar concept to some video game and animation engines, where if you don't know how much lag there will be between one frame and the next, you can still make the animation look smooth by comparing how much time passed. That's what “reset timer” at the end of one frame, then “change variable by (timer)” at the start of the next frame does. Plus, a rewindable/skippable timer is a nice and simple functionality that is really idea-sparking. I like it!
Let me know if you figure out pausing/resuming — I think once that's ready it would be a cool addition to the guide!
If you're looking for the workaround, it's in the backdrop. I even commented the code for the first time in my entire Scratch “career”.
- 10data10
-
Scratcher
100+ posts
Scratch Workaround Guide VII
OK, I updated the early-draft clones documentation with a new kind of syntax. …
Let me know what you folk think, especially if anything about this type of writing is tricky to understand ..
Your “meta” blocks are not too hard to understand but it does take a second or so to switch gears to understand what is going on.
Some people believe there is value in having people follow the illustrations and build scripts but for longer examples, and because there are so many for this set, I'd like to see them also placed in a studio and maybe include actual case studies. Also, some of the other workarounds you've done here could then be combined to do things like move to the nearest clone.
One of the things your guide might cover is what to do when a clone is deleted because now the index list will have clones that should not be checked. If clones are being created and deleted a lot then scanning through a list with a lot of missing clones might slow things down. Scratch user Spentine sometimes posts workarounds like this to reuse slots in the list of clones. (And others have posted scripts like this.)
when I start as a clone
set [cloneid v] to (item # of (0) in [activecloneids v] :: list)
if <(cloneid) = (0)> then
add (1) to [activecloneids v]
add (x position) to [Clones X v]
add (y position) to [Clones Y v]
add (0) to [lastactive v]
set [cloneid v] to (length of [activecloneids v])
else
replace item (cloneid) of [activecloneids v] with (1)
replace item (cloneid) of [Clones X v] with (x position)
replace item (cloneid) of [Clones Y v] with (y position)
end
forever
replace item (cloneid) of [lastactive v] with ((1) - (item (cloneid) of [lastactive v]))
replace item (cloneid) of [Clones X v] with (x position)
replace item (cloneid) of [Clones Y v] with (y position)
wait (0) seconds :: control
end
From https://scratch.mit.edu/discuss/topic/669920/
- INSERT-USER_NAME
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
I just realized something, shouldn't this technically be in help with scripts?
- _nix
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
Your “meta” blocks are not too hard to understand but it does take a second or so to switch gears to understand what is going on.Thanks, that's encouraging to hear! It's a new format, but that comes with the new territory (showing changes more clearly). My hope is that it isn't too confusing to most readers.
Also, some of the other workarounds you've done here could then be combined to do things like move to the nearest clone.Yeah, I've got a little todo there under “clones and other workarounds”. It's definitely planned! Workarounds are actually even handier for clones because even none of the sprite-targeting blocks work directly with clones — you'd need the workarounds even if those blocks were part of Scratch.
Some people believe there is value in having people follow the illustrations and build scripts but for longer examples, and because there are so many for this set, I'd like to see them also placed in a studio and maybe include actual case studies.It's an interesting line to straddle! For example, I made an interactive tutorial all about clone IDs a while back. I didn't really expect it to get any attention, but it really plummeted lol. Simple behavior examples aren't necessarily nearly as interactive and take less effort to make than that, of course. I do think it's worth exploring, and I don't care that much how many eyes end up on my examples anyway. I'm just a little wary of making a whole series of examples which only two or three people might ever check out… but if it's not crazy involved to make and those two or three people learn something, that's worth it anyway, I feel.
More on point, I feel real project examples and “build along” guides serve different purposes — and can work well together! Like you said, projects better fit the longer examples. They make it really easy to see just what code is doing, and mess around with it yourself too. The “meta” blocks, as you called ‘em, for “build along” guides are more to demonstrate how you might adapt existing code to new behavior. That’s something which is really important to learn, and I kind of feel a longer tutorial, maybe in video or project form, would be necessary to really instil new adaptive ideas, especially for abstract stuff like tracking clone data in variables and lists. That's kind of my concern with the “build along” examples I'm working on. They're the right direction, I think, but will they really be effective in a relatively concise forum post form?
I'm probably going to keep developing them anyway, because I think it's a fun idea to have and share, and the only way to really know how effective they'll be is to try (and give it time). It's something I want to work on and maybe some folk down the line will really love the forum post format, even if it's not the most popular style… it's the one I want to make now, so I might as well give it what I've got

- _nix
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
…Okay I completely forgot LOL you got me, and the sections crash on the device I’m on currentlyOkay yeah but "item random of list" definitely did exist in previous versions.
Also that block had no random dropdown

I figured the pausing out, and after taking way longer than I'd like to admit on a nice “little” proof-of-concept project, I have something to show you now.Awesome, thank you! I don't have time to check it out right now but I'm definitely interested to look later (probably the coming Friday and Saturday). I love commenting code in Scratch (in particular… don't ask me about my JavaScript, I don't comment enough there!
If you're looking for the workaround, it's in the backdrop. I even commented the code for the first time in my entire Scratch “career”.
). It's great to start practicing that, and I think Scratch works really well for teaching people who see inside your project with blocks and comments!I just realized something, shouldn't this technically be in help with scripts?lol technically true! All the previous Scratch Workaround Guides (to my knowledge) have been in Suggestions, since even though this really is a bunch of mini Scratch coding tutorials in one forum thread, it's also topical to the Suggestions forum… because if you have a suggestion and are dying to use it now, chances aren't half-bad that there's already a workaround that might get you most of the way there. Have a look at the very first post in the thread if you haven't read it and are curious about more of my thoughts — it might explain how this guide has to do with suggestions more.
- _nix
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
One of the things your guide might cover is what to do when a clone is deleted because now the index list will have clones that should not be checked. If clones are being created and deleted a lot then scanning through a list with a lot of missing clones might slow things down. Scratch user Spentine sometimes posts workarounds like this to reuse slots in the list of clones. (And others have posted scripts like this.)Thanks for sharing the example on this. I'd love to see others' approaches, too. It's a big lacking part in the WIP guide! I've had a few different approaches in the past but they've all felt pretty convoluted. I don't have time to go over examples right now, but I definitely want to figure out a relatively easy-to-understand approach — or even two or three, since I'm sure different people have come up with differently detailed solutions.
- medians
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
:P the other blocks had last and random…Okay I completely forgot LOL you got me, and the sections crash on the device I’m on currentlyOkay yeah but "item random of list" definitely did exist in previous versions.
Also that block had no random dropdown

Hey wait a minute, I just realized I wasn't going crazy when thinking that.I just realized something, shouldn't this technically be in help with scripts?(yeah)
- medians
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
how bout c block{}::customWell, you could just run the code in the custom block like this:
Last edited by medians (April 9, 2023 04:34:46)
- medians
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
Just basically run the custom block but don't put anything after that.define ::capthis?
- _nix
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
Thanks, that's a good suggestion to include here and work on! Like medians wrote you can just not put anything after the custom block (handy if the custom block includes “forever” or otherwise won't ever finish). Another option is to use a “stop above script” variable.define ::capthis?
define do something
if <some condition :: grey> then
...
else
set [stop above script v] to [true]
end
define some other custom block
repeat (10)
...
do something
if <(stop above script) = [true]> then
stop [this script v]
end
end
when green flag clicked
set [stop above script v] to [false]
forever
some other custom block
if <(stop above script) = [true]> then
stop [this script v]
end
end
You can use a similar approach if you want to report an error (and dynamically catch it at a specific spot in your program) like in other programming languages (“throw error”, “raise exception” etc).
What if you need to do something a little more unpredictable in the custom block? Your example works great if there's something really specific you want to repeat every time you use that custom block, but how would you personally workaround a custom block like the C-shaped one here?how boutWell, you could just run the code in the custom block like thisc block{}::custom
when green flag clicked
for each word in [my cool and long string with many words] {
uppercase (for-each word) :: custom
switch costume to (uppercase word)
say (join [The word of the minute is: ] (uppercase word)) for (60) secs
} :: custom loop
- medians
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
What if you need to do something a little more unpredictable in the custom block? Your example works great if there's something really specific you want to repeat every time you use that custom block, but how would you personally workaround a custom block like the C-shaped one here?Probably with some for each workaround and then using uppercase.when green flag clicked
for each word in [my cool and long string with many words] {
uppercase (for-each word) :: custom
switch costume to (uppercase word)
say (join [The word of the minute is: ] (uppercase word)) for (60) secs
} :: custom loop
though i worry you may need to make multiple custom blocks for this lol
- _nix
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
Got here from the index? Interested in taking over?
This is the original post where we announced that takeovers would be accepted, back in April 2023. We've retained all the original content here for archival, and you're welcome to read it over if you like, but the only section which applies to you today is “Licensing credits / content reuse”. The takeover qualifications and takeover timeline are purely historic and don't carry special significance now. Thanks again for your time!
Hey all, I've done some thinking over the last few weeks about what direction would be best for the guide, and whether or not I'm the best fit to keep it going. I've come to the conclusion that, while I'd be happy to keep maintaining it, answering questions and bringing in new smaller-scale workarounds, I don't really have any ideas on anything new that I feel I could make really fit in. Since I don't have as much time to go around and would like to put more focus on other projects, I'm going to be opening up applications to take over this thread.
Please read this post / form in full, because there are important details which you need to understand if you are interested in taking over, and I'm not going to repeat them unless you want help understanding.
Licensing credits / content reuse:
You're welcome to reuse any part of this guide. All user content shared on Scratch is shared under a Creative Commons license marked “Attribution” and “ShareAlike”, meaning your guide will automatically be released under the same license, and generally requires you to credit the original author of content you make use of.
I relinquish credits for workarounds which do not have specific credits. I wrote these, but I generally built up knowledge of them over years of coding on Scratch, so I'm happy to release the workarounds I pulled from my own head (which are really from the community in general) without need for credits.
However, if you're interested in using workarounds which ARE credited to specific users in this guide, you HAVE to include in your own guide the same link I did, crediting the user and linking back to where they posted their workaround. I informed all people submitting workarounds for this guide that I would give credits to them, so it only seems right for that credit to not suddenly disappear as soon as the workaround is reused in another guide. This is in keeping with the Creative Commons license, and acknowledging that people put their own time into contributing to this guide which I want to ensure is respected by keeping their credits around.
Please include the same information about crediting users when you let someone else take over your own guide, including this line about including the same information when their guide is taken over. This is to ensure credits continue to be respected. To that end, you're welcome to link back to this post or quote this particular section from me. If you want, you may reword this section as long as you keep the core principles of crediting users for their own writing and working to ensure that credit is respected in the future.
If you are not interested in ensuring credits continue to be respected by including this section when you open your guide for take-overs, you may reach out to the authors of workarounds individually and ask if they are OK with you including their workaround without credits. It's their own content, so they are allowed to release it without requiring credits if they want to. But you have to get word from them receiving permission. Otherwise, that is, if you don't get a reply and are not going to reproduce this section in full when your guide is taken over, do not use workarounds contributed by other users here.
Please credit me with one link for Frequently Asked Questions in the first post, if you decide to reuse any part or all of that section in your own guide. You don't have to credit me for any other part of the guide, including formatting, structure and organization, etc.
You are also welcome to change as much as you like, since it's your own guide, including keeping some workarounds but not others, changing workarounds as you desire, adding new workarounds I didn't show interest in adding in this thread, any structural or formatting changes you like, etc. I'm handing off this guide out of desire to see someone with their own ideas put their own energy into it, and I don't want any part of this guide to be restrictive in that matter!
You must explicitly acknowledge that you are going to respect every part of this section in your application post.
Takeover qualifications:
In general, I'm not interested in being extremely selective over who takes over the guide. After all, I want it to be someone with new ideas putting in their own energy! So if you can't meet everything I ask you to share here, you're still welcome to post your application. Here are the important principles and ideas I'd like you to share if possible:
Experience thinking outside the box. Please link me to a project or two coded in Scratch where you faced a confusing or difficult situation and had to come up with something new to get your project working. These don't need to be huge projects, just something where you were stuck for some time and had to come up with a solution that wasn't obvious from the start! You're welcome to go into some detail if you remember. I don't need extreme specifics of how you thought outside the box, but I'd love to see that it's something you've done before and are happy to bring with you in anything you work on in the future — such as the next workaround guide!
Experience putting in continuous work. Please link me to a project — whether a Scratch project or something on the forums — which you worked on for at least one or two months. It's totally OK if you took breaks but I am looking to see that you can stay committed to something for a long time, especially if it posed you challenges while you were working on it. If you started a project in January, put 30 hours into it over one week, and decided to touch it up at the end of February, that's going to be a lot less valuable to me than something you put just a few hours into almost every week all the way from August to November, for example!

Baseline experience with the Scratch programming language. You don't need to be a big coding whiz, but I'd love to see a link or two to Scratch code projects which show off some of your code skills. This is just because this is a block workaround guide, so I'd like to see you've really learned a fair bit about those blocks. (I know there are a couple stragglers who really prefer Scratch 2.0 over 3.0! If you are interested in taking over the guide, you need to ensure that you're knowledgeable of all the blocks which currently are, and are not, available in Scratch. I don't need specific project links here if working in 3.0 just isn't something you like doing lol, but you need to have basic access to Scratch 3.0, and to ensure your knowledge is up to date so that your guide is too.)
Experience writing longer informative content. Please link me to two or three forum posts or threads which are a bit longer, especially ones where you had to explain your thoughts — or better yet, your code — to somebody else in detail. As I've been running this thread, I haven't gotten a lot of questions about specific workarounds, but in general you should still try to be ready to explain how and why a workaround works to somebody who is curious, since you're writing a guide and are looking to teach other Scratchers! You can find all of your forum posts here. (Link is from the Discussion Forums index, at the very bottom of the page, “Show your topics/posts”.)
Interest in teaching and talking with learners, not in pushing your exact ideas on peers or people whose skills are “beneath” yours. This is an important one. If you don't have any on hand, you don't need to give me specific examples, because I know this isn't something everybody always includes in all their forum posts or conversations. But it's an important value to me, so I want you to at least recognize it! Teaching isn't about making other people come to know exactly what you do, it's about having a conversation and offering knowledge that you yourself have developed with the help of others. Teachers with an open mind often have as much to learn from students as students do from teachers. I'd love if you keep that idea in mind as you create and maintain your own guide.
Ideas for the guide! Last of all, I'd love to hear about what you personally want to bring to the guide! Please tell me not just that you want to take over the guide (and believe you'd be a good fit for it), but why you want to! I'm not gonna accept just “being more active than _nix” as a reason, sorry
You're especially welcome to share how you would do something differently from the current guide. I like the guide as it is, but I think it's gotten a teensy bit stale, so if you are interested in doing things differently, I would be happy to hear about it. I will not accept or deny your application based on whether or not I agree with your ideas. I'm not interested in judging your application based on whether I personally agree with you. This section is just to give you an opportunity to share your creative spirit and energy, and to demonstrate that you have an idea or two that you want to put the time into and look down deeper so you can bring it to your version of the guide.Takeover timeline:
There is no pressing time limit on getting your application in. However, I won't be reviewing any applications and posting a final decision until at earliest, the first of June. This is to give you time to think over and decide what you want to bring to the guide and evaluate for yourself if you'd be a good fit, or what skills and qualities you would like to work on before applying. I almost certainly won't actually decide on the first of June, so you're still encouraged to send your application in even if it's not ready until after that date.
If I haven't made a final decision near the start of June, I'll post updates again about every two weeks. Just in case this doesn't get much of any attention, the latest I'm looking to pass this thread off is mid-July. If I haven't decided on an application earlier, then at that point I'll pass it off to one of the applicants so far, with a minimum of 3 applicants before I'm going to make any decisions. I also won't be making any decisions on a per-application basis until two weeks after you post your application, to give myself time to think it over and evaluate your application fully from more than one perspective, rather than just when you post it.
Here's a date-by-date timeline which might be easier to understand at a glance:
- Today, April 18: I've announced that takeover applications are open. I'll continue to do basic guide maintenance until I've reviewed applications and decided who will run the next guide, and I'll answer any questions about applying as well. If applications are posted soon, I won't be reviewing any until later.
- May 11: I'll start reviewing any applications that have been sent in so far. This is three weeks in advance of June 1. There will be at least two weeks before any application is considered “ready”, so that I have time to review the application thoroughly. Applications are still open.
- June 1 (approximately): First biweekly applications “final” review: If there have been at least three applications (which meet the essentials, who I consider good candidates, and which have been on the thread for two weeks and so are considered “ready”), it's possible I'll make a final decision on who gets the guide. I may still hold out for more applications, and I certainly will if there haven't yet been three applications. Applications are still open.
- June 15 (approx): Second biweekly review. All of the above applies.
- June 29 (approx): Third biweekly review. All of the above applies.
- July 13 (approx): At this point (roughly), if there have been three (or more) applications which are considered “ready”, and I haven't decided who to pass the thread onto yet, I'll choose from these three (or more).
- July 27, August 10, August 24, etc: Further biweekly reviews if there still haven't been three applications yet. At the first point there are three applications, that will be considered the cutoff and I'll select from those three.
Try to be professional. If anybody fights with each other over applications here, you're pretty much disqualified out of the box. If someone's critical of your application, you may reply to them and consider their feedback, but remember that I am going to do my best to judge you by your own merits, not factoring in what other folk say here. Absolutely no “dunking” on applications which aren't long or don't meet every part of this thread. Do not mini-mod for me. It's fully my responsibility to handle applications and questions about the application process, so out of respect for applicants, for me, and for the process, please do not speak on my behalf or explain parts of the takeover for me.
Anybody, applicants or otherwise, is welcome to ask any questions about the takeover or about the guide in general during this process! I'm an open book, meaning I'm happy to answer any questions or concerns or explain things differently if something in this post didn't make sense to you. I'll also continue to maintain this guide until deciding on a takeover.
There's no specific form to follow for submitting your application. Just write a forum post (in this thread) explaining why you feel you'd be suitable to take on the next workaround guide and keep all the guidelines above in mind.
Thank you for putting your time and self into reading this, and into applying, if you decide to. I sincerely appreciate it! ♦
Last edited by _nix (Feb. 19, 2024 15:23:47)
- medians
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
(I know there are a couple stragglers who really prefer Scratch 2.0 over 3.0! If you are interested in taking over the guide, you need to ensure that you're knowledgeable of all the blocks which currently are, and are not, available in Scratch. I don't need specific project links here if working in 3.0 just isn't something you like doing lol, but you need to have basic access to Scratch 3.0, and to ensure your knowledge is up to date so that your guide is too.)LOL
Last edited by medians (April 18, 2023 13:06:35)
- _nix
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
Sorry, I had to(I know there are a couple stragglers who really prefer Scratch 2.0 over 3.0! If you are interested in taking over the guide, you need to ensure that you're knowledgeable of all the blocks which currently are, and are not, available in Scratch. I don't need specific project links here if working in 3.0 just isn't something you like doing lol, but you need to have basic access to Scratch 3.0, and to ensure your knowledge is up to date so that your guide is too.)LOL
I don't remember if you've expressed interest in the next thread before, but up-to-date knowledge is important!- medians
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
I mean I haven’t reallySorry, I had to(I know there are a couple stragglers who really prefer Scratch 2.0 over 3.0! If you are interested in taking over the guide, you need to ensure that you're knowledgeable of all the blocks which currently are, and are not, available in Scratch. I don't need specific project links here if working in 3.0 just isn't something you like doing lol, but you need to have basic access to Scratch 3.0, and to ensure your knowledge is up to date so that your guide is too.)LOLI don't remember if you've expressed interest in the next thread before, but up-to-date knowledge is important!
- _nix
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
Yeah, I thought maybe not but I figured I'd include the note just in case. It goes for anyone.Sorry, I had toI mean I haven’t reallyI don't remember if you've expressed interest in the next thread before, but up-to-date knowledge is important!
- Spentine
-
Scratcher
1000+ posts
Scratch Workaround Guide VII
You might want to add octal to decimal or binary to decimal using these short workarounds:
((join [0o] (num)) + (0))
((join [0b] (num)) + (0))




