Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
AI
Summary
I have an NPC running with custom Verse behavior, and when I hit it with the Ballistic Shield, the game freezes and eventually loses connection (network error) which might mean that the server got stuck in an infinite loop?
My code was asking the NPC to NavigateTo() after being damaged, but the NavigateTo() basically terminates right as it is called, and then I call Disable() on the NPC Spawner, which is supposed to despawn the NPC. The OnEnd() function is called on the NPC, but my code after calling Disable() is never executed, so I assume the freeze is happening somewhere inside the Disable() function.
The workaround I found was to skip one frame with Sleep(0.0) and then loop to check if the character IsFalling() in which case I Sleep some more, otherwise break the loop. Without skipping a frame, IsFalling() fails.
And only after that loop, ie. when the character is not in the air anymore, I call NavigateTo()
Steps to Reproduce
Have a custom Verse behavior for an NPC
Subscribe to the fort_character.DamagedEvent, and call NavigateTo() when the event triggers
Use the Ballistic Shield to bump the NPC in the air (by sprinting towards the NPC)
Expected Result
The game should not freeze, the NPC should be bumped in the air, fall back to the ground, and run to its destination
Observed Result
The game freezes, I have to exit session in UEFN and Launch Session again
Platform(s)
PC