(Like in Hollow Knight that the player need to collect the abillity to dash or double jump)
bool canJump = false;
//input
void Jump()
{
if(!canJump) return;
//otherwise do the jumpstuff
}
//powerup
void PickupJumpBoost()
{
canJump = true;
}
something like this will do it, just have a conditional boolean value that you can toggle, if it’s not met then dont perform the routine (the return
does this)