Skipping Sequences

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
VoodooDetective
Posts: 222
Joined: Wed Jan 22, 2020 10:48 pm

Skipping Sequences

Post by VoodooDetective »

I've been working on a point-and-click adventure game for a while, and one of the requested features I've gotten back repeatedly from beta testers is the ability to skip dialogue.

For nodes without sequences, that ends up being pretty easy, but it's more complicated for nodes that script stuff out.

For instance, I might have nodes that, with my custom sequencer commands, cause a character to walk from one location to another. To skip that, I'd have to have the character teleport.

I know you can used the "required" keyword to force a command to execute the moment the skip button is pressed, but I was wondering if that means there's some corresponding method we can implement in the custom sequencer commands to react to a skip request. So if the sequencer command is one with a "Wait" suffix, then it has the option of performing it's duties in an immediate manner. So for WalkTo().Skip(), this would cause a player to teleport rather than walk.

Just curious how other folks tackle this.
User avatar
Tony Li
Posts: 22032
Joined: Thu Jul 18, 2013 1:27 pm

Re: Skipping Sequences

Post by Tony Li »

Hi,

The built-in sequencer commands that run over time always set up the final result in OnDestroy(). For example, the MoveTo() moves a GameObject over time. But if you skip ahead, its OnDestroy() method, which always runs even if you skip, will place the GameObject in its final position.

Can you write your custom sequencer commands to do the same?

If you find any built-in sequencer commands that fail to set up the final result if skipped, please let me know.
VoodooDetective
Posts: 222
Joined: Wed Jan 22, 2020 10:48 pm

Re: Skipping Sequences

Post by VoodooDetective »

Ahh that's exactly what I was looking for! OK so if I want something to happen regardless of whether or not it's waiting on a message, I need to add required.

Then, if I want that command to do the correct thing, even when skipped, I should implement OnDestroy.

That's very helpful, thanks for explaining it! I totally apologize if I just missed that documentation.
User avatar
Tony Li
Posts: 22032
Joined: Thu Jul 18, 2013 1:27 pm

Re: Skipping Sequences

Post by Tony Li »

Glad to help!
Post Reply