I have made it when you press shift the walking speed is set to 1200 and released back to 200. how can I make the stamina bar slowly decay? any help will be appreciated but please only blueprinting I cannot code in C++
Woud be easier to if when you pressed the button you got delta time, multiplied it by your decay rate then minus it from stamina. That way you arent calling the branch everysingle second checking if its true yet.
i would use the tick node. get the “event tick” node, then a branch, and the condition needs to be “stamina > 0”. if true, stamina = stamina - (whatever number). and on your shift, before you increase the walk speed, check (with a branch) that stamina is > 0.
would you be able to provide a visual representation please? im still new with ue4
I’ve made a stamina system that doesn’t rely much on EventTick, and also covers how to get a stamina bar on your HUD, plus has checks built into it to make sure stamina isn’t being drained when it shouldn’t be. Only when player is inputing sprint and is actually moving.
I hope the video helps.