title: Unreal Engine - event handling inside 'while...' loop
body: <p>I'm trying to create an event handler, which affects stamina regeneration in-game, for example every 0.75s tick <em>CurrentStamina</em> variable should be increased by <em>BasicStaminaRegen</em> variable's value. I wanted to include it into a while loop to check at every tick if <em>CurrentStamina == MaxStamina</em>.</p>
  
  <p>Concept C++ code:</p>
  
  <pre><code>...
  float currentStamina = 25.0, maxStamina = 100.0, basicStaminaRegen = 5.0;
  while(currentStamina != maxStamina) {
  (something related to handle a timer)
  ...
  currentStamina += basicStaminaRegen;
  }
  ...
  </code></pre>
  
  <p>Question is, how can I accomplish it in UE blueprint editor?</p>
  
  <p><a href="https://i.stack.imgur.com/XFRsC.png" rel="nofollow noreferrer"><em>StaminaRegen</em> defined function</a></p>
  
  <p><a href="https://i.stack.imgur.com/XFRsC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XFRsC.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/1AE09.png" rel="nofollow noreferrer">Part of code with an appropriate event handler</a></p>
  
  <p><a href="https://i.stack.imgur.com/1AE09.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1AE09.png" alt="enter image description here"></a></p>