Discuss Scratch

ZippingBobcaat49
Scratcher
38 posts

"Pick Random () To () With Seed ()" Block

I've made sure to reread TOLORS and go through 100 pages of suggestions before posting this; I don't think this has been proposed (At least since September). It looks something like this:

(pick random (1) to (10) with seed (28977691396):: operators)

Leaving the seed blank will use a random seed. If this is a duplicate, link the original here, please!
ZippingBobcaat49
Scratcher
38 posts

"Pick Random () To () With Seed ()" Block

I thought there would be at least one reply
-EmeraldThunder-
Scratcher
1000+ posts

"Pick Random () To () With Seed ()" Block

Support, I can see a seeded random function being useful in things such a level generation or projects that use random noise to create patterns. It is also annoyingly tedious to replicate.
lolecksdeehaha
Scratcher
1000+ posts

"Pick Random () To () With Seed ()" Block

Support! Seeds are very annoying to use otherwise.
hiPeeps124816
Scratcher
500+ posts

"Pick Random () To () With Seed ()" Block

No support, scratch wasnt meant to be a perlin noise engine
and people like 9 year old me wouldnt know what seeds were or ask friends and accept a lie from them
besides, theres this
define random with seed (min)(max)(seed)
set [lcg v] to ((((1664525) * (seed)) + (1013904223)) mod (1024))
set [random v] to ((min) + (((max) - (min)) * ((lcg) / (1024))))
dave-alt-4
Scratcher
1000+ posts

"Pick Random () To () With Seed ()" Block

hiPeeps124816 wrote:

No support, scratch wasnt meant to be a perlin noise engine
and people like 9 year old me wouldnt know what seeds were or ask friends and accept a lie from them
besides, theres this
define random with seed (min)(max)(seed)
set [lcg v] to ((((1664525) * (seed)) + (1013904223)) mod (1024))
set [random v] to ((min) + (((max) - (min)) * ((lcg) / (1024))))

right…. that workaround isn't that easy now is it?
JJ09012011
Scratcher
100+ posts

"Pick Random () To () With Seed ()" Block

Support, New Scratchers might not know the workaround.
-EmeraldThunder-
Scratcher
1000+ posts

"Pick Random () To () With Seed ()" Block

hiPeeps124816 wrote:

No support, scratch wasnt meant to be a perlin noise engine
This wouldn't make scratch a noise engine, it would just be another valuble block for game dev and wouldn't transform scratch into something it's not.
ZippingBobcaat49
Scratcher
38 posts

"Pick Random () To () With Seed ()" Block

JJ09012011 wrote:

Support, New Scratchers might not know the workaround.
Fun fact: I didn't know the workaround myself until now
Queer_Royalty
Scratcher
1000+ posts

"Pick Random () To () With Seed ()" Block

nothing like a bunch of smart people to make you %100 sure that you're stupid What is a seed?
ZippingBobcaat49
Scratcher
38 posts

"Pick Random () To () With Seed ()" Block

Queer_Royalty wrote:

nothing like a bunch of smart people to make you %100 sure that you're stupid What is a seed?
A seed is a number that is used to determine the outcome of a random number generator.
ZippingBobcaat49
Scratcher
38 posts

"Pick Random () To () With Seed ()" Block

bump
ZippingBobcaat49
Scratcher
38 posts

"Pick Random () To () With Seed ()" Block

bump II: attack of the forum raiders
CooperFan5
Scratcher
55 posts

"Pick Random () To () With Seed ()" Block

JJ09012011 wrote:

Support, New Scratchers might not know the workaround.
Geotale
Scratcher
100+ posts

"Pick Random () To () With Seed ()" Block

ZippingBobcaat49 wrote:

I've made sure to reread TOLORS and go through 100 pages of suggestions before posting this; I don't think this has been proposed (At least since September). It looks something like this:

(pick random (1) to (10) with seed (28977691396):: operators)

Leaving the seed blank will use a random seed. If this is a duplicate, link the original here, please!
Why should this be added, if you don't mind?
Queer_Royalty
Scratcher
1000+ posts

"Pick Random () To () With Seed ()" Block

my parents let me look it up, and i think i sort of understand, but i am still stupid and hopeless at programming, so i don't quite get it. please let me know if there's anything factually incorrect in this post.

support, would be good for debugging, but i think there should be too separate blocks;
(pick random (1) to (10))
((pick random (1) to (10) with seed (638264788)) ::operators
so people like me don't get confuzzled.

Last edited by Queer_Royalty (Nov. 24, 2021 23:58:39)

DinoMaster20
Scratcher
1000+ posts

"Pick Random () To () With Seed ()" Block

Ok, I'm dumb.

What does this do? What's the blocks overall function?
VeryFamus
Scratcher
1000+ posts

"Pick Random () To () With Seed ()" Block

No support, if you want to pick a random number between those values, that normally means you want in random, not already determined. And besides, what would happen if you put the
(pick random (1) to (10) with seed [] :: operators)
Like this:
(pick random (1) to (10) with seed (pick random (1) to (10) with seed [] :: operators) :: operators)

Last edited by VeryFamus (Nov. 25, 2021 00:07:00)

ZippingBobcaat49
Scratcher
38 posts

"Pick Random () To () With Seed ()" Block

VeryFamus wrote:

No support, if you want to pick a random number between those values, that normally means you want in random, not already determined. And besides, what would happen if you put the
(pick random (1) to (10) with seed [] :: operators)
Like this:
(pick random (1) to (10) with seed (pick random (1) to (10) with seed [] :: operators) :: operators)
It would do exactly what it says it does, generate a random number which is used as the seed for the next one.
AlfabetonsOfficial
Scratcher
100+ posts

"Pick Random () To () With Seed ()" Block

No support, Scratch is used by 8-12 year olds, and I bet more than 99% of them would be confused on what this does. Especially the word “seed”.

Powered by DjangoBB