Forum rules - please read before posting.

Resuming path after running cutscene

I ran into this problem previously however I simply avoided it rather than looking for a fix, it has since cropped up again and despite my searching I can't find any solutions.

I have an NPC that is walking along a path however at certain points I need certain markers to move, I therefore have been using the 'Cutscene on reach' in the path object and it works fine in that when the NPC reaches a certain node/point and the markers do indeed move as intended however the NPC then stops at that node/point and doesn't resume the path.

I've tried different combinations of running the cutscenes in background/pause gameplay as well as adding an action at the end of the cutscene for the character to resume their last set path however nothing seems to be working!

Any ideas? I couldn't find any solutions online because I couldn't really find anyone else who is having a similar problem so I'm thinking the fix might be difficult to find if it is not being replicated elsewhere (and so likely some spceific issues being cause by my setup).

Comments

  • What version of AC are you using?  If you're not using the latest, please update as a few fixes in that area were made recently.

    If it continues regardless, it could well be specific to your setup - so please provide screenshots of a sample Cutscene on reach that causes this to occur.  I'll need any relevant info to recreate it on my end.
  • Cheers Chris, I'll look to get something over later tonight when I get back home. I updated very recently (late last week) so pretty sure I'm rocking 1.50i.
  • @ChrisIceBox
    Here is a picture showing the path inspector as well as the cutescene action list that is run when node 9 is reached. As mentioned the character will stop at node 9 and then not resume the path. It isn't shown but I did also try adding an action at the end telling the NPC to resume last set path but they still just stop and don't resume.

    http://postimg.org/image/9xn5320ub/

    Additionally here is the NPC in the inspector incase I need to be doing something different here.

    http://postimg.org/image/8jd76vjan/
  • OK.  I'll have a look through it and see.  Don't use an Action to resume the path manually, though.

    Do any other Cutscenes used in this way work?  e.g. if you have another node that simply runs e.g. a Dialogue: Play speech Action, does that also stop the NPC from moving?
  • Can't recreate this, myself.  It could be your movement settings - temporarily switch to the Demo_SettingsManager asset file and see if it then works.
  • Bit weird, I tried the demo settings manager however still had the same issues. I did then try a new cutscene that simply plays dialogue as you suggested and that seemed to work in that it played the dialogue and then the character resumed their path (this worked for both the demo manager as well as my own custom settings manager).

    Bit confused at the moment.
  • I tested with a couple of Object: Transform Actions and found no problem.  It could be the number you have, or the objects you're moving, that's causing the problem (for some reason).

    Try testing different lengths of the Action chain (start with 1 and work your way up) and see if you can find the point at which it stops working.
  • I'll give it a try, did think this last night however bit annoying if it is as there are only 6 actions. I'll also try and see if it works if I simply have 1 action called at the cutscene reach node which will simply run a separate action but wait until finish, the action that it runs will then be the original cutscene I tried to run before with the 6 or so actions. I'll report back tonight however if it is a limitation due to the number of actions I would have expected this to have been encountered before.

    Enough of my ramblings, thanks for the continued support as it makes the asset so much more valuable!
  • @ChrisIceBox

    Haven't been on Unity since last week, XCOM2 has taken up my entire life this past week! Just tested the above what you suggested however just having one action of moving the object didn't work (the NPC again simply stopped moving at the specified node).

    Weird thing now is that the action list doesn't actually work (ie the markers I am trying to move do not move) however previously when I was having the issue the action list would still run through the actions (and move the markers) however the NPC would stop moving at the node and not resume their path. So to summarise now the NPC doesn't resume their path and also the action list doesn't run?

    However it still works when simply running a dialogue action so think there is an issue when it comes to transforming/rotating moveable objects?
  • Like I said, it worked OK for me.  That it has varying results for yourself (sometimes half-working, sometimes not at all) suggests there's more to it.

    If you can recreate this problem in a very lightweight test scene (e.g. just moving cubes around), then you can PM it to me to have a look at.
  • @ChrisIceBox

    Hey Chris, thanks again for the fast responses (I finished XCOM2 and then started up the first game again so as before my Unity AC project has been on hold for a few weeks now)! I tried to recreate the problem in a lightweight scene but it seems to work fine with just some simple cubes however it seems to work fine like this. So obviously something is not quite right with how I have my proper scene setup or with the character itself?

    Very confused, think I'll have to move on for now as I can fully appreciate the difficulty you or the community will have trying to help me when the problem seems specific to me and not easily reproduced.
  • If you're having trouble reproducing it, try copying the problem scene and remove everything unnecessary - other GFX, cutscenes, etc - until only the problem is present.
  • Cheers Chris, I'll try that and get something over to you so you can point out the obvious dumb thing I've been doing haha!
  • I've not had much time with my hobby lately however I did get a few hours this weekend and I have found something that may be useful if anyone else is having similar issues. It seems that the issue was (or at least part of the issue) that I was in the scene view whilst testing the game however if I stuck to the game view then the NPC does indeed go through the action list and then continue on their path.

    So I would normally press play to laucnh the game and click on the object that triggers the NPC on their path and then I would then switch to the scene view whilst the game was still running so that I could see if the markers were moving (because obviously they are only visible in the scene view and not the game view). As mentioned before this wasn't working because the NPC would not resume their path so I tried a different tactic by having 4 different positions for the markers and then instead of moving the markers I instead ran a cutscene that changed a global variable to assign which markers were 'active' so achieving the same end goal as before. So I tested this and again it didn't work however where I would usually then quit the game by depressing the play button I instead switched back to game view and everything seemed to then run through and work? I believe this was why I previously mentioned that playing a dialogue worked when Chris asked me to test it originally because I had to keep it in the game view to see if the dialogue came up and so I attribute this as to why it worked that time (and not because of my custom action list of moving markers causing issues).

    So to summise I'm pretty certain that this issue was simply because I was in scene view instead of game view when testing however because I also changed the methodology for exactly how I was moving the markers I can't be 100% sure that there wasn't an issue with how I was trying to do it originally or not - however it does seem to be the scene/game view thing but it is surprising that this hasn't cropped up before?

    Anyway I have now dragged the game window out as a spearate window to keep the scene view still visible so I can still look at the scene view whilst testing the game.
  • This will be an issue with Unity itself, I believe.  Good to know you've found a workaround, but know you can also enable "Gizmos" in the Game window so you can see things like path lines, etc without also having the Scene window open.
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.