Each time x increases by a certain amount, set y

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.

This should work:

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.