Infinite while loop in macro

I’m creating a macro library so I can do some custom camera movement. I’ve gotten all of my macros to work except for this zoom for some reason. I’m sorry that it’s a bit messy (I’m still organizing), but basically what I’m doing is assigning a local Vector based on the macro’s inputs, then I enter a while loop where I ease the player towards the local Vector, then delay before re-entering the while loop.

However, UE4 is detecting that my while loop is an infinite loop, when this simply shouldn’t be true. I rebuilt this macro in the form of a branch which does the same thing, and from there I can tell that the easing function works correctly and the zoom works in play mode:

But the condition is registering as false even when it’s very clearly true:

310485-brokenmacroalt3.png

Am I missing something here? I’m so confused, especially since I’m doing the exact same thing in my panning function which works correctly.

I’ve never once managed to make a While Loop work in the UE.

If you assume that it would work as in code, well, it kind of doesn’t. In my understanding, a While Loop in the UE executes its body over and over again without waiting it to be completed, and it just doesn’t work. Maybe I’m missing something crucial here, but it’s just my experience.

You can make an actual loop in your macro instead of using While Loop. In this case you’ll be sure that your delay works before the next iteration begins.

BTW, you’re using Ease wrong. It’s an interpolation, where alpha takes a value from 0 to 1 and interpolates between A and B. In your case the movement will occur and maybe the actor will even reach its destination, but you’ll have too little control over the movement. I’d suggest using Vinterp of Vinterp to Constant instead of Ease. Those two work with Interpolation Speed, or Rate in your case.

And can you please show the screenshot of your Panner function? If it uses a While Loop and it works, I’d really like to see that.

Thanks for the input, I solved the issue:

In earlier versions of this macro, I tried using VInterp, but the zoom didn’t work. I switched to the Ease because of this, and the zoom itself worked, but once put in a loop it had the issues shown above. Changing it back to VInterp and changing the while loop to the branch I showed in my question solved the problem for some reason. I don’t know why, since the Ease worked before adding the condition. Maybe I just don’t understand interpolation that well, I’ve only been working with this engine for a few weeks. Although, there was a forced shutdown of my PC while I was making this macro library, so maybe it got corrupted and that led to the odd results? I’m honestly at a loss with this.

Also, after I posted this question, I changed something and the panner function ended up breaking in a similar way. I got it to work with the exact same solution. I think I will just stay away from while loops from now on.

Edit: the new version: