Good afternoon, dear Community!
Can you please tell me if it is possible to implement a stamina system on the main character?
I have a running animation, which is already built into the game and is activated by a keyboard button, but...running is just endless.
Is there any way to limit the running time?
I roughly understand how to make the Stamina bar, but I can't find a solution to the main question:
-How to limit the character's running? And is it possible to make it so that he could replenish the ability to run with products from which the scale would be filled?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
You'll want to link your Stamina bar's value to a Global Float variable, and then use a custom script to deplete that variable while the Player runs. When the value hits zero, prevent running.
Linking it to a variable means you can then use e.g. Variable: Set Actions to increase it.
The script would be something like: