Discuss Scratch

kittyrainbow_77
New Scratcher
4 posts

How to do simple stuffz

To start ig, use the y block to go up(to go down do - to do up just do )
It looks like this:
change y by (-10) (down) 
Or
change y by (10) (up) 

Uhh if you want it mobile friendly then add an arrow on screen for mobile to click but if not then add this:


when [u] key pressed




Furthur explained of mobile friendly(down):

Click the new sprite button then make an arrow going ⇩
Then add this code:
when this sprite clicked
change y by (-10)


Further explained mobile friendly(up):
Make an sprite that looks like ⇧
when this sprite clicked
change y by (10)

Last edited by kittyrainbow_77 (Oct. 19, 2025 15:06:10)

meat_pie123
Scratcher
16 posts

How to do simple stuffz

What?
kittyrainbow_77
New Scratcher
4 posts

How to do simple stuffz






Last edited by kittyrainbow_77 (Oct. 19, 2025 15:08:21)

meat_pie123
Scratcher
16 posts

How to do simple stuffz

Heres a left-right movement
when green flag clicked
change x by ((<key [right arrow v] pressed?> - <key [left arrow v] pressed?>) * (foo))

Foo = however many blocks you want the player to move
If it's buggy, switch the
<key [right arrow v] pressed?>
and
<key [leftarrow v] pressed?>
meat_pie123
Scratcher
16 posts

How to do simple stuffz

If it's a top-view game, then do
when green flag clicked
change y by ((<key [up arrow v] pressed?> - <key [down arrow v] pressed?>) * (foo))
Also don't forget to wrap a
forever

end
around it.

If its a platformer or something, do the left-right movement code and
when green flag clicked
set [ground v] to [y position of the ground]
set [y velocity v] to [0]
forever
change [y velocity v] by (-1 or how strong you want your gravity to be)
change y by (y velocity)
if <(y position) < (ground)> then
set y to (ground)
end
if <<key [ up arrow v] pressed?> and <(y position) = (ground)>> then
set [y velocity v] to [16 or however high you want the player to jump]
end
end

Last edited by meat_pie123 (Oct. 19, 2025 05:20:34)

Thiago_le_meilleur
Scratcher
1000+ posts

How to do simple stuffz

Welcole to Scratch !

kittyrainbow_77 wrote:

(#1)
To start ig, use the y block to go up(to go down do - to do up just do )

What do you mean ?
kittyrainbow_77
New Scratcher
4 posts

How to do simple stuffz

I ment this i guess.

(To go down
when [u] key pressed
change y by (-10)

I think thats the EASIEST way to do it but its not mobile friendly


To make it mobile friendly maybe do this:

Add a sprite then make it look like: ⬇︎

when this sprite clicked
change y by (-10)

Last edited by kittyrainbow_77 (Oct. 19, 2025 15:10:21)

824488
Scratcher
100+ posts

How to do simple stuffz

kittyrainbow_77 wrote:

To start ig, use the y block to go up(to go down do - to do up just do )
It looks like this:
change y by (-10) (down) 
Or
change y by (10) (up) 

Uhh if you want it mobile friendly then add an arrow on screen for mobile to click but if not then add this:


when [u] key pressed




Furthur explained of mobile friendly(down):

Click the new sprite button then make an arrow going ⇩
Then add this code:
when this sprite clicked
change y by (-10)


Further explained mobile friendly(up):
Make an sprite that looks like ⇧
when this sprite clicked
change y by (10)

If you need help with scripts go to help with scripts forum plz

Powered by DjangoBB