Discuss Scratch

alebro6DW
Scratcher
100+ posts

Scratch Workaround Guide VII

list of costume names

You can automatically create a list of costume names by starting from the first costume and looping “next costume” until you reach the end and go back to the first, adding the current costume name to a list each time:

delete all of [costume names v] :: list
switch costume to ((0) + (1)) // So you can start at whatever is the first costume!
repeat until <<(costume [number v] :: looks) = [1]> and <(length of [costume names v]) > [0]>>
add (costume [name v] :: looks) to [costume names v]
next costume
end
or
when green flag clicked
forever
if <not <[costume names v] contains (costume name :: looks) ?>> then
add (costume name :: looks) to [costume names v]
end
end
it is also doable with backdrops.

Last edited by alebro6DW (Jan. 5, 2024 19:26:29)

zeer121
Scratcher
94 posts

Scratch Workaround Guide VII

Script of strings
You can automatically create a script of strings:
when green flag clicked
string [Hello]

define string [string]
say (string) for (2) secs

Last edited by zeer121 (Jan. 6, 2024 06:57:43)

1080GBA
Scratcher
500+ posts

Scratch Workaround Guide VII

alebro6DW wrote:

(#281)
list of costume names

You can automatically create a list of costume names by starting from the first costume and looping “next costume” until you reach the end and go back to the first, adding the current costume name to a list each time:

delete all of [costume names v] :: list
switch costume to ((0) + (1)) // So you can start at whatever is the first costume!
repeat until <<(costume [number v] :: looks) = [1]> and <(length of [costume names v]) > [0]>>
add (costume [name v] :: looks) to [costume names v]
next costume
end
or
when green flag clicked
forever
if <not <[costume names v] contains (costume name :: looks) ?>> then
add (costume name :: looks) to [costume names v]
end
end
it is also doable with backdrops.
i think u forgot the next costume block
NOO_I_LIKE_2023
Scratcher
12 posts

Scratch Workaround Guide VII

alebro6DW wrote:

list of costume names

You can automatically create a list of costume names by starting from the first costume and looping “next costume” until you reach the end and go back to the first, adding the current costume name to a list each time:

delete all of [costume names v] :: list
switch costume to ((0) + (1)) // So you can start at whatever is the first costume!
repeat until <<(costume [number v] :: looks) = [1]> and <(length of [costume names v]) > [0]>>
add (costume [name v] :: looks) to [costume names v]
next costume
end
or
when green flag clicked
forever
if <not <[costume names v] contains (costume name :: looks) ?>> then
add (costume name :: looks) to [costume names v]
end
end
it is also doable with backdrops.
fixed
RethinkingVoxels
Scratcher
1000+ posts

Scratch Workaround Guide VII

There is a better way to do “previous costume.” Just do this!
1. Create a new costume named “previous costume” (has to be like that)
2. Do
switch costume to [previous costume v]
3. Delete the “previous costume” costume.
qwerty_wasd_gone
Scratcher
1000+ posts

Scratch Workaround Guide VII

RethinkingVoxels wrote:

There is a better way to do “previous costume.” Just do this!
1. Create a new costume named “previous costume” (has to be like that)
2. Do
switch costume to [previous costume v]
3. Delete the “previous costume” costume.
That does work, I did it before.
HectorThePlayer
Scratcher
2 posts

Scratch Workaround Guide VII

pls gimmie a pen text engine block for me i just like it
HectorThePlayer
Scratcher
2 posts

Scratch Workaround Guide VII

that's all for my games i told you! but my block is:
define Touch Tile with your (x ) (y ) (width ) (height ) to touch (tile x ) (tile y ) (tile width ) (tile height )
MythosLore
Scratcher
1000+ posts

Scratch Workaround Guide VII

I'm interested in taking over the directory. I've been active on the forums for a while, especially with Questions about Scratch (as well as Suggestions), and I have been doing projects for a while using the offline editor (although I haven't completed very many of them). I recently created my own platformer engine, which completely works aside from the fact that the player moves like it's skating on ice.

Here are some helpful posts I made within the past three months:
https://scratch-mit-edu.ezproxyberklee.flo.org/discuss/topic/728833/?page=1#post-7688857
https://scratch-mit-edu.ezproxyberklee.flo.org/discuss/topic/734461/?page=1#post-7741477
https://scratch-mit-edu.ezproxyberklee.flo.org/discuss/topic/739339/?page=1#post-7784613
https://scratch-mit-edu.ezproxyberklee.flo.org/discuss/topic/741599/?page=1#post-7805640
Malicondi
Scratcher
1000+ posts

Scratch Workaround Guide VII

_nix wrote:

define rotate (degrees) degrees around (sprite)
set [distance v] to (distance to (sprite))
set [direction before custom block ran v] to (direction)
point towards (sprite)
set x to (([x position v] of (sprite)) + ((distance :: variables) * ([sin v] of (((direction) + (180)) + (degrees)))
set y to (([y position v] of (sprite)) + ((distance :: variables) * ([cos v] of (((direction) + (180)) + (degrees)))
point in direction (direction before custom block ran)
for this one, i have a different approach for this below:
define rotate around x:(x) y:(y) direction:(dir) radius:(r) :: 
set [rotated x v] to (((r) * ([sin v] of (dir))) - (((r) * ([cos v] of (dir))) + (x))
set [rotated y v] to (((r) * ([cos v] of (dir))) - (((r) * ([sin v] of (dir))) + (y))
go to x:(rotated x) y: (rotated y)
x and y is the spot you want to rotate around, or the center point, radius is the width of the circle, dir is the direction
you can use it like this to rotate around a sprite:
rotate around x: ([x position v] of (sprite 1 v)) y: ([y position v] of (sprite 1 v)) direction:(45) radius:(50) :: custom
radius and direction wouldn't matter, i just chose some random values
trig go brr

Last edited by Malicondi (Feb. 19, 2024 21:45:39)

_nix
Scratcher
1000+ posts

Scratch Workaround Guide VII

MythosLore wrote:

I'm interested in taking over the directory. I've been active on the forums for a while, especially with Questions about Scratch (as well as Suggestions), and I have been doing projects for a while using the offline editor (although I haven't completed very many of them).
Alright, thank you! You're good to go!

Leave a link to your new thread in a post here and I'll update the front post here to direct visitors to yours. You can report your first post and write to get it stickied, including a link to this post — you're chosen to have the next thread stickied.

Please have it ready and linked in a post here (or on our profile) within the next month (by March 24th), because last time the person who we gave sticky permissions to didn't end up getting back. (No shade at all to them, it's still on us for leaving the thread unmanaged for months afterwards.) If for any reason you can't or have decided not to run the next guide, that's perfectly fine, just let us know, and we'll most likely (and quickly) open the thread to takeovers again.

And, please remember to review and respect everything under the “Licensing credits / content reuse” section. That includes bringing over the full notice about making sure credits continue to be brought forward when you open your guide for takeover, and when the next person opens theirs for takeover, and so on.

Thanks again! Looking forward to seeing what you do with your guide.
MythosLore
Scratcher
1000+ posts

Scratch Workaround Guide VII

_nix wrote:

snip
You can reopen applications again. I don't want to do it anymore.
_nix
Scratcher
1000+ posts

Scratch Workaround Guide VII

MythosLore wrote:

_nix wrote:

snip
You can reopen applications again. I don't want to do it anymore.
Alright, thanks for letting me know – appreciate it! And good luck with the QaS directory too.

We haven't decided if we're reopening applications again just yet. We don't want to let the thread just linger, so might start digging through the backlog of posts here ourselves pretty soon. Not decided on that, though, but we'll see, sooner than later!!
WsDanzel
Scratcher
47 posts

Scratch Workaround Guide VII

this is a workaround pls don't report this

Block:
delete timer :: sensing

Workaround:
when green flag clicked
remove timer

define remove timer
set [timer v] to (0)
hide variable [timer v]

You need to create a variable called timer

Last edited by WsDanzel (April 22, 2024 09:27:54)

zaidputrajaya
Scratcher
27 posts

Scratch Workaround Guide VII

(foo)[scratchblocks]
when green flag clicked
forever
turn cw () degrees
end
[/scratchblocks]

Last edited by zaidputrajaya (March 28, 2024 12:58:17)

1080GBA
Scratcher
500+ posts

Scratch Workaround Guide VII

Binary to decimal
//You have to know this
([1]*(join[0b][010101010111]))
its the binary version of the 0xFFFFFF trick
Octal (base 8) to decimal
//You have to know this
([1]*(join[0o][010101010111]))

Last edited by 1080GBA (April 11, 2024 14:13:03)

WsDanzel
Scratcher
47 posts

Scratch Workaround Guide VII

1080GBA wrote:

Binary to decimal
//You have to know this
([1]*(join[0b][010101010111]))
its the binary version of the 0xFFFFFF trick
Octal (base 8) to decimal
//You have to know this
([1]*(join[0o][010101010111]))
Thank you for the tutorial
Lurdumoloch
Scratcher
5 posts

Scratch Workaround Guide VII

Hallo here are a lot Workarounds : https://scrat
ch.mit.edu/projects/1004920587 :)
[/workarounds]
jmdzti_0-0
Scratcher
500+ posts

Scratch Workaround Guide VII

Here are some workarounds for the sounds category (since it's opened on the editor it doesn't count as a view)

Last edited by jmdzti_0-0 (April 27, 2024 13:08:55)

jmdzti_0-0
Scratcher
500+ posts

Scratch Workaround Guide VII

(Please ignore this, I acidentally posted twice)

Last edited by jmdzti_0-0 (April 27, 2024 13:08:17)

Powered by DjangoBB