Skip to content

Pathfinding problem since last dev build?

gpeddinogpeddino Member Posts: 51
There's a cutscene in my module which involves two NPCs moving from one area to another via a door. It was working flawlessly until the latest development build. Now they just move to the door but fail to open it so they just give up. Leaving the door open doesn't work as well. Anyone else having similar issues?

Comments

  • ProlericProleric Member Posts: 1,316
    These problems were first visible in .21 and persist in .22 in my experience.

    Potentially two issues:
    1. ActionMoveToObject behaves very strangely if the target is a transition door. I did some tests which showed that it has always been bugged - those cutscenes which worked before did so accidentally. In .21 the scenes no longer worked because the action never completed. However, I rewrote all the cutscenes to move to a waypoint instead, because it was an accident waiting to happen.
    2. In .21 many doors fail to work properly. Typically, clicking on the door causes the PC to move to it, but not open it. Further, the door cannot be opened while the PC remains in that position. They have to side-step then click again. Finding the sweet spot can be fiddly. Some NPC actions are likewise jiggered. Some of these are fixed in .22 but others remain, so it looks like this is not a generic bug. The exact problem can vary from door to door.
  • SorenSoren Member, Developer Posts: 48
    edited April 2021
    gpeddino wrote: »
    There's a cutscene in my module which involves two NPCs moving from one area to another via a door. It was working flawlessly until the latest development build. Now they just move to the door but fail to open it so they just give up. Leaving the door open doesn't work as well. Anyone else having similar issues?

    Could you share the module or just the script?

    The issue in this case is very likely because of point 1 as listed by Proleric (2 is unrelated and should be fixed now), but it would be nice to be sure. ActionMoveToObject targeting a door was always designed to make the AI interact with the door on arrival (a pre-EE thing), but due to inconsistencies in calculating the distance, it would sometimes fail. The inconsistencies are now gone, which makes the results reliable (for the moment that means not interacting), but it may cause issues whenever people rely on the unreliable.

    This generally leaves the options of restoring the erratic behaviour (with all the perils that involves) or figure out what would be the ideal behaviour that we can then rely on moving forward.
  • gpeddinogpeddino Member Posts: 51
    Sorry it took me so long. I moved on to other cutscenes and came back to this one today.

    In my original script, there is a battle outside a house and two NPCs that took part in it have to run inside. I used ActionForceMoveToObject with a waypoint as a target, and as I mentioned it was working flawlessly but not any longer.

    I just tested it again and the NPCs moved to the door and stopped. They began to do some jerking movements as if they were trying to do the action but failing. Then they just disappeared, even though the door was still closed. I checked and they had successfully made the transition, though.

    In another test, they did the same but after a while they just gave up and turned towards east. The door remained closed.

    I also noticed some strange behavior in the NPCs themselves. During the battle sequence beforehand, one of them (a wizard) simply ignored the battle and stood still throughout, just parrying attacks. The other ones, who had the same scripts attached, fought normally. I then exited, reloaded the module and tried again (without changing anything). None of them fought at all. It seems strange and arbitrary, and none of that was happening before the latest update.

    Anyway, thanks for taking the time to help!
  • SorenSoren Member, Developer Posts: 48
    @gpeddino could you try with the new development patch (.23) and test whether that fixes it?
  • gpeddinogpeddino Member Posts: 51
    Just tested it, problem has been solved! Thanks!
  • SorenSoren Member, Developer Posts: 48
    gpeddino wrote: »
    Just tested it, problem has been solved! Thanks!

    Great, thank you for checking :)
Sign In or Register to comment.