How to translate C++ code to UE blueprint ?

i have these codes :
“for (int32 j = 0; j < i; j++)
{
float Distance = FVector::Dist(NewVector, Vectors[j]);
if (Distance < MinDistance || Distance > MaxDistance)
{
IsValidVector = false;
break;
}
// Check Z distance
if (FMath::Abs(NewVector.Z - Vectors[j].Z) > ZDistance)
{
IsValidVector = false;
break;
}
}”
And i wanna exchange this to UE blueprint, but i don’t known how to do with “Break” ?
Can someone help me please ?
I think it’ll be something like this :


but how to complete it ?
Someone help me please, thanks for reading, folks <3

Why not do this in c++ if you already have the code? Also there is a for each loop with break

1 Like

Thanks for suggest bro
I have 2 c++ function, but my game got problem and i can not finding where’s problem. So i wanna change c++ function to blueprint to check error.

Thats not going to help.

Put debug prints in the code and debug it like a normal programmer, reading the log while it runs.

Also breakpoints do work.

Loops on bluepront will almost always fail after a few recursions.

2 Likes