Page 1 of 1

Change IsPlayer using Sequencer

Posted: Thu Feb 10, 2022 11:54 am
by davegagne
Hi there !

I was wondering if there was any easy way to change the IsPlayer bool using a sequencer. I've got certain NPCs that I'd like to get on the left side (Player side) of the dialogues for certain conversation. Do I have to create a custom script or can that be done built-in with a sequencer command?

At the moment, I'm trying this, but it doesn't work (really not sure SetVariable is the right thing to use here):

SetVariable(NonPlayer.isPlayer, true);

Thanks !

Dave

Re: Change IsPlayer using Sequencer

Posted: Thu Feb 10, 2022 1:16 pm
by Tony Li
Hi,

It sounds like what you really want to do is make an NPC appear in the (left-hand) subtitle panel that's usually used for PCs. If this is the case, you don't have to change the IsPlayer bool. Just tell the NPC to use that panel. If you inspect your dialogue UI's Standard Dialogue UI component, you'll see that the subtitle panels are numbered 0, 1, 2, etc.

To tell a character to use a panel for a single dialogue entry node, include a [panel=#] markup tag in the dialogue text. For example, assuming the left-hand panel is panel #1:
  • Dialogue Text: "I'm on the left side. [panel=1]"
To tell a character to use a panel from now on, use the SetPanel() sequencer command:
  • Dialogue Text: "I, Bob, am on the left side now and will stay on the left side."
  • Sequence: {{default}}; SetPanel(Bob, 1)

Re: Change IsPlayer using Sequencer

Posted: Thu Feb 10, 2022 1:19 pm
by davegagne
Thanks Tony,

I'll try that ASAP and reach back.

Thanks for the prompt answer !

Dave

Re: Change IsPlayer using Sequencer

Posted: Thu Feb 10, 2022 3:42 pm
by davegagne
Hi Tony,

Happy to report this achieves exactly what I wanted to do. Thanks again for your help !

Dave

Re: Change IsPlayer using Sequencer

Posted: Thu Feb 10, 2022 4:04 pm
by Tony Li
Glad I could help! :-)