So I have a system of gravity that says
if Grav of Player is <
10 add 0.45 to gravity
If Grav is > 0
set player y position to player y position + fallspeed
if Grav is < 0
set player y to player y position - fallspeed
When pressing jump, Grav is set to -10 and so the player goes up.
Now, I want the distance jumped to be determined by how long you hold the jump button.
The maximum will be -10, after which it will go down by itself
I tried doing this by saying
Negate*Repeat while "jump" is being pressed down
String-Action of player is "Jumping"
add 0.45 to grav
This has the effect of stopping the ascent and starting the falling down, but it goes much faster because two forces are pushing it down instead of one.
I tried disabled the original gravity force by having a flag set on when the player is in jumpmode and not pressing jump, and then being set off when he touches the ground, but the flags werent getting turned off properly.
I also tried to set gravity to 0 when you stop pushing the jump button while jumping, but this had the effect of a very jerky mid-air motion where it briefly stops before falling down.
Any ideas on this?