Go to random x and y blocks.

id: 751045

category: Suggestions

posts: 37

This will be a new dropdown for the
go to [ v]
block.
It will look like this:
go to [random x v]
go to [random y v]

And it makes the sprite go to a random x, or y.

Yes, I understand there is a workaround. I also understand the workaround is slightly easy. But the block makes it easier. Look at my chart in my signature (do not use it against me) this block will have a lot of usage. This also makes it a tiny tiny bit easier for newer scratchers who do not think of the workaround straight away.
Would you rather:

Make a block using a 2 block workaround and backpack it? Or, easily have the ability to take it out of the editor as a real
block instead?
Why though?
You can just go to x: (random (-240)(240)) y: (random(-180)(180))

qwertycodechamp90411 wrote:

Why though?
You can just go to x: (random (-240)(240)) y: (random(-180)(180))
There is a workaround for the
go to [random position v]
too. But, look at the workaround chart I have. (in signature.)
medians medians loading

qwertycodechamp90411 wrote:

Why though?
You can just go to x: (random (-240)(240)) y: (random(-180)(180))
There is already a random position option in the go to block.
It could be like this:
set x to (random v)

set y to (random v)
Malicondi Malicondi loading
one block workaround.
go to [random position v]
set y to (... ::grey)


go to [random position v]
set x to (... ::grey)
medians medians loading

Malicondi wrote:

one block workaround.
go to [random position v]
set y to (... ::grey)


go to [random position v]
set x to (... ::grey)
1. You just gave a 2 block workaround..
2. You would have to remember what the previous x or y is.
3. Rare situation, but the pen could be down.
Malicondi Malicondi loading

medians wrote:

1. You just gave a 2 block workaround..
2. You would have to remember what the previous x or y is.
3. Rare situation, but the pen could be down.
1. It only adds one block so I classify it as a on block workaround.
2. In 3.0, it saves the last x or y position as the block you can drag out, or you can use a custom block to save the value or use this:
set x to (pick random (-240) to (240))
and same for y, still only one extra block, and is also ridiculously simple.
3. use method 2.
medians medians loading

Malicondi wrote:

medians wrote:

1. You just gave a 2 block workaround..
2. You would have to remember what the previous x or y is.
3. Rare situation, but the pen could be down.
1. It only adds one block so I classify it as a on block workaround.
2. In 3.0, it saves the last x or y position as the block you can drag out, or you can use a custom block to save the value or use this:
set x to (pick random (-240) to (240))
and same for y, still only one extra block, and is also ridiculously simple.
3. use method 2.
1. That would be a 2 block workaround though because it involves 2 blocks.
2. That's also in 2.0.. and what if you changed the x/y pos? Edit: Do you mean last or current?
3. You didn't have that method though in the post I quoted, so yea..
Malicondi Malicondi loading

medians wrote:

1. That would be a 2 block workaround though because it involves 2 blocks.
2. That's also in 2.0.. and what if you changed the x/y pos? Edit: Do you mean last or current?
3. You didn't have that method though in the post I quoted, so yea..
1. I'm still gonna think of it as an one block workaround, as adding in the block will still require one block.
2. I meant current, but that isn't a problem with the other workaround
3. :shrug:
I think instead of that it would be better like this
[x (... v) y (...v)]
The drop down could have random on it
or it could be
[go to (random v)

Aaliyah_Newlands wrote:

I think instead of that it would be better like this
[x (... v) y (...v)]
The drop down could have random on it
or it could be
[go to (random v)
I felt like it would be better for the
go to [ v]
block, because it also has the random position option, and “random x” and “random y” dropdown options would work with this block.
-stxllxr -stxllxr loading

DangerPuppy10 wrote:

I felt like it would be better for the
go to [ v]
block, because it also has the random position option, and “random x” and “random y” dropdown options would work with this block.
set x to (pick random (-240) to (240))

set y to (pick random (-180) to (180))
What more needs to be said?
medians medians loading

-stxllxr wrote:

DangerPuppy10 wrote:

I felt like it would be better for the
go to [ v]
block, because it also has the random position option, and “random x” and “random y” dropdown options would work with this block.
set x to (pick random (-240) to (240))

set y to (pick random (-180) to (180))
What more needs to be said?
You can also do sth similar for random position, which exists. Also, blocks with simple workarounds still exist:
next costume

next backdrop

(() + ())

(() * ())

change x by ()

change y by ()

DangerPuppy10 wrote:

This will be a new dropdown for the
go to [ v]
block.
It will look like this:
go to [random x v]
go to [random y v]

And it makes the sprite go to a random x, or y.

I bet this is a dupe, I really do. I've lost faith in my topics.
Or you can do this…

-stxllxr wrote:

set x to (pick random (-240) to (240))
set y to (pick random (-180) to (180))
-stxllxr -stxllxr loading

medians wrote:

You can also do sth similar for random position, which exists. Also, blocks with simple workarounds still exist:
The thing is, those are already added and won't be removed any time soon. I'm saying that since there's such a simple workaround for a new block, there is no need to add it. Also chart in OP's siggy
With my powerful ability to type! You shall RISE to the FIRST PAGE!!!!

medians wrote:

qwertycodechamp90411 wrote:

Why though?
You can just go to x: (random (-240)(240)) y: (random(-180)(180))
There is already a random position option in the go to block.
It could be like this:
set x to (random v)

set y to (random v)
A textbox wouldn't work well with a dropdown.
medians medians loading

p-p-p-p-p-p-p-p-p-p- wrote:

medians wrote:

qwertycodechamp90411 wrote:

Why though?
You can just go to x: (random (-240)(240)) y: (random(-180)(180))
There is already a random position option in the go to block.
It could be like this:
set x to (random v)

set y to (random v)
A textbox wouldn't work well with a dropdown.
I am not sure if this is in 3.0, but 2.0 has this:
(item (random v) of [list v])
(item (last v) of [list v])

medians wrote:

p-p-p-p-p-p-p-p-p-p- wrote:

medians wrote:

qwertycodechamp90411 wrote:

Why though?
You can just go to x: (random (-240)(240)) y: (random(-180)(180))
There is already a random position option in the go to block.
It could be like this:
set x to (random v)

set y to (random v)
A textbox wouldn't work well with a dropdown.
I am not sure if this is in 3.0, but 2.0 has this:
(item (random v) of [list v])
(item (last v) of [list v])
I know, but in order to access this you have to do:
(item (join [random] []) of [list v])
so it's more of a hidden easter egg than a feature.
medians medians loading

p-p-p-p-p-p-p-p-p-p- wrote:

medians wrote:

p-p-p-p-p-p-p-p-p-p- wrote:

medians wrote:

qwertycodechamp90411 wrote:

Why though?
You can just go to x: (random (-240)(240)) y: (random(-180)(180))
There is already a random position option in the go to block.
It could be like this:
set x to (random v)

set y to (random v)
A textbox wouldn't work well with a dropdown.
I am not sure if this is in 3.0, but 2.0 has this:
(item (random v) of [list v])
(item (last v) of [list v])
I know, but in order to access this you have to do:
(item (join [random] []) of [list v])
so it's more of a hidden easter egg than a feature.
But it is a feature, well at least it was in 2.0 LOL

Also, I remember this being implemented in the 3.0 beta, not sure if it's in final though.
Anyways, if that isn't the case, then this could be added:
set [x position v] to random ::motion
Or sth, I have no idea LOL, there could be a sprite x/sprite y thing or whatever like this:
set x to [random x v]

set x to [Sprite1 v]
lgrov44 lgrov44 loading
Just because of the workaround/s (see below), no support.
set x to (pick random (-240) to (240))
Exceptions to workaround:
1. When you want to change y. Change “x” to “y” and change the values to “-180” to “180”.

The rest have blocks that does it alrighty.
BUMP
Topic gets sent to the shadow realm*
oops.

bump.

This is on the 2nd page, idk
ahem



set x to (pick random (-240) to (240))
set y to (pick random (-180) to (180))

BananaSlug876 wrote:

ahem



set x to (pick random (-240) to (240))
set y to (pick random (-180) to (180))
ahem

DangerPuppy10 wrote:

Yes, I understand there is a workaround. I also understand the workaround is slightly easy. But the block makes it easier. Look at my chart in my signature (do not use it against me) this block will have a lot of usage. This also makes it a tiny tiny bit easier for newer scratchers who do not think of the workaround straight away.
-stxllxr -stxllxr loading

DangerPuppy10 wrote:

Yes, I understand there is a workaround. I also understand the workaround is slightly easy. But the block makes it easier. Look at my chart in my signature (do not use it against me) this block will have a lot of usage. This also makes it a tiny tiny bit easier for newer scratchers who do not think of the workaround straight away.
Thou shalt use workaround!
(I'm using your chart against you. The workaround is as simple as the block, if not simpler, and scratch is an educational site, not one to hand everything to you. I don't see how figuring out the workaround is much harder than learning how the pick random block works, and i see plent of brand new scratchers know how to use the pick random block.

Edit: also you havn't provided a single time where this would be used, i sure havn't needed to go to a random specific y or x axis but i have needed to go to a random position.)

-stxllxr wrote:

DangerPuppy10 wrote:

Yes, I understand there is a workaround. I also understand the workaround is slightly easy. But the block makes it easier. Look at my chart in my signature (do not use it against me) this block will have a lot of usage. This also makes it a tiny tiny bit easier for newer scratchers who do not think of the workaround straight away.

and scratch is an educational site, not one to hand everything to you.
go to [random position v]
you can do
go to x: (pick random (240) to (-240)) y: (pick random (240) to (-240))

forever

end

you can do
repeat until <[1] = [-1]>
...
end

go to x: (?) y: (?)

you can do

glide (0) secs to x: (?) y: (?)


go to [mouse-pointer v]

you can do

go to x: (mouse x) y: (mouse y)

Clearly, it does.
medians medians loading

-stxllxr wrote:

Edit: also you havn't provided a single time where this would be used, i sure havn't needed to go to a random specific y or x axis but i have needed to go to a random position.)
Someone could be making a game where the player starts at the left, and the obstacles have a random y (kinda like flappy bird), or they start at a random x and fall down or have to go along a line or sth.

medians wrote:

-stxllxr wrote:

Edit: also you havn't provided a single time where this would be used, i sure havn't needed to go to a random specific y or x axis but i have needed to go to a random position.)
Someone could be making a game where the player starts at the left, and the obstacles have a random y (kinda like flappy bird), or they start at a random x and fall down or have to go along a line or sth.
I made a game with rain and snow. And it had to spawn at a random x, it would be easier if I had this block.

Malicondi wrote:

one block workaround.
go to [random position v]
set y to (... ::grey)


go to [random position v]
set x to (... ::grey)
Here's an improvement (More blocks required though.)
set [oldx v] to (x position)
go to [random position v]
set x to (oldx)

set [oldy v] to (y position)
go to [random position v]
set y to (oldy)
Warning: Weird results when used with pen.
GlompyOmega GlompyOmega loading

medians wrote:

p-p-p-p-p-p-p-p-p-p- wrote:

medians wrote:

p-p-p-p-p-p-p-p-p-p- wrote:

medians wrote:

qwertycodechamp90411 wrote:

Why though?
You can just go to x: (random (-240)(240)) y: (random(-180)(180))
There is already a random position option in the go to block.
It could be like this:
set x to (random v)

set y to (random v)
A textbox wouldn't work well with a dropdown.
I am not sure if this is in 3.0, but 2.0 has this:
(item (random v) of [list v])
(item (last v) of [list v])
I know, but in order to access this you have to do:
(item (join [random] []) of [list v])
so it's more of a hidden easter egg than a feature.
But it is a feature, well at least it was in 2.0 LOL

Also, I remember this being implemented in the 3.0 beta, not sure if it's in final though.
Anyways, if that isn't the case, then this could be added:
set [x position v] to random ::motion
Or sth, I have no idea LOL, there could be a sprite x/sprite y thing or whatever like this:
set x to [random x v]

set x to [Sprite1 v]

That doesnt exist…
-stxllxr -stxllxr loading

DangerPuppy10 wrote:

block snip
Those already exist, and they're easier to understand as not every new scratcher will understand the repeat until block.

-stxllxr wrote:

DangerPuppy10 wrote:

block snip
Those already exist, and they're easier to understand as not every new scratcher will understand the repeat until block.
I understand it exists, but again. One block is easier than 2. It may not seem like much, but it would make things a bit faster for newer scratchers, or people who haven't needed to use it much.
Support. Scratch is designed for beginners, it would help a lot for them.

WallydogChoppychop wrote:

Support. Scratch is designed for beginners, it would help a lot for them.
This argument is kind of a double-edged sword, as having Scratchers use blocks that hide away simple implementations doesn't help with learning