How to increment a value with a repeated action?

Hi folks,

I’m a bit of a blueprint noob, but i can’t for the life of me work out how to do the following:

Imagine i have a small sphere sitting at my world origin.

I use an external fader (via OSC) to move the sphere one meter to the right (this is the full amount the fader can move the sphere).

So far, so good.

Now, i reset my external fader back to zero (this reset action doesn’t send a message to the blueprint).

Next, i repeat my action of moving my OSC fader all the way up.

But, and here comes the tricky part, i now want this new movement to ADD to the previous one.

So, my sphere will move a further meter to the right, making it two meters in total from the world origin.

I simply can’t work out how to achieve this in a BP.

Any tips would be greatly appreciated as i spent many hours banging my head against a wall trying to get this to work!

Sounds a bit like this.

Thanks man, unfortunately i don’t understand what the node on the far left is or does! (yeah, i’m a noob i’m afraid)

That’d be the reference to your sphere. If it’s “sitting at my world origin”, you can drag it into the level blueprint’s graph. Or right click in the graph and create reference there.
[HR][/HR]
If you’re still unsure how to go about it, showing us in a screenshot what you’ve got atm; where and how you’re attempting to move things about. It would be easier to suggest something tangible.

Thanks dude, i don’t have a blueprint yet because i’m just trying to work out how to do this at a totally simple level, and once i can, i’ll build it into the actual blueprint i need.

I made a video for a friend explaining what i’m trying to do, see below, i think that makes it pretty clear. I think it would need a bit of logic but i’m really new to UE so i just can’t figure it out!

(i should also mention i’m not trying to make a game, this is in the context of building a tool for use in virtual studio production)

Button resets the slider, but not the float variable that the slider controls, causing it to stack up. Reset the variable too in the same event on the button.

Many thanks, man!

Unfortunately because I’m a total beginner, i can’t understand how that works!

I’ve attached the pic with my questions attached, see below!

You can drag the slider into the bp, get its current value, put it instead of the float variable, then remove the float, it was just used as an example, in case the slider sets something somewhere else.

I still don’t understand! :frowning:

Any chance you or anyone else code insert those nodes into my graph in the correct way (see below)?

(in my graph, the slider value is available at the output of the “get OSC message float” node and you’ll need the OSC plugin enabled):

Actually, isn’t the most logical solution to just take the present frame (A), then take the previous frame (B), do A - B, and add that to B… and that’s your output each frame?

But then how do you store a value and then access it one frame later?

Couldn’t get it to work, i gave up and implemented it on the OStageC side: