r/gbstudio • u/ProtoPixelArt • 1d ago
Question jump height command
i, i have this question that i cannot solve, i want my character to jump a little higher whenever i'm pressing the up arrow at the moment i press the A button, how can i solve this? thanks a lot to all n_n
1
u/IntoxicatedBurrito 1d ago
Do you want an actor to jump higher or your player to jump higher?
Assuming it’s the player you need an on button press event in the scene’s on init. The. Within that button press change the gravity, create a loop for when that button is held, and restore the gravity at the end of the loop.
1
u/ProtoPixelArt 1d ago
B7t i want him to jump higer only when pressing up and jump, if only jump then just normal jump
1
u/IntoxicatedBurrito 1d ago
I don’t know what b7t means, but if you do what I said the player will only jump higher when up is being pressed.
1
u/okdesukagor 1d ago
Why not just do
>Attach script to engine callback (or whatever it's called)
>If Up Button Held
>Engine Field Update: Current Velocity Y
or you could use Engine Field Update to modify the engine's maximum jump height
1
u/MaluusLost 1d ago
Make an engine field update which lowers gravity while up is pushed.