How to reset the location of an actor in a blueprint, once a predetermined limit has been reached?

So I’m currently working on a real-time AV system in Unreal that operates in conjunction Ableton Live, based off of MIDI/Macro/Envelope messages sent to Unreal via OSC.
I’m trying to make a blueprint that takes the various channels of macro info sent out from Ableton to then control the position of an actor, in conjunction with whatever the tempo of what Ableton is set to.

So for macro 1, it takes one bar to go from 0-100. Macro 2 takes two bars to go from 0-100, macro 3 takes four bars to go from 0-100, etc.
How can I make the blueprint reset the actor’s position once it reaches a predefined limit?
Or rather, how can I make the actors explicitly follow the float data, so once it hits 100 then drops back to 0 the actor’s position in question follows suit.

“Add Actor to Local Offset” seems to do the trick when it comes to interpreting the various macro channels and moving them at the desired rate, but I just can’t figure out how to make it reset once it hits 100, or any other predefined limit for that matter.

Here’s a screenshot of my blueprint with what has worked thus far.
Any help regarding getting the reset function to work would be greatly appreciated!

1 Like

I don’t know much about OSC, but that value pin looks more useful

image

What does it return?

In any event, with the code you currently have, if you record the actor’s original location on begin play, at some point you can reset it.

1 Like

So that output ended up being the solution for getting the events to restart once the macro values in Ableton reset. So thank you the suggestion that helped nudge me in the right direction!
Here’s a screenshot of the Blueprint that ended up working for any future reference.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.