So right now im making a mario game and I'm using yVelocity variable to simulate gravity. The problem though is when i jump on a brick the gravity pulls him through it or if I ever get him to stay on top he cant jump off of it for some reason? Im somehwat new to scratch but i have the basics down I just cant figure this out. Sry that this isnt very descriptive.
Offline
Rafeki wrote:
So right now im making a mario game and I'm using yVelocity variable to simulate gravity. The problem though is when i jump on a brick the gravity pulls him through it or if I ever get him to stay on top he cant jump off of it for some reason? Im somehwat new to scratch but i have the basics down I just cant figure this out. Sry that this isnt very descriptive.
Make it so that when the player is not touching the floor the Y velocity dosent change.
Offline
fillergames wrote:
Rafeki wrote:
So right now im making a mario game and I'm using yVelocity variable to simulate gravity. The problem though is when i jump on a brick the gravity pulls him through it or if I ever get him to stay on top he cant jump off of it for some reason? Im somehwat new to scratch but i have the basics down I just cant figure this out. Sry that this isnt very descriptive.
Make it so that when the player is not touching the floor the Y velocity dosent change.
Or try making yvelocity change by 1 when it hits the floor.
Offline
Try this.
when gf clicked things that come before 'forever' forever whatever scripts you have for moving around if <touching color [#000000]?> if <key [up arrow v] pressed?> jumping scripts go here else change [yv v] by (1) end else gravity scripts go here
Offline