I want to call various actions in my code to complete the dynamic actionlist.
ActionListAsset actionList = new ActionListAsset();
actionList.name = "tempActionListAsset";
actionList.isSkippable = false;
actionList.canSurviveSceneChanges = true;
// Declare the Actions within it
actionList.actions = new List<Action>();
ActionConversation actionConversation = ActionConversation.CreateNew(ConversationDoor);
actionConversation.overrideOptions = true;
It looks like this, but I don't know what to code next. I want to implement the effect that each Conversation option will then lead to a different actionlist.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
You can use the SetOutputs function to set the output sockets of an Action to either run another Action in the chain, or another Cutscene.
You'd first just need to set the numSockets variable to match the Conversation, i.e.:
Alternatively, you could generate ActionRunActionList instances (i.e. the ActionList: Run Action) for more options on what ActionList to run (including run asset files), and then have the options run those:
These should be set after the Actions have been added to the list. See the included ScriptedActionlistExample script's second example for how this is done with the ActionVarCheck.
Thanks a lot!