Discuss Scratch

Wei-ern_520
Scratcher
500+ posts

What does the go to block do?

We all know how there is a
go to [random position v]
block, but the mysterious thing is, you can put a reporter block in there, no matter what you put, let it be
go to (join[random position][])
or
go to (mouse x)
or
go to (join(45)(23))

So what does it do? Why does it allow a reporter to be inserted?

Last edited by Wei-ern_520 (Sept. 24, 2021 11:40:13)

AwezomeXD
Scratcher
100+ posts

What does the go to block do?

I never thought about this before. Seems like most of the reporter blocks don't do anything when you put them into the block, but I did find out something cool you can do with a variable
go to (sprite)
If you set the variable to the name of another sprite in the project, the “go to” block will actually work. There might be a few uses for that but idk
the_electro_bros
Scratcher
100+ posts

What does the go to block do?

Wei-ern_520 wrote:

We all know how there is a
go to [random position v]
block, but the mysterious thing is, you can put a reporter block in there, no matter what you put, let it be
go to (join[random position][])
or
go to (mouse x)
or
go to (join(45)(23))

So what does it do? Why does it allow a reporter to be inserted?
because of variables, I can make objects go to different things using:
go to [(Sprite to go to at the moment) v]
Using
go to (join[Code Part 1 ][Code part 2])
we can join save codes

Last edited by the_electro_bros (Sept. 24, 2021 16:28:46)

han614698
Scratcher
1000+ posts

What does the go to block do?

They do nothing - you must have something from one of the existing dropdowns in that block.
NMario84
Scratcher
1000+ posts

What does the go to block do?

Doing this:
go to (Sprite)

Is literally the same thing as doing this (by default):
go to [Sprite v]

So I wouldn't see any purpose of adding a variable there.
Hello3Rules
Scratcher
100+ posts

What does the go to block do?

A ‘Go to’ block helps us to make a sprite go to a sprite or random possition. I hope you get your answer ^_^
Wei-ern_520
Scratcher
500+ posts

What does the go to block do?

NMario84 wrote:

Doing this:
go to (Sprite)

Is literally the same thing as doing this (by default):
go to [Sprite v]

So I wouldn't see any purpose of adding a variable there.
It works if the variable value is the same as a sprite name. (After that I tried it).
NMario84
Scratcher
1000+ posts

What does the go to block do?

Yea, the variable value has to be named as the sprite its going to align to. So what is the point? It can't align to itself, so may as well use the 2nd option I put below in my previous post.
sharkode
Scratcher
1000+ posts

What does the go to block do?

You can do something like this instead:
set x to (mouse x)

Or like this:
go to x: (mouse x) y: (0)

Last edited by sharkode (Sept. 26, 2021 21:45:33)

D-ScratchNinja
Scratcher
1000+ posts

What does the go to block do?

Maybe if you wanted to save some if-then statements and had numbered sprites, then using reporters would be useful?
go to (join [Sprite] (my variable))

Powered by DjangoBB