Hi
I believe we've encountered a bug with Action List -> Run when Wait until finish is enabled - it will continue to the next action in some cases before the action list its running has finished. This occurs if that action list its running contains a Dialog -> Start Conversation action. As soon as the Start Conversation action runs, the parent action list continues and the action list its running gets ends (OnEndActionList is fired)
To reproduce:
1. Create a cutscene that includes a Dialog -> Start Conversation action surrounded by other actions (in our case Dialog -> Play speech). The cutscene is placed in scene and pauses gameplay. Skippable is irrelevant. Important: The Start Conversation action does not stop the action list for any path. All the options continue to another action in the list.
2. Create a Trigger that contains a Action List -> Run amongst other actions. Source is in scene. When running is set to Pause Gameplay. ActionList is the cutscene from above. Check/enable Wait Until finish. Set After running to Continue.
3. Add any action after the Action List -> Run and set a breakpoint in its Run() function.
Result: Run the game enter the trigger volume and see how as soon as the Dialog -> Start Conversation action is it, the break point is hit.
Expected: The entire action list being executed by Action List -> Run finishes running before continuing to the next action.
Note
The above is a test case, as this issue was actually found in a custom action I'm making that runs other actions (intro cinema, etc). I modelled this action after Action List -> Run.
I've noticed that as soon as the Conversation action plays, then:
I came up with the repro case to ensure that I didnt break it. No native AC code has been changed.
Any ideas on this? I'll continue to debug, but having this behavior work is critical to the custom action im working on.
If this is expected or not fixable - How would you recommend that a custom action list can:
1. Run another action list
2. Be notified when the entire list has finished running (stopped) even if it contains a Start Conversation action .
Thanks
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
After digging more and stepping through the code, I was led to https://adventurecreator.org/forum/discussion/8478/awaiting-action-list-that-contains-a-start-conversation-action-fails - looks like a known issue.
Reviewing that thread, thinking it through, then Ill update.
Do any other actions exhibit this behavior or is Start Conversation the only one?
So sadly it looks like this is expected behavior. When a Conversation action is run, it stops the action list (and then reruns it later). This in turn causes the OnEndActionList event to fire.
Assuming the above is correct, then:
Other questions:
The issues with the ActionList: Run Action running nested Conversations were discussed most recently here.
It looks like your topic overlaps that discussion, which should be resolved in the latest release, v1.81.3.
Hi
Thanks Chris. The link you provided is very similar to what I saw stepping through the code: Conversations end prematurely even if wait until complete is set.
We are in the midst of a milestone and I'm nervous to update to a newer version and break things. I know its a big ask, but would it be possible to get a diff of the CL that fixes the issue? I can hand merge it it.
Alternately, if you could even confirm if the change if specific to a few files (likely Conversation.cs and ActionConversation.cs Ill update to the newest version locally and see if I can merge just the fix). I know there could be dependencies on other CLs.
Thanks again - I'm impressed over and over by the quality, architecture, and extendibility of this product.
The fix involved a number of different files - I'd start with copying over the ActionRunActionList, ActionListManager, and Conversation scripts from the latest release and see if that compiles.
Will do. Ill diff them, see if the changes make sense and go from there.