Forum rules - please read before posting.

NPC loops on small part of path

I can't tell if it's a bug or I did something wrong. I have a simple NPC with no-directional two-framed animation which follows a certain path in ping pong mode with gravity overridden and zero node wait time. I set the object on the path using the same Cutscene at OnStart and OnLoad events. For the OnStart case everything works fine. But when I load my save, something is broken with the character following the path. It starts to stumble after one or two rounds of completing the path, like going forth and back and then forth again at the small part of the path, and a bit later it loops completely between some two close points (not even the nodes of the path).

That's how the looping looks like on the Game tab:

And that's the Scene tab at the moment of the looping:

That's the path:

The path's settings:

The NPC settings:

Action to set the NPC on the path for both OnStart and OnLoad events:

I've tried to add/remove Remember Transform & Remember NPC & Moveable components, turned on & off "Teleport to start" check at the action, but nothing worked. Could you please help me?

Comments

  • edited March 2021

    It's hard to tell what the behaviour is from the gifs, but the Remember NPC component will save the movement behaviour of the NPC it's attached to.

    Try removing the "Character: Move along path" Action from the OnLoad cutscene - it may be that the two are creating a conflict. If you do need it in there, to e.g. restart motion, try precding it with another such Action with a Method set to Stop Moving.

  • Thanks for the answer, Chris! Unfortunately, I'm still stuck. I've removed setting on the path at the load event & added a "Remember NPC" component, it didn't help. Adding "Remember Transform", "Moveable" components didn't work too. Then I returned path starting on load but also stopped moving along the path before starting, still no luck. I recreated the whole character from scratch just to test - same result. I have another two ideas to check: to change path type from "ping pong" and manually set the reverse path (maybe that's the root of the problem) and to build the scene to .exe file (maybe Unity scene player is messing things up).

  • The Remember NPC component should be enough - adding other components that track/affect motion such as Remember Transform and Moveable may create further conflict.

    What is your AC version? I cannot recreate the issue from your description of it - a 2D NPC moving along a "Ping Pong" Path loads and saves correctly for me. Are there any other details needed to recreate this?

  • I've built a scene and everything is fine after loading the savegame! Looks like that's really some kind of a bug of the Unity scene player. My version of the AC is 1.73.2 and Unity is 2018.4.22f1. But I guess it doesn't worth the trouble to dig any deeper, if build is okay that's totally okay with me =).

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.