Discuss Scratch
- Discussion Forums
- » Suggestions
- » a [point towards x( ) y( ) block
- MTM828
-
500+ posts
a [point towards x( ) y( ) block
Bruh, saying this can be programmed is like saying:
set [varName v] to [0]Support, speeds up coding GREATLY.
Isn't necessary, you can do: :: operators
change [varName v] by ((varname) * [-1]
Or vice versa: :: operators
Set [varName v] to ((varName) + (1))
Last edited by MTM828 (Sept. 8, 2020 12:43:23)
- 4mat
-
100+ posts
a [point towards x( ) y( ) block
Can this be closed please? It's rejected.
- fdreerf
-
1000+ posts
a [point towards x( ) y( ) block
citation needed Can this be closed please? It's rejected.
- 4mat
-
100+ posts
a [point towards x( ) y( ) block
Ah I could swear it is rejected but I probably confused TOLORS with TWTFSB (bruh that's a neat abbreviation).citation needed Can this be closed please? It's rejected.
Last edited by 4mat (Sept. 8, 2020 13:29:20)
- Paddle2See
-
1000+ posts
a [point towards x( ) y( ) block
Not rejected that I am aware of. Can this be closed please? It's rejected.
- donotforgetmycode
-
1000+ posts
a [point towards x( ) y( ) block
what's TWTFSB?Ah I could swear it is rejected but I probably confused TOLORS with TWTFSB (bruh that's a neat abbreviation).citation needed Can this be closed please? It's rejected.
- a_guy_who_made_games
-
31 posts
a [point towards x( ) y( ) block
You can use this script.
define get direction (x) (y)
set [direction v] to ([atan v] of ((x) / (x)))::green
if <(y) < (0)> then
change [direction v] by (180)
end
- 4mat
-
100+ posts
a [point towards x( ) y( ) block
The Workarounds To Frequently Suggested Blocks TWTFSB?
- donotforgetmycode
-
1000+ posts
a [point towards x( ) y( ) block
thanks The Workarounds To Frequently Suggested Blocks
- p-p-p-p-p-p-p-p-p-p-
-
1000+ posts
a [point towards x( ) y( ) block
Please don't blockspam. This is off topic and you can suggest each one in a new forum. These are Please add these ideas, Scrachteam.really easy to replace. If you need help to find the workaround, let me know and I can provide assistance! Thank you and scratch on!<color [#ceb767] is touching [sprite1 v] ?>Color variables?
when [my variable v] > (10)
when [size v] > (10)set [color v] to [#72c08b]That is supposed to be like the forever block.
set pen outline to (10)
repeat () or until <>
end
- sportfan999
-
1000+ posts
a [point towards x( ) y( ) block
Going to make it with real Scratchblocks: You can use trigonometry to replicate this: so if I want to point toward x:40 y:60Sorry if that's a bit off.point in direction (([atan] of ((((60) - (y position)) / ((40) - (x position))))) - (90))
point in direction ([atan v] of ((((60)-(y position))/((40)-(x position)))-(90))
- Zoomer_X
-
500+ posts
a [point towards x( ) y( ) block
when this event happened :: events hat(I copied from the Workarounds to Frequently Asked Suggestions)
set [deltax v] to ((WantedX) - (x position))
set [deltay v] to ((WantedY) - (y position))
if <not <(deltay) = [0]>> then
if <(deltay) > (0)> then
point in direction ([atan v] of ((deltax)/(deltay))
else
point in direction ([atan v] of (((deltax)/(deltay)) + (180)))
end
else
if ((deltax) > (0)) then
point in direction (90)
else
point in direction (-90)
end
Last edited by Zoomer_X (Oct. 26, 2020 17:39:59)
- portalpower
-
1000+ posts
a [point towards x( ) y( ) block
not so easy workaround
point in direction (([atan v] of (((x) - (x position)) / ((y) - (y position)))) + ((180) * < ((y) - (y position)) < (0) >))
- ScratchCatHELLO
-
1000+ posts
a [point towards x( ) y( ) block
You can either use one of the workarounds or add an empty sprite, put that sprite where you want to point, and make the sprite that would have the point to block in it point to the empty sprite.
- Genius398
-
44 posts
a [point towards x( ) y( ) block
AgreedYou're absolutely right, it is possible to program it yourself, but if you don't know trig, or you are new to scratch, it would be very hard.I mean that it is possible to program it yourself.What do you mean? No support. Workaroundable. Look them up.
- the2000
-
1000+ posts
a [point towards x( ) y( ) block
Support, Scratch has had a lot of blocks with two variants for coordinates and coordinates of another objects (i.e go to, glide to), so I don't see why the point towards block should be any different.
- DentInTheWall
-
32 posts
a [point towards x( ) y( ) block
dupe and in the official workarounds list
- gosoccerboy5
-
1000+ posts
a [point towards x( ) y( ) block
Oops. I think this is the earliest such topic (I encourage you to find an earlier one), and the official workarounds list says here: dupe and in the official workarounds list
So just because it's in that list doesn't mean it shouldn't or can't be added. In the suggestions forum, you might have a suggestion for a block. But, if it gets rejected, have no fear! On this topic, you can easily ask for workarounds for block. Still don't get it? Confused as to why you can't just get the block added? @Za-Chary is here to explain that to you.Well, there's a couple reasons this is a useful list.
The “previous costume” block is not rejected, but it just hasn't been added to the editor. For those looking for something that works the same as a “previous costume” block, they can look at this topic for a workaround so they can effectively code their project.
The “when stop sign clicked” block is rejected, so we will not be adding it (and in this case, yes, there is something “wrong” with implementing the suggestion). Some Scratchers still might like to simulate its effects, however, so they can look at this topic for a workaround so they can accomplish what the block would do.
The purpose of this topic isn't to tell you to “stick” to workarounds — it's to provide you workarounds for blocks that you might be looking to use. It will likely save you time by using the workaround instead of waiting for us to implement a block.
- SpinningCube
-
100+ posts
a [point towards x( ) y( ) block
Support. I would find many uses for this block, and I always prefer an official block to a tedious workaround.
Last edited by SpinningCube (Feb. 3, 2021 18:26:53)