Page 1 of 1

The sequence of a Player's conversation line does not run at the beginning?

Posted: Fri Sep 29, 2017 8:17 am
by doneykoo
The sequence of a Player's conversation line does not run at the beginning (of player choice), but it runs at the end after choice, what's wrong?

For example:

Npc1: blabla1
Sequence: SetActive(something, true)

Npc1: blabla2

Player: choice a
with Sequence: SetActive(something, false)
Player: choice b
with Sequence: SetActive(something, false)

Now the Sequences written in the player choice never runs at the beginning when the choice lines displayed. But instead, it runs after user choice.
How to solve it?

Re: The sequence of a Player's conversation line does not run at the beginning?

Posted: Fri Sep 29, 2017 10:12 am
by Tony Li
Hi,

That's intentional. It shouldn't run the sequence until the player has actually selected the choice.

If you want to run a sequence as soon as the player response menu appears, there are two ways:

1. On the preceding NPC node, tick the Add Response Menu Sequence checkbox, and enter the sequence in the Response Menu Sequence field.
  • Response Menu Sequence: Audio(Jeopardy_Music)
2. Or, if you don't want to add a Response Menu Sequence, add a "required" command to the end of the NPC node's regular Sequence, like this:
  • Dialogue Text: "What's your answer?"
  • Sequence: Camera(Closeup); required Audio(Jeopardy_Music)@99999
The "@99999" tells the Audio() command to wait until 99999 seconds have passed, but the "required" keyword guarantees that the sequencer command runs even if the player clicks the continue button before the time has passed.


If you want to run a sequencer command when the player hovers over a choice but hasn't clicked it yet, you'll need to use a script. You can use this example script which is on the Dialogue System Extras page.