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

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.



I followed this wiki tutorial and have it exactly as instructed:

Everything works! I am trying to add on top of that, an ability for the float value that is multiplied with the forward vector to change based on how long the key was held.

I’ve tried float range but only found Random Float in Range from Stream . I’d like the range to increment between two numbers.

Any help will be appreciated. I’ve tried a couple of things such as a custom Timetable and Get input key time down

Im certain I am doing it wrong.

Im quite new at this and the jargon hurts my brain. Im assuming you mean something similar to this?

If not, can you kindly send me to a tutorial or show me what you mean? I have the blueprint exactly as the wiki.

I don’t know any tutorial about this and don’t have unreal here right now but let me try to explain it a bit better.

You don’t want the clean time but just a value with a min and max border right?

Well instead of this “get input key time down” you can each tick if your branch is true (and by tick I mean each time event tick is called which is each frame) add a value to that variable. Don’t set it new. Just get that variable and add a value.

And this value should be delta time (which is the float output of event tick and represents the time since the last tick) multiplied by the value you want your variable increased by each second.

Before you use the variable use the node “clamp”. It takes a min and max and will only output banks in between or either of those extreme values.

I hope this clears it up a bit.