Forum rules - please read before posting.

Loading issue: Player should stay but he is moving

edited June 22 in Technical Q&A

Hi there!

I have the issue where I save a game with my Player standing. When I load the game, the character moves to the same position in the scene.
There is no actionlist running when I save and no Hotspot clicked.

I tried to add a RememberNPC component but it doesnt help.

The issue happens not every time. Sometimes I can save and it loads flawlessly but with some saves the character is always walkting to that random position.

Do you have any idea what it could be? Thank you!

Comments

  • The Player's pathfinding state is included in save-game data. We'll need to determine if this is a case of the Player being saved as moving inside the save-file, or the Player being commanded to move after loading one.

    Are you using Point And Click movement? It could be that a click on the NavMesh is somehow being registered at the same time you save.

    A good test for this would be to switch your Menu Manager's asset file (at the top) to Default_MenuManager, as this will revert back to the default interface which shouldn't have such an issue.

    As a last resort, it is possible - inside your Load menu's SavesList element's properties - to assign an ActionList that runs when you load a save-file. This could include a Character: Move along path Action with a Stop Moving command passed to the Player to force the Player upon loading.

    You'll also need to detach the Remember NPC component - it will cause a conflict with the Player data saved automatically.

  • edited June 23

    Hi Chris! I was able to reproduce it:

    1) Click on position A on the NavMesh so the character walks there and then save before the character reached the position (Save Slot1)
    2) Click on position B and save when character has reached the position (Save Slot1)
    3) When you load Slot1 now the character moves to position A

  • If in step 2) you were saving to a new slot, not the same as in step 1), then that would be the expected behaviour. A Player's pathfinding state is stored in save-game data.

    If you're overwriting the save file from step 1) with step 2), then none of the data from step 1) should be loaded in step 3). If you make any other changes in between step 1) and 2) (e.g. pick up an inventory item), is that state also reverted in step 3)?

  • edited June 27

    The issue occurs when I save to the same save slot exactly like I described.
    When I pick up an item I have the item in the inventory and the corresponding hotspot is diabled after loading. But the character walks to the spot of the overwritten save slot.

  • I can't recreate such behaviour, I'm afraid. Is the Console reporting the same save file as being overwritten when saving both times?

    Try assigning the ActionList upon loading your save game as I described above - does that prevent the Player from moving after loading?

  • I fixed it with the ActionList you suggested.. thank you for that!
    Strange that you can not reproduce it.. I was sure I hit an adventurecreator bug ;)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.