Discuss Scratch

ThatOneCoder435
Scratcher
100+ posts

"Testing" blocks

Would be used for testing scripts by outputting a list of options for the boolean:


<output [true v]::grey>
<output [false v]::grey>
<output [random v]::grey>

This would also be done with the ring block:

(output [string]::grey)

Last edited by ThatOneCoder435 (May 31, 2023 23:07:01)

cs3868895
Scratcher
1000+ posts

"Testing" blocks

Not boolean works with the false- Besides you can basically set as true or false if you want in the right condition. Output string however is very VERY much useful, but like there is this block:
PokePika__10339__
Scratcher
500+ posts

"Testing" blocks

What about
output string [letters v]::reporter #baab82
output string [numbers v]::reporter #baab82
And for run without screen refresh blocks
runs instantly?:: boolean #baab82
I believe these would all fall under sensing.

Last edited by PokePika__10339__ (June 1, 2023 00:18:19)

medians
Scratcher
1000+ posts

"Testing" blocks

Well, you could do something like this:
delete (all v) of [values v]
add [1] to [values v]
add [0] to [values v]
if (item (random v) of [values v]) then
...
else
...
end
Or:
if <(pick random (0) to (1)) = [1]> then
...
else
...
end

Last edited by medians (June 1, 2023 00:30:25)

ThatOneCoder435
Scratcher
100+ posts

"Testing" blocks

medians wrote:

Well, you could do something like this:
delete (all v) of [values v]
add [1] to [values v]
add [0] to [values v]
if (item (random v) of [values v]) then // ???
...
else
...
end
you… can't do that
medians
Scratcher
1000+ posts

"Testing" blocks

ThatOneCoder435 wrote:

you… can't do that
You actually can because 3.0 allows you to put that block in boolean inputs without hacked blocks, and to get “random” in 3.0, you can upload/backpack it from a project with the block/an older version of Scratch, or copy and paste “random”/“any” in.
cookieclickerer33
Scratcher
1000+ posts

"Testing" blocks

medians wrote:

ThatOneCoder435 wrote:

you… can't do that
You actually can because 3.0 allows you to put that block in boolean inputs without hacked blocks, and to get “random” in 3.0, you can upload/backpack it from a project with the block/an older version of Scratch, or copy and paste “random”/“any” in.
Who’s gonna tell him
(item (pick random [1] to (length of [list v]::list))of [list v] :: list)
Also why can’t you just do
(join [] [])
<not <>>
<not <not <>>
Or alternatively for the last 2
<[Report false] = []>
<[True] = [true]>

Last edited by cookieclickerer33 (June 1, 2023 16:04:37)

medians
Scratcher
1000+ posts

"Testing" blocks

cookieclickerer33 wrote:

medians wrote:

ThatOneCoder435 wrote:

you… can't do that
You actually can because 3.0 allows you to put that block in boolean inputs without hacked blocks, and to get “random” in 3.0, you can upload/backpack it from a project with the block/an older version of Scratch, or copy and paste “random”/“any” in.
Who’s gonna tell him
(item (pick random [1] to (length of [list v]::list))of [list v] :: list)
Yes I know about that workaround.
Also, I'm referring to the random option, which I think is meant to randomly report true or false.

Powered by DjangoBB