Forum rules - please read before posting.

NPC won't continue moving along path if a cutscene is triggered at node

Hey everyone,

Not sure what on earth is going wrong here. I have NPCs that move along paths just fine as long as I don't have any cutscenes at any of the nodes. If I do, then they'll just flat out refuse to continue moving once the cutscene has finished running, even if I set the NPC to continue moving along path.

I've even tried to set a cutscene that just has an engine wait, and then tried various combinations of telling the NPC to resume last path etc. etc. but nothing works - if I put a cutscene on a node, it just won't move after.

Has anyone encountered this before?

NPC inspector:
image

Path:
image

Cutscene used for testing:
image

Comments

  • edited April 2017
    You probably already did this but I'll ask anyway, lol. So, have you tried setting up the path again instead of just telling the character to resume the last path? And if so, did you see any difference? and have you made sure the cutscenes that interfere with the pathing actually close? (it's a long shot but there could be an actionlist still open so the character remains waiting). Just double check with AC's debugging options (the ones found at the bottom of the settings manager), that way you can see the game state and what actionlists are running.
  • Hi Alverik,

    Thanks for the suggestions! I tried setting the NPC to "Move on a new path" instead of continue, with he same results. With the debugger running, it shows that the action list does actually close off as it should.

    Here's something odd I notice today, I get the problem if I let this action list run its course automatically in the game as it should, but if instead when the game is running, and i go into the action list editor and manually triggers the action list with the little play button in the top right corner, then it works as intended!?! Could this be a bug of some sort?
  • @netto

    I ran into a similar problem a while ago, not sure you're issue is caused by the same as mine was but worth checking.

    http://www.adventurecreator.org/forum/discussion/4584/resuming-path-after-running-cutscene#latest

    Essentially my issue was that I was in scene view (I'd run the game and then immediately switch to scene view). I did this because I needed to check if some objects that were invisible in game but visible in scene view were moving correctly when they were supposed to (this was triggered by the NPC reaching a node and playing a cutscene). I noticed that the NPC would then refuse to continue along the path after the playing the cutscene action list despite being told to do so. I inadvertently found the issue when I ran the game and had to answer the doorbell (so I didn't immeditaly switch to scene view) when I got back the NPC had continued on and moved along the rest of the path!
  • Hey @mjbcfc,

    That sounded pretty promising as I was checking things in scene view - alas I'm not having any luck doing it directly in the game view either. To be on the safe side, I compiled the game and ran the executable as well and unfortunately that doesn't resolve the issue either.

    I can as a workaround I belive just not rely on paths and have an on-load action list that make use of 2d markers for NPCs to reach instead so it's not the end of the world... peculiar problem all the same.
  • edited April 2017
    By the way, how were you calling the actionlist? Was this an onStart or onLoad actionlist? Maybe the way it's being called is affect it? maybe you could try checking if there's any difference if you call the actionlist using a trigger or manually by using scripting (if you know how). The key code is the following: 

    **on scene actionlist:
    public ActionList actList; //this can go anywhere outside functions
    AC.AdvGame.RunActionList(actList); // this goes inside a function

    **or actionlist assets: 
    public ActionListAsset actList;
    AC.AdvGame.RunActionListAsset(actList);

    (if you can't program just ignore those, lol). Anyway, if using markers do it for now, then it's probably a good idea to use them instead.
  • Hi @Alverik,

    So the action list that sets the character to move on the path is a separate action list that gets called by the onStart actionlist. The actionlist itself the the NPC reaches is embedded in the path node itself so it's neither an onStart or onLoad I guess?

    I'll try playing around with different ways of triggering it to see if I can get any sense out of it - thanks for the tip!
  • Calling a Character: Move along path Action to resume the path is not necessary - the NPC should automatically resume the path once the node's Cutscene has finished.  Did you add that to try to fix the issue, or have you always been using that Action?
  • I did have it in place to try to fix the issue, I've since been messing with an untold number of settings, and when I now removed this action just to see, lo and behold everything is working as it should. Not sure what change along the way I might have made.
  • Odd.  Well, unless we can recreate it there's not much that can be done - let me know if it happens again.
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.