I’m somewhat new with scripting. I’m scripting a jump script and I’m trying to make it so that whenever the player is in the air a variable goes up, and that variable would negatively affect their jump height. So I wrote
void Update ()
{
if (isgrounded && (test>0) == true) ;
{int test =(test - 1);}
if (isgrounded == false);
{int test =(test + 1);}
I realize that even if that worked it would increase/decrease the variable per-frame, rather that per-second, I was going to try to fix that later, maybe by making it a float
if (isgrounded == false);
{float test =(deltaTime*(test + 1));}
any help you can give would be greatly appreciated