Discuss Scratch

minecraftlover283
Scratcher
15 posts

Help with making gravity

Help . I need to make realistic gravity but I don't know how to.:
minecraftlover283
Scratcher
15 posts

Help with making gravity

when green flag clicked
say [Help me please.] for (2) secs
FlayFlyAnimations
Scratcher
100+ posts

Help with making gravity

please share a link


12 y/o • ♂ he/they • luxembourg • intj-t • dec 21

↳ pptbf curator ✪ front paged x7 ✪ fpc #475 ✪ forumer


minecraftlover283
Scratcher
15 posts

Help with making gravity

Share what link
bcs320jn
Scratcher
100+ posts

Help with making gravity

This should work:

when green flag clicked
forever
Gravity
end

define Gravity:
if <not <touching [Ground v] ?>> then
change y by (-1)
end


I mean, it's not totally realistic, but it works.

Last edited by bcs320jn (Nov. 26, 2021 22:05:21)


FlayFlyAnimations
Scratcher
100+ posts

Help with making gravity

share the link of the project


12 y/o • ♂ he/they • luxembourg • intj-t • dec 21

↳ pptbf curator ✪ front paged x7 ✪ fpc #475 ✪ forumer


minecraftlover283
Scratcher
15 posts

Help with making gravity

Ok
minecraftlover283
Scratcher
15 posts

Help with making gravity

Here is the linkhttps://scratch.mit.edu/projects/607553599 and that gravity does not let me jump.
lizarden
Scratcher
26 posts

Help with making gravity

Try this and see:



when
clicked
forever
Gravity
define
Gravity:
if
not
touching
Ground
?
then
change
y
by
-1
Algid-Games
Scratcher
11 posts

Help with making gravity

Here's what I would do:
when green flag clicked
set [ gravity] to [whatever you want]
forever
if <<touching[ground]>and <key [ up arrow] pressed?>> then
change y by (10)


else
if <not<touching [ ground] ?>> then
change y by ((0) - (gravity))
end
end
end

supergamer10000
Scratcher
1000+ posts

Help with making gravity

minecraftlover283 wrote:

when green flag clicked
say [Help me please.] for (2) secs
Tip: Don't use BB Blocks unnecessarily since it causes lag for some users.

Ask yourself, if you were hacked and lost hours, upon hours of work, would you regret not having a strong password that only takes 5 minutes to make?

Is it time to update your password? Here are some tips to make a strong password:

Length: The longer the password, the stronger it is. A password that is at least 12 characters long.
Complexity: Combination of upper and lowercase letters, numbers, and symbols to make it harder to crack.
Uniqueness: Don't use easily guessable information like your name, address, or date of birth. Also, avoid using the same password for multiple accounts.
Passphrases: A phrase made up of random words, numbers, and symbols, as these can be easier to remember but still secure.
Randomness: Use a random password generator to create a unique and unpredictable password.
Regular updates: Regularly change your passwords to stay ahead of potential security threats.

Remember, the goal is to create a password that is strong, unique, and difficult for others to guess.

I would estimate more than 40% of scratchers have passwords that are hard to guess by a human, but easy to guess by a computer. You never know if today would be the day you lose everything.

Even if just one person was saved from losing hours and hours of work, my mission is accomplished.
minecraftlover283
Scratcher
15 posts

Help with making gravity

I still can not jump. It is to fast.
Minoru07
Scratcher
75 posts

Help with making gravity

here is a simple gravity script:
when green flag clicked
set [yvel v] to [0]
forever
set [gravity v] to [gravity strength]
change [yvel v] by (gravity)
change y by (yvel)
if <touching [ground v]> then
change y by ([0]-(yvel)
if <key [up arrow v] pressed> then
set [yvel v] to [jump strength]

else
set [yvel v] to [0]
end
end
end

while it isn't the best gravity script, it works well enough and gets the job done

Last edited by Minoru07 (Nov. 27, 2021 01:17:03)


define scratch
a website that exists
NashwanYT
Scratcher
100+ posts

Help with making gravity

minecraftlover283 wrote:

Here is the linkhttps://scratch.mit.edu/projects/607553599 and that gravity does not let me jump.


Ok so you basically need the player to go higher so I would recommend change y by 50. Also when the ‘player’ jumps it falls down really slow. I fixed that by this code

if <not touching ground> then
change y by ((-4) - (gravity))

end
NashwanYT
Scratcher
100+ posts

Help with making gravity

Also if you set -(high number) it will go all the way to the bottom




#14
minecraftlover283
Scratcher
15 posts

Help with making gravity

Thank you @Minoru07. I liked that one because I can jump.

Powered by DjangoBB