J
Jun Bird
Guest
I'm making a game where the player has to press a certain button in order to activate the main mechanic. He can hold it down until the stamina bar is completely empty. Keep also in mind that this bar automatically starts recharging itself as soon as the button is released or once the stamina reaches 0.
My problem is, if the stamina reaches 0 and the player is still pressing the button, this is what happens.
The lack of stamina prevents the main mechanic from being activated just for a really brief moment, because it instantly refills, so the main mechanic can be used again for an instant. immediately afterwards, the bar empties out again and so on, until the player releases the button
So, how can I cancel the input so that the player will have to press the button again when he wastes all the stamina at once?
My problem is, if the stamina reaches 0 and the player is still pressing the button, this is what happens.
The lack of stamina prevents the main mechanic from being activated just for a really brief moment, because it instantly refills, so the main mechanic can be used again for an instant. immediately afterwards, the bar empties out again and so on, until the player releases the button
So, how can I cancel the input so that the player will have to press the button again when he wastes all the stamina at once?