Discuss Scratch

4 posts

Extra Direction Blocks

This is just a couple extra blocks that could make programming a little easier.

Let's say I have 2 sprites, One is called ‘Player’ and the other is called ‘Ball’.
I'm thinking if you wanted ‘Ball’ to be thrown by ‘Player’ and the direction the ball goes would be influenced by the direction of ‘Player’

It would be a block like 'copy direction of ' in the motion category.

Another idea is to have direction have it's own variable block so it could fit in operator blocks like
<[] < []>

These are just some ideas of mine to give more options for coding.
1000+ posts

Extra Direction Blocks

I like that idea

"Tradition is just peer pressure from dead people" - [Unknown] :: #0090c0
Current status: [Applied to be a forum helper!] :: #85ffd7
Current unanswered problems: [None] :: #17e67b
60 second rule please be nice to me… please, I said please, please PLEASE!

Will your signature get eaten by kumquats? I have created a program for it that makes it easy!

Press CTRL+SHIFT+DOWN after highlighting a bit of my signature to see the rest of my signature (and keep doing it)

My kumquat protectors: (~˘▾˘)~ ( ಠ ͜ʖರೃ) ( ಠ ͜ʖರೃ) ( ಠ ͜ʖರೃ) (◕‿◕✿) ( ಠ ͜ʖರೃ) ( ಠ ͜ʖರೃ)
Total Power: 34

How to get your avatar into my game

Ok this is the end of my signature, but scroll down some more if you want some nice color hex codes.

Turquoise ish green: #17e67b
Epic nice blue: #0090c0
Cool light blue: #c4ffec, #a3ffe1, #85ffd7
1000+ posts

Extra Direction Blocks

i think you can use the “of” block close to the bottom of the sensing category to get what you want!

edit: by the way, you can put “direction” – or any round block (those are called reporters) – into input slots like in “<”! thats the handy thing about reporters. in the same way, its totally normal to mix any blocks of different categories together, as in what i mentioned above:

when I receive [throw v] // just for example!
point in direction ([direction v] of [Player v])

Last edited by _nix (April 7, 2020 23:13:49)

══ trans autistic lesbian enbydoggirl // harbinger of the waking world, just like you // 16, she/they
sparrows one word to the paragraph // go forth: change the world

100+ posts

Extra Direction Blocks

Do you mean that if the player is pointing at a 90' degree angle then the ball will point at a 90' degree angle? Or do you mean that depending where the player is on the map the ball will face that direction?

For the First one you would do
when green flag clicked
set [Player's Direction] to (direction)
for the player and
when I receive [Match Player's Direction]
point in direction (Player's Direction)
for the ball.

For the second one there is already a block for that:
point towards [Player]

Edit: Oh wait you definitely mean the First one.

Last edited by Wyan100 (April 8, 2020 00:14:17)

“But don't quote me on it!” - Wyan100, 2020

Powered by DjangoBB

Standard | Mobile