Constantly check a variable

Hi all

This is probably really basic - I’m trying to figure out how I can get the highlighted branch section to constantly check (rather than just do one check).

This way, when the branch is false, nothing happens and the slide continues.

However, once the player speed reaches 200 or less, the slide recovery starts.

What’s the best way to achieve this?

If any clarification is required, please let me know.

Cheers
Matt

You need to move the code elsewhere ( just the check part… ). Tick would be the place if you want to check constantly.

Thanks ClockworkOcean. ‘MovementSpeedReference’ is a variable that is constantly checked through EventTick.

Now, I’m trying to get my function to go through the nodes from the ‘true’ output in the highlighted branch, but only when the Movement Speed decreases to 200. Does this make sense?

If the Movement Speed is higher than 200, I want the ‘false’ output to keep looping/I want nothing to happen… until the Movement Speed decreases to 200, in which case I want the ‘true’ output to be triggered.

Let me know if more clarification is required.

Perhaps the best way to implement this is to use booleans and branches and move this portion into the EventTick section? That may be what you were saying initially.

What about using a ‘while’ loop?

Hey, thanks. I tried this out but I get an ‘infinite loop’ error - maybe I’m doing something wrong? Here’s my code.