This was originally a topic for blocks from Scratch that Snap doesn't have, but I decided to just allow all workarounds in this list topic.
I didn't make these so if you have one that isn't here, please reply with it so this list can grow.
Each one has a link to where I got the workaround from on the word "Workaround".
Set draggable mode.
workaround by legoman3.14
Go forward layers
workaround by djdolphin
Layer number block
workaround by jguille2
Reply with any workarounds you know!
"Item # of () in list (or index of () in list)"
workaround by legoman3.14
workaround by codeman1044
is a project by snapenilk
the blocks are all work in progress as of 10/19/2019, but I wanted to add them in this list.
"Item Number Of"
workaround by bh on the topic " Item Number Of"
"atan2" (possibly incorrectly made, see
Some sound blocks
Here is a block for making a sound louder or softer:
(values less than 1 soften it, values greater than one make it louder)
Here is a block for reversing a sound:
Item # of () in list (or index of () in list)
Clone # (I couldn't decide between sensing and control)
That's what I have that's useful for now.
Just so you know, this block
can actually be done by just using the set variable command.
Click the dropdown arrow, then hover over the "my>" symbol to open the sub-menu and select "draggable".
credits to Scratch user Jro712
Here's a little demo I made to demonstrate its use:
The whole point of the ATAN2 function is that computing x/y won't work if y=0 (i.e., if you're looking for a point directly above you). So this has to start with an IF to handle that case separately.
Well it seems to work as is, maybe thanks to the less than operator? I honestly don't fully understand why it works since I just replicated the block made by the scratch user lol
Huh. I learn something every day. Atan(infinity) reports 90. Cool.
... So you don't really need the atan2 function at all! It's mainly just getting the angle in the range you want.
I'm not sure I understand. So what would be the other way to point to an xy coordinate that isn't represented by a sprite?
Use a two-item list to represent points (item one is x and item two is y).
Not all of them; just the ones indicated in the project.
I didn't know that the point towards supported list input in snap. Cool.
Yeah we're trying to promote the idea of a point as a semi-primitive semi-abstract data type, so you can have lists of points and so on.
(PS Looks even cooler if you keep the pen up while collecting the vertices.)
Ooooh! That's a really neat project, Brian!!
The catch block in the Iteration, composition library does not resume from the throw block when returned to.
I have programmed that feature.
It does for me. Can you send an example that fails using the library version? Thanks.