Here is another solution that will set a ‘power’ variable determined by seconds held.
This doesn’t involve timers or ticks.
Under the Normalize to Range node “Range Max” is the time in seconds you want the button to be held in order to achieve max power.
The float multiplier node just after holds the value of what your max power should not exceed.
In my example if the button is held 4 seconds or longer the result 2000 is produced. If held down for 2 seconds 1000 would be produced.
So on…
SET X_DIFFERENCE is not actually needed and can be removed from the blueprint.
Not tested but should work.
The downside to this method is that you cannot update anything in real-time in relation to X_Pressed since there are no timers checking the values. You must wait until X is released before this will fire off. It has limited uses but is fairly efficient and problem free.