Blueprint function returning wrong value

HEGI
Thu, 15 Nov 2018 12:39:31 +0000
Blueprint

Hello,

I have a pure blueprint function that returns a value based on a simple condition.

Now when the condition is not met anymore and the function has no return node, the last valid path is returned.
In the case of this example, when the condition is false, the node still returns a value of 150.

I wonder if this is expected behavior or a bug ?
Either returning zeroes or a log warning would make more sense and be less prone to errors.

This can easily be reproduced and i have included a test project in the post that shows the issue.

[Download Test Project for UE 4.21][2]

Have a great day!

9 posts - 1 participant