Discuss Scratch
- supermarioboss
- Scratcher
39 posts
'Distance to x:(), y:()' block
There is a distance to block in scratch 1.4, but I can't find it in scratch 2.0. Where did it go?
Last edited by supermarioboss (Dec. 14, 2013 00:28:12)
- TimothyLawyer
- Scratcher
1000+ posts
'Distance to x:(), y:()' block
It's in Sensing for a sprite. Fourth block down. There is a distance to block in scratch 1.4, but I can't find it in scratch 2.0. Where did it go?
(distance to [ v])Create a second sprite to measure distance between.
And here is the Wiki entry with the workaround to the block suggested in this thread.
BeetleBlocks, WatercolorBot, and Turtle Art
Hover over a name or label to translate into current language
When Earth was… Purple?
☂️
- mathfreak231
- Scratcher
1000+ posts
'Distance to x:(), y:()' block
Non-math version:
when I receive [get distance v] //in a hidden sprite
go to x: (xpos) y: (ypos)
when gf clicked//in the sprite sensing the distance
. . .
set [xpos v] to (wanted x)
set [ypos v] to (wanted y)
broadcast [get distance v] and wait
say (distance to [Sprite1 v]) //the hidden sprite
i have grown as a person. and ive grown, literally. none of my posts from before 2022 represent me accurately.