For other people searching for the NavResultGoToNext error in UEFN as of 31.00, it seems as if since this is first defined within the race: loop, it’s considered as underfined during validation
This looks like a validation error to me – specifically, a new validation error as of version 31.00. I’m assuming the validator is considering NavResultGoToNext as non-existent despite the race having completed immediately before the “if” statement. (Seems to me like it was defined on the first pass of the race, but simply has a null value – likely its original behavior.)
# Leveraging concurrency to wait until the NPC reaches its destination, while the calls to look back at its origin point
# and drawing a debug arrow never completes, continuing, ensures only the NavigateTo can win the race.
race:
# Move back to its starting position.
NavResultGoToNext := Navigatable.NavigateTo(NavTargetEnd)
# Sets NPC to look at its previous position which will make it walk backwards.
# This is meant to show the utility of the focus interface.
Focus.MaintainFocus(GoToPoint)
if(ShowAIDebug?):
DrawDebugLookAt(Character, GoToPoint)
# Check again to see if something has interfered with the NPC reaching the intended location and
# print a message to the output log.
if (NavResultGoToNext = navigation_result.Unreachable):
if(ShowAIDebug?):
Print(witch_npc_behavior_message_module.OnNavigateErrorMessage(Agent,GoToPoint.X,GoToPoint.Y,GoToPoint.Z), ?Duration := AIDebugDrawTime)
else:
# This tells the NPC to wait for this amount of time in seconds.
Navigatable.Wait(?Duration := MoveToWaitDuration)
As a workaround, either initialize NavResultGoToNext before the race: concurrency loop, or just comment out the subsequent if/Debug block.