Forum rules - please read before posting.

NPC Paths Wait Time Issue

edited August 2018 in Technical Q&A
In the most recent AC release (from 1.64.0 onwards) NPC path following behaviour has changed

In previous versions, if "Wait Time" was non-zero, then the NPC paused for that length of time at each node. But when the player entered the scene they started moving along the path immediately

Now, they pause for the "Wait" length of time when the player enters the scene

That behaviour might be technically more correct, but I much preferred the old way, as it made it look as if they were in the middle of actually doing something, not just standing idly around twiddling their thumbs waiting for the player to appear

I'd like to be able to replicate the old way if possible, but I can't see any simple way to do it, so any suggestions welcome


P.S. For the time being I've amended Char.cs, to add back the following code at around line 739, and that's restored the old behaviour, but I'd really prefer a less hacky fix (perhaps a "Pause at Start Node?" option, or something):

                        if (targetNode == 0 && prevNode == 0)
                        {
                            SetNextNodes();
                        }
                        else if (activePath.nodeCommands.Count > targetNode)


Comments

  • Yes, the "first" node in a Path is now treated the same as the others: wait time and all.

    However, if the NPC is not standing on the first node's position when they walk along the Path, they'll still move to it before waiting.

    Alternatively, you can remove the wait time altogether and rely on Cutscenes for individual nodes that contain Engine: Wait Actions.
  • Thanks for the suggestions Chris

    As it would be quite a lot of work to implement the first option (because I have an AssetBased ActionList that runs at the start of each scene, which spawns NPCs into the scene and which assumes that their spawn point is the same as the scene's Path Object, and that ActionList is complicated enough already), I'll probably go with option two

    It has the added advantage that I'll be able to randomize the NPC wait times at each node, which will make their movements seem a bit less mechanical
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.