slider bar value


I wounder if there’s a way/ function to determine if the current slider value from object class is increasing towards 1,0 or decreasing towards 0,0?
What I’ve tried so far, but feels very inefficient, is to:

  1. Set float var “CurrentSliderValue” from slider event “OnValueChanged”.
  2. Use a delay node with e.i. 0,5s to then get the “CurrentSliderValue” and set “PreviousSliderValue”.
  3. Check if “CurrentSliderValue” > “PreviousSliderValue”
  4. Set a bool “isSliderIncreasing”
    If true- Slider is increasing
    If false- Slider is decreasing

The flow after is getting Static Meshes and changing its dynamic material’s opacity value on event “OnValueChanged”.
The problem is not really changing the material’s opacity, but getting the right static mesh, depending on increased or decreased slider value.
As for now it is setup with a branch node determined by the bool “isSliderIncreasing”.

Feels like am getting unwanted results of getting static meshes when using “OnValueChanged” with a delay node and branching flow with a bool.
I’ve tried using the “SelectObject” node which uses a bool input, but feels unwanted results also arises.
Could it be the delay node?

So woundering if there is a function or some workflow to simply determine increased or decreased slider value on event “OnValueChanged”?.

Thanks alot!

Tried to use node “Get World Delta Seconds” on the delay node and it seem to update pretty good. But you probably want to keep it within a macro.

Don’t use delay for this, it just muddles things up:

Thanks very much for a better solution!