# Each time x increases by a certain amount, set y

**URL:** <https://forums.unrealengine.com/t/each-time-x-increases-by-a-certain-amount-set-y/409325>\
**Category:** Blueprint\
**Tags:** logic, unreal-engine, editor, Blueprint, question\
**Created:** [November 11, 2017, 11:27am UTC](https://forums.unrealengine.com/t/each-time-x-increases-by-a-certain-amount-set-y/409325 "2017-11-11T11:27:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NerArth](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NerArth](https://forums.unrealengine.com/u/NerArth)\
**Post date:** [November 11, 2017, 11:27am UTC](https://forums.unrealengine.com/t/each-time-x-increases-by-a-certain-amount-set-y/409325/1 "2017-11-11T11:27:40Z")

</div>

With blueprints, I’m currently trying to do something such as:

* * *

`x` is an integer that increases by 1 every tick.

every time `x` reaches 10, 20, 30, 40, _etc_; set `y=x/10`

* * *

Unfortunately, I’m struggling to understand how I should check when `x` has reached each interval of 10.

I figured I should probably use a ForLoop node, but then I realised I really had no idea how to connect it or what expression I should use to check the values of `x`.

I hope I was able to word myself appropriately, please let me know.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [November 11, 2017, 12:02pm UTC](https://forums.unrealengine.com/t/each-time-x-increases-by-a-certain-amount-set-y/409325/2 "2017-11-11T12:02:22Z")

</div>

This should work:

 ![219799-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/5/0/6504623f4aa0e206db4b6a60a1291be049242262.png)

---

<div class="post-metadata">

**Author:** ![NerArth](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NerArth](https://forums.unrealengine.com/u/NerArth)\
**Post date:** [November 11, 2017, 12:31pm UTC](https://forums.unrealengine.com/t/each-time-x-increases-by-a-certain-amount-set-y/409325/3 "2017-11-11T12:31:16Z")

</div>

Thanks; I think it was the modulus node (that I didn’t know about) that I really needed for my full blueprint context, so I looked up now how this works.

I asked the question in a generic way because I know my game’s context won’t be the same as what someone else might need.

In my game I increase population every few seconds, and so I need to increase a money multiplier value for each increase of 10 in population. I think I can see how I’ll do this now, so thanks again.
