Hitting the "skip" button normally does all logic in an action list instantly, but I know it can stop early sometimes- specifically when it hits a conversation.
I'd like to force an action list to stop at a specific point that isn't a conversation, but I can't figure out how. I thought making my custom action override the Skip action would do it:
override public void Skip()
{
Run();
}
But that just seems to run the custom action's code after the rest of the action list has completed.
Any advice is appreciated.
Comments
Once an ActionList has been told to skip, it cannot only skip a portion - it must do it all. If you want your sequence to end at a certain point after skipping, you can move the Actions you don't wish to skip to a new Cutscene and call it at the end of the original ActionList. Uncheck Is skippable? in the new Cutscene's properties, and you should find that it then runs as normal while everything before it skips.
If I can't do that I guess my best bet is to just take skipping out of the final build! >:D<
I imagine having an Action tell an ActionList to stop skipping entirely would lead to unwanted complications given the complexity of the system, however you can use the ActionList: Check running Action to determine if the ActionList it's in is currently skipping.
You can use this to basically do nothing if it so - would this have the same effect for you?
I'm not sure I understand your goal explanation - could you elaborate? Know that ActionLists can be recycled by using ActionList parameters, if that's relevant.
I would recommend first making the system work without parameters, using just one TDL question as a test-case, and only introducing parameters once it works as intended without them.
The approach I would probably take would be to create a new "Pop Up" Global Variable that is used to store the current question being asked. In an "Init UI" ActionList asset, then create a Variable: Set Action that sets this variable to a parameterised value followed by the Actions to turn on / animate the UI.
Whenever it's time to ask a question, you can then call this ActionList using the ActionList: Run Action and set the value of the Global Variable from there.
A separate ActionList could be used to work out if the player's choice is the asked question's correct answer by reading the choice, the PopUp variable value, and setting the value of another global Variable (this time a Boolean) accordingly. Make the "correct answer" an Integer parameter and use the ActionList: Check parameter value to read it inside your ActionList.
You could then run that ActionList when a button is clicked, setting the integer parameter to 0, 1, or 2 depending on which button. If you use the Conversation approach, know that you can check Override options within the Dialogue: Start conversation Action to place all responses within the same ActionList (which could be the same one that opens the UI).
I can try to provide more robust steps if needed, but have a look into this feature/approach if you haven't already and see if it's a good fit for the situation.
I'd actually already tried most of what you were talking about- I got it working both as a custom action and as a conversation, but all non-conversation options weren't letting me break from skipping. My question kind of morphed into needing help with animations, but I've since figured out everything I was doing wrong- I just hadn't done enough research and rifling through the manual yet. Thanks a lot for the help, though!
That said, you can implement a simple custom Action to get the behaviour you're describing:
1) Inside SkippableActionList (added the "List" as this was confusing me a little), but before the UnskippableActionList run-call, check to see if the list is currently being skipped, and set a Global Boolean variable True/False accordingly (named, e.g. "ContinueSkipping"). This can be done with the ActionList: Check running Action and a pair of Variable: Set Actions.
2) Again inside SkippableActionList, but after the UnskippableActionList run-call, check the value of this variable. If it is True (or whichever value denotes the list was previously being skipped), invoke the EndCutscene input manually with the code:
AC.KickStarter.playerInput.SimulateInputButton ("EndCutscene");
I haven't tested it mind, but I expect that may give you the same effect.