Once stamina reaches 0, stop being able to move

  • You need to create a variable for your stamina, use a float type
  • Set it’s value to 1
  • Bind the progress bar value to your stamina
  • in your character bp, use an event tick node to decrease your stamina over the time
  • Create a branch node to controler if your character’s stamina has reached the value 0, if true, set its movement mode to ‘none’
  • on the button sleep click, set your char’s stamina to 1 again, and the movement mode to walking