Discuss Scratch

  • Discussion Forums
  • » Suggestions
  • » Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS) [RSS Feed]
Nezon
Scratcher
1000+ posts

Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS)

This is the topic for finding replacement scripts of blocks that do not currently exist on scratch! Feel free to suggest workarounds here, but please don't spam or put/advertise your suggestion here.


I have full permission from the last topic owner to replace the sticky. They can't access the forums anymore so I'm taking it over, for now. I don't believe I'm the best fit for such sticky, so I may transfer this over soon enough.

If your block suggestion gets rejected, you may be confused and saddened on how you're going to ever get a feature like that. Luckily, there are ways to create that feature through longer scripts. Scratch is a programming language, which means you can make almost anything! @Za-Chary explains it well:

Za-Chary wrote:

Well, there's a couple reasons this is a useful list.

The “previous costume” block is not rejected, but it just hasn't been added to the editor. For those looking for something that works the same as a “previous costume” block, they can look at this topic for a workaround so they can effectively code their project.

The “when stop sign clicked” block is rejected, so we will not be adding it (and in this case, yes, there is something “wrong” with implementing the suggestion). Some Scratchers still might like to simulate its effects, however, so they can look at this topic for a workaround so they can accomplish what the block would do.

The purpose of this topic isn't to tell you to “stick” to workarounds — it's to provide you workarounds for blocks that you might be looking to use. It will likely save you time by using the workaround instead of waiting for us to implement a block.

If you want to contribute, provide the title of the rejected or not rejected suggestion, the workaround, keywords (so people can search it), and maybe some helpful GIFs and images. Try to make sure any image or GIF assets are not huge and fill up the forum post though. If you guys want to really contribute please use the format I used in the first post for the point towards to x, y one. That'll take a lot of workload off for me. Here's also a helpful topic: https://scratch-mit-edu.ezproxyberklee.flo.org/discuss/topic/495829/ Something I would more appreciate is adding your submission in [code] tags as i can easily copy and paste your submission on mobile.

[quote][center][b]title[/b][/center]
[scratchblocks]
// suggestion
[/scratchblocks]
Keywords: Search:"keyword"

text here
[scratchblocks]
// workaround
[/scratchblocks]
[/quote]

I'll be going in and out as I have classes, but I'll be mostly active from 8-9am, 12pm-1pm PDT or random times on weekdays and 11am-3pm PDT or more on weekends. This topic is in progress of being created.

Previous stickies!
vers 4: https://scratch-mit-edu.ezproxyberklee.flo.org/discuss/topic/444061/ (owned by shradibop)
vers 3: https://scratch-mit-edu.ezproxyberklee.flo.org/discuss/topic/408568/ (owned by BearSlothCoding)
vers 2: https://scratch-mit-edu.ezproxyberklee.flo.org/discuss/topic/371300/ (owned by Computer_Fizz)
original: https://scratch-mit-edu.ezproxyberklee.flo.org/discuss/topic/351925/ (owned by openPoll)

If you're looking for a workaround, try ctrl+f to search it, but do:
search:“item”
an example is:
search:“x”

Motion
Point Towards X, Y

point towards x: () y: () :: motion
Keywords: search:“x”, search:“y”, search:“point towards”, search:“motion”, search:“blocks”

There are two methods to execute this.
Method 1:
Create a sprite and make it go to the position you want to point towards.
when I receive [go to variables! v]
go to x: (x) y: (y)

Then, point towards that sprite!
when green flag clicked
set [x v] to [0]
set [y v] to [0]
broadcast [go to variables! v]
point towards [sprite v]
Of course, you don't really need variables and a broadcast, but it's just for reference.

Method 2:
Using a ‘simple’ script that uses trigonometry to point toward positions.

define point towards x: (X) y: (Y)
point in direction (([atan v] of (((X) - (x position)) / ((Y) - (y position)))) + ((180) * <(Y) < (y position)>)
Bounce!
bounce :: motion
Keywords: search:“bounce”, search:“reporter”, search:“motion”

Bounce can be done with:
point in direction ((direction) - (180)

Last edited by Nezon (April 28, 2022 18:45:36)

Nezon
Scratcher
1000+ posts

Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS)

Looks
Number of Costumes

(number of costumes::looks)
Keywords: search:“costumes” search:“looks” search:“reporters” search:“number of costumes” search:“number of”

repeat until <(costume #) = [1]>
next costume
end
next costume
set [no. of costumes v] to [1]
repeat until <(costume #) = [1]>
next costume
change [no, of costumes v] by (1)
end

Last edited by Nezon (March 12, 2022 21:00:33)

Nezon
Scratcher
1000+ posts

Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS)

Sound
Previous/Next Sound

play [previous v] sound :: sound
play [next v] sound :: sound
Keywords: Search:“sound” search:“previous sound” search:“next sound” search:“play previous sound” search:“play next sound”

You can use a variable for this.
when green flag clicked
set [var v] to [1]
set [amount of songs v] to [5] // set this to how many sounds are there
play [previous] sound

define play (previous/next) sound
if <(previous/next) = [previous]> then
change [var v] by (-1)
if <(var) = [0]> then
set [var v] to (amount of songs)
end
play sound [var] until done
end
if <(previous/next) = [next]> then
change [var v] by (1)
if <(var) = ((amount of songs) + (1))> then
set [var v] to [1]
end
play sound [var] until done
end
Pause/Resume Sound

pause sound :: sound

resume sound :: sound
Keywords: Search:“sound” search:“pause sound” search:“resume sound”

There are two methods to this:
However as one of them is too long and it would be unfair to have only one method and another linked, both will be linked below

Method 1: A shorter, less efficient script. (by xXRedTheCoderXx)
https://scratch-mit-edu.ezproxyberklee.flo.org/projects/316863795/

Method two: Best method found, seems to pause and resume sound. (by EIephant_Lover)
https://scratch-mit-edu.ezproxyberklee.flo.org/projects/322615380/

Last edited by Nezon (March 13, 2022 19:53:13)

Nezon
Scratcher
1000+ posts

Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS)

Events
When Stop Sign Clicked

when (:: red) clicked :: events :: hat
Keywords: Search:“Stop” Search:“Stop sign” Search:“Stop sign clicked” Search:“clicked” Search:“stop clicked” Search:“project stopped”

There are two methods to implement this.

Method 1:
when green flag clicked
forever
reset timer

when [timer v] > (0)
do something

when [timer v] > (0)
forever
reset timer
end
Method 2:
when green flag clicked
forever
set [timer v] to (timer)

when [timer v] > (timer :: variables)
do something
while <>

while <> true :: events :: hat
Keywords: search:“while true” search:“while” search:“events” search:“while true” search:“if”

This script will always look for if the reporter block is true, even if the project is stopped
when green flag clicked
broadcast [Continue v]

when [timer v] > (timer :: variables)
broadcast [Continue v]

when I receive [Continue v]
broadcast [Check v]
forever
set [timer v] to (timer)

when I receive [Check v]
forever
if <something happens::grey?> then
. . . :: grey
end

Last edited by Nezon (March 23, 2022 19:11:02)

Nezon
Scratcher
1000+ posts

Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS)

Control
Delete All Clones

delete [all clones v]:: control cap
Keywords: search:delete clones, search:all clones, search:delete all clones

There is only one workaround method:
Method 1. Make a new broadcast called ‘delete all clones’, like so:
broadcast [delete all clones v]
Next, place a ‘when I receive block’, and add a ‘delete this clone’ block!
when I receive [delete all clones v] 
delete this clone

Last edited by Nezon (March 11, 2022 15:31:44)

Nezon
Scratcher
1000+ posts

Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS)

Operators
() to the Power ()
Keywords: Search:power search:Operators search:reporters
((Base) ^ (Power)::operators)
define (Base::custom) ^ (Power::custom)
set [Answer v] to (1)
if <(Power) > (-1)> then
repeat (Power)
set [Answer v] to ((Answer::variables) * (Base))
end
else
repeat ([abs v] of (Power))
set [Answer v] to ((Answer::variables) / (Base))
end
end
googolplex
(googolplex::operators)
Keywords: Search:“googolplex” search:“operators” search:“reporters”
define googolplex
set [googolplex v] to (1)
repeat ([10^ v] of (100)::operators)
set [googolplex v] to (join(googolplex)(0))
Infinity
(infinity::operators)
keywords: search:“infinity”, search:“reporter”, search:“operator”
define inf
set [inf v] to ((1) / (0))
True and False
<[true v] ::operators>
<[false v] ::operators>
Keys: search:“operators”, search:“true”, search:“false”, search:“bools”, search:“booleans”, search:“bool”, search:“f”, search:“t”

You can always do these with one block.
<[true] = [true]> // for true
<[true] = [false]> // for false

Last edited by Nezon (March 13, 2022 19:32:19)

Nezon
Scratcher
1000+ posts

Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS)

Variables and Lists

Last edited by Nezon (March 10, 2022 20:33:20)

Nezon
Scratcher
1000+ posts

Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS)

Sensing
Scratch Version

scratch version?::sensing reporter
Keywords: Search:“version” search:“sensing” search:“reporters” search:“scratch_version”
define scratch version
if <[0] < [a]> then
if <((join [a] []) + (10)) = [10]> then
set [scratch version v] to [scratch 3.0]
else
set [scratch version v] to [scratch 2.0]
end
else
if <<[0] < [a]> = [false]> then
set [scratch version v] to [scratch 1.4]
else
if <<[0] < [a]> = []> then
set [scratch version v] to [<scratch 1.4]
end
end
end
and use
(scratch version)

Last edited by Nezon (March 13, 2022 19:26:52)

Nezon
Scratcher
1000+ posts

Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS)

Extensions and Miscellaneous

Last edited by Nezon (March 11, 2022 14:27:48)

Nezon
Scratcher
1000+ posts

Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS)

reserved
SuperDragonStudios
Scratcher
500+ posts

Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS)

Nezon wrote:

Events

when stop sign clicked :: events :: hat

Can be replicated with this workaround:

when green flag clicked
forever
reset timer
end

when [timer v] > (0)
...

Last edited by SuperDragonStudios (March 16, 2022 19:20:31)

k0d3rrr
Scratcher
1000+ posts

Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS)

Nezon wrote:

Control
delete [all clones v]:: control cap
can be replicated with:
when I receive [delete all clones v] 
delete this clone

Last edited by k0d3rrr (March 11, 2022 01:16:27)

MistyHH
Scratcher
100+ posts

Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS)

I'm early lol

k0d3rrr wrote:

I don't know if this is frequently suggested…
delete [all clones v]:: control cap
can be replicated with:
when I receive [delete all clones v] 
delete this clone
I suggested this before, only to realise someone had suggested it before, but no one said anything.
I've used that workaround a lot!
Here's one, I don't know if it's frequently suggested or not either haha (I don't think so but it is a workaround and might be useful in some cases)
How much (o) is contained in list // This will tell you how many times "o" is in a list. For example, if item 1 was o, item 2 was a, item 3 was o,
// it would return 2
define How much (input) is contained in list
set [How much v] to [0] // This variable is your return (?? What would you call that? lol xD)
set [List Item v] to [1]
repeat (length of [List v] :: list)
set [List Read v] to [1]
repeat (length of (item (List Item) of [List v] :: list))
if <(letter (List Read) of (item (List Item) of [List v] :: list)) = (input)> then
change [How much v] by (1)
end
change [List Read v] by (1)
end
change [List Item v] by (1)
end

3.0 Version
Nezon
Scratcher
1000+ posts

Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS)

ok finally school ended now im going to start working on adding workarounds soon
VeryFamus
Scratcher
1000+ posts

Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS)

Congratulations on the new workaround topic!
1080GBA
Scratcher
500+ posts

Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS)

GUYS WORKAROUNDS OF THE PREVIOUS STICKY ARE ALL HERE
this project is good too

Last edited by 1080GBA (March 11, 2022 00:23:33)

sharkode
Scratcher
1000+ posts

Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS)

Nezon wrote:

Variables and Lists
elif:
if <> then 



else
if <> then

end
end
sharkode
Scratcher
1000+ posts

Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS)

Nezon wrote:

(guess you guys will have to deal with two posts being above this)
Should I ask ST to delete the posts?
7salad3salad
Scratcher
1000+ posts

Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS)

ill repost my thingy
clones reporter:
define create clone of myself
create clone of [myself v]
change [clones v] by [1]

define delete clone
change [clones v] by [-1]
delete this clone
Nezon
Scratcher
1000+ posts

Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS)

sharkode wrote:

Nezon wrote:

(guess you guys will have to deal with two posts being above this)
Should I ask ST to delete the posts?
No
  • Discussion Forums
  • » Suggestions
  • » Workarounds for Frequently Suggested Blocks! (vers. 4) (NOT ACCEPTING CONTRIBUTIONS, LOOKING FOR TAKEOVERS) [RSS Feed]

Powered by DjangoBB