Discuss Scratch

Kronix_
Scratcher
39 posts

Bring back the "point away from edge" motion block

While scrolling through the list of obsolete blocks on the Scratch Wiki, I saw a block that was removed in an early 2005 version of Scratch, known as “point away from edge”. This was a motion block that would point the sprite away from the closest edge. The wiki had also put a possible use for the block, involving the pen, which follows:
when green flag clicked
point in direction (140)
clear
pen down
forever
move (pick random (1) to (100)) steps
point away from edge :: motion
Yes, there is a workaround for this, but it is very tedious. There's literally 12 “if” blocks in the workaround, and the shorter version is still really hard to pull off. The script above works for creating patterns with the pen. If I'm given a reasonable explanation for this, than I understand, but currently I don't see a reason for why this was removed. Also, after quickly looking through another topic regarding the block, I had seen a workaround with a somewhat similar effect, but doesn't exactly reach the effect that the block really does. Here's the workaround that was listed:
when green flag clicked
forever
if <touching [edge v]?> then
turn left (180) degrees
The obsolete block points away from the nearest edge, no matter what it appears. Here, in the workaround, it only points away from the edge when it's touching the edge. I had also seen in the post that the block was deemed “too glitchy”, but I have yet to see a source for this.

Last edited by Kronix_ (Jan. 15, 2024 18:26:32)

cookieclickerer33
Scratcher
1000+ posts

Bring back the "point away from edge" motion block

point towards [edge v]

would be better, because you could then do

point towards [edge v]
turn cw (180) degrees

to remake this block


it also means it wont need to be its own block wich is a bigg plus
k7e
Scratcher
1000+ posts

Bring back the "point away from edge" motion block

cookieclickerer33 wrote:

point towards [edge v]

would be better, because you could then do

point towards [edge v]
turn cw (180) degrees

to remake this block


it also means it wont need to be its own block wich is a bigg plus
The problem with this is that the edge goes around the entire project – so technically any direction is pointing towards the edge.
Kronix_
Scratcher
39 posts

Bring back the "point away from edge" motion block

-deleted-

Last edited by Kronix_ (Jan. 15, 2024 03:11:51)

Kronix_
Scratcher
39 posts

Bring back the "point away from edge" motion block

cookieclickerer33 wrote:

point towards [edge v]

would be better, because you could then do

point towards [edge v]
turn cw (180) degrees

to remake this block


it also means it wont need to be its own block wich is a bigg plus
As k7e said, the problem is that the “edge” mentioned is surrounding the project, “nearest edge” could work well, as the edge is surrounding the project, therefore any direction could be labeled as the edge.
Kronix_
Scratcher
39 posts

Bring back the "point away from edge" motion block

bump <topic :: custom> :: hat extension
RethinkingVoxels
Scratcher
1000+ posts

Bring back the "point away from edge" motion block

Kronix_ wrote:

cookieclickerer33 wrote:

point towards [edge v]

would be better, because you could then do

point towards [edge v]
turn cw (180) degrees

to remake this block


it also means it wont need to be its own block wich is a bigg plus
As k7e said, the problem is that the “edge” mentioned is surrounding the project, “nearest edge” could work well, as the edge is surrounding the project, therefore any direction could be labeled as the edge.
But wouldn't any direction be pointing away from edge?
Kronix_
Scratcher
39 posts

Bring back the "point away from edge" motion block

RethinkingVoxels wrote:

Kronix_ wrote:

cookieclickerer33 wrote:

point towards [edge v]

would be better, because you could then do

point towards [edge v]
turn cw (180) degrees

to remake this block


it also means it wont need to be its own block wich is a bigg plus
As k7e said, the problem is that the “edge” mentioned is surrounding the project, “nearest edge” could work well, as the edge is surrounding the project, therefore any direction could be labeled as the edge.
But wouldn't any direction be pointing away from edge?
No. I said “nearest edge”. Which means part of the edge nearest to the sprite. I might've worded it bad, looking back at my previous post.
cookieclickerer33
Scratcher
1000+ posts

Bring back the "point away from edge" motion block

k7e wrote:

cookieclickerer33 wrote:

point towards [edge v]

would be better, because you could then do

point towards [edge v]
turn cw (180) degrees

to remake this block


it also means it wont need to be its own block wich is a bigg plus
The problem with this is that the edge goes around the entire project – so technically any direction is pointing towards the edge.
it would just point at the nearest stage edge point to the sprite
Kronix_
Scratcher
39 posts

Bring back the "point away from edge" motion block

cookieclickerer33 wrote:

k7e wrote:

cookieclickerer33 wrote:

point towards [edge v]

would be better, because you could then do

point towards [edge v]
turn cw (180) degrees

to remake this block


it also means it wont need to be its own block wich is a bigg plus
The problem with this is that the edge goes around the entire project – so technically any direction is pointing towards the edge.
it would just point at the nearest stage edge point to the sprite
Ah. So, what you meant was that it would point to the nearest edge, and then point away? If so, it should be labeled as
point towards [nearest edge v]
, to get rid of any confusion. Good idea, as it won't have to be its own block.
Za-Chary
Scratcher
1000+ posts

Bring back the "point away from edge" motion block

What if there is more than one “nearest edge”? Suppose the sprite is at x:0, y:0. In which direction should it point?
cookieclickerer33
Scratcher
1000+ posts

Bring back the "point away from edge" motion block

i would have made it nearest edge but that would be inconsistant with the way the engine works

the “edge” is somewhat hardcoded to be you know, only the edge selector

you cant have something use the edge of the screen without the selected option be “edge” as the sprite target in the scratch engine
Kronix_
Scratcher
39 posts

Bring back the "point away from edge" motion block

Za-Chary wrote:

What if there is more than one “nearest edge”? Suppose the sprite is at x:0, y:0. In which direction should it point?
fair point there, I'm not sure. Perhaps the block wouldn't do anything in that case? Idk.

cookieclickerer33 wrote:

i would have made it nearest edge but that would be inconsistant with the way the engine works

the “edge” is somewhat hardcoded to be you know, only the edge selector

you cant have something use the edge of the screen without the selected option be “edge” as the sprite target in the scratch engine
Yeah, also fair point.

Last edited by Kronix_ (Jan. 15, 2024 18:25:37)

cookieclickerer33
Scratcher
1000+ posts

Bring back the "point away from edge" motion block

Kronix_ wrote:

cookieclickerer33 wrote:

k7e wrote:

cookieclickerer33 wrote:

point towards [edge v]

would be better, because you could then do

point towards [edge v]
turn cw (180) degrees

to remake this block


it also means it wont need to be its own block wich is a bigg plus
The problem with this is that the edge goes around the entire project – so technically any direction is pointing towards the edge.
it would just point at the nearest stage edge point to the sprite
Ah. So, what you meant was that it would point to the nearest edge, and then point away? If so, it should be labeled as
point towards [nearest edge v]
, to get rid of any confusion. Good idea, as it won't have to be its own block.
no it would point twards the nearest edge, in order to remake this block you could simply make the sprite turn arruond after
Kronix_
Scratcher
39 posts

Bring back the "point away from edge" motion block

cookieclickerer33 wrote:

-snip-
wasn't that kind of what i was saying though
cookieclickerer33
Scratcher
1000+ posts

Bring back the "point away from edge" motion block

Za-Chary wrote:

What if there is more than one “nearest edge”? Suppose the sprite is at x:0, y:0. In which direction should it point?
the stage is a rectangle so it would either point directly up or down

if theres more than 1 nearest edge then the sprite would point at the spot between the 2 to attempt to get as acccurate as possible
cookieclickerer33
Scratcher
1000+ posts

Bring back the "point away from edge" motion block

hold on wait, woudnt just pointing twards a sprite at 0,0 and then turning arround always point you twards the nearest edge?

https://scratch.mit.edu/projects/951271013/

Last edited by cookieclickerer33 (Jan. 15, 2024 21:10:00)

Kronix_
Scratcher
39 posts

Bring back the "point away from edge" motion block

BUMP
Kronix_
Scratcher
39 posts

Bring back the "point away from edge" motion block

Bump
Kronix_
Scratcher
39 posts

Bring back the "point away from edge" motion block

bump

Powered by DjangoBB