# How to make a variable change loop from a min and max?

**URL:** <https://forums.unrealengine.com/t/how-to-make-a-variable-change-loop-from-a-min-and-max/301616>\
**Category:** Audio\
**Tags:** while-loop, unreal-engine, loop, Blueprint, question\
**Created:** [December 14, 2014, 11:29pm UTC](https://forums.unrealengine.com/t/how-to-make-a-variable-change-loop-from-a-min-and-max/301616 "2014-12-14T23:29:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Erasio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Erasio](https://forums.unrealengine.com/u/Erasio)\
**Post date:** [December 14, 2014, 11:46pm UTC](https://forums.unrealengine.com/t/how-to-make-a-variable-change-loop-from-a-min-and-max/301616/2 "2014-12-14T23:46:29Z")

</div>

Why not use another variable and simply increase it each tick by a value times delta time (so different fps won’t affect this effect).

You can clamp the value right before the usage which would set the limits you want. Whenever you press the key reset that new variable and you’re good to go.

Cheers,

Erasio

---

_[View the full topic](https://forums.unrealengine.com/t/how-to-make-a-variable-change-loop-from-a-min-and-max/301616)._
