Hello,
I want to use an Action List to ask and answer multiple questions in succession, but it doesn't work. It would be great if you give me a hint to solve this.
When I use an Action List only once, it works fine. However, when I use the Action List two or more times in a row, it appears that the actions after the Start conversation in the first Action List are not executed, and it jumps to the Start conversation in the last Action List. What could be the reason?
There is a note saying in Start Conversation "To set override options when the Conversation is parameterized, a placeholder
Conversation must be assigned." Actually I am not sure what this means but tentatively I made a three options Conversation which works if only one Action List is run. I suspect that it might be a reason.
Action List
https://1drv.ms/u/s!AjiINOTvpl7kna8T00jxzU9UA8lcjQ?e=Q5ewFK
I started using AC three month ago. I'm not a professional programmer. I have finished some of tutorials.
My unity version is 2020.3.21f1
AC version is v1.74.2
Again, it would be really great if someone gives me a hint.
Ryota
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @Ryota.
Can you elaborate on the actual behaviour of the issue? Are you saying that the previous Conversation's option labels appear instead of the newly-assigned one?
The logic in your screenshot looks sound. Since the issue is to do with repeated calls, though, I'll need to see the ActionList(s) involved that trigger it.
If you can share shots of this, and the Conversations involved, I can attempt a recreation on my end.
Recreated - don't worry about the extra screenshots.
I'm afraid you've stumbled upon a limitation with the Conversation Action's Override options? checkbox.
When a Conversation begins, the ActionList that triggers it actually stops running - only to re-awaken once the player chooses an option.
If the ActionList: Run Action that trigger this ActionList, however, then it'll continue running once the Conversation runs - because the ActionList it calls is technically no longer running.
The best way around this is to set your ActionList: Run Action's When running field to Stop, and then have the end of your Conversation ActionList use a separate ActionList: Run Action to resume the original list. If this Action's Run from start? option is unchecked, you can then specify a specific Action index to start from.
This field can be set by an Integer parameter, so you could make this dynamic by passing to this ActionList two additional parameters: a GameObject to mark which ActionList to run, and an Integer to mark which index of Action inside that list:
Thank you for your prompt reply.
I understand that a Conversation make an ActionList stop. However I'm still not sure how to solve this issue. I tried your solution though..
I added two variables 1)ActionList to resume and 2)ActionList index in my ActionList "ThreeCoiceQandA" and tired to call "ThreeCoiceQandA" by ActionList: Run but "ThreeCoiceQandA" is in my Assets folder so cannnot select it.
Let me share another screenshot for the ActionList: Run which is the OnStart Cutscene.
https://1drv.ms/u/s!AjiINOTvpl7kna8iWU4plHSqZ8LI_g?e=9sFHod
QuestionText in (88)ActionList: Run is never displayed and QuestionText in (89)ActionList: Run "Q2 xxx" is displayed.
I'm afraid I don't follow - where can you not select it? You're already referencing it in your OnStart cutscene.
If you need to reference an ActionList asset with a parameter, you can do so with the "Unity Object" type.
For the two ActionList: Run Actions in your OnStart screenshot, uncheck Wait until finish? and set the After running fields to Stop. My suggestion is to not run OnStart the whole time, but rather re-run it once ThreeCoiceQandA has completed.
Once you've added the two additional parameters to your ThreeCoiceQandA ActionList, the two ActionList: Run Actions in OnStart will be updated with these fields. To have the second run after the first, assign OnStart as the first Action's "ActionList to resume", and set its "ActionList index" to 89.
I carefully read your suggestions and now it worked.
Thank you very much!