Page 2 of 2

Re: Alternate portrait not registering

Posted: Tue Aug 16, 2016 8:48 pm
by Tony Li
Hi,

Great! Now it's just a matter of configuring it to work exactly the way you want.

At what point do you want the player's portrait to change? Keep in mind that the SetPortrait() command will take effect in the next response menu.

Take the conversation below for example. Let's say the default portrait is a happy face, and portrait #2 is a grumpy face.
  • [0] NPC: "How's it going?"
    • [1] Player: "Grrr, I'm grumpy." { Sequence: SetPortrait(Player,pic=2) }
      • [2] NPC: "Sorry to hear it. Want some ice cream?"
        • [3] Player: "Harrumph! Well... okay."
This conversation has two player response menus, on dialogue entry nodes [1] and [3]. The menu for [1] will use the default portrait (happy face). When the player selects node [1] (and not before), node [1] will execute its Sequence, which will record portrait #2 as the current portrait image. When the menu appears again for [3], it should use portrait #2.

If you want menu [1] to use a grumpy face, you'll need to move the SetPortrait(Player,pic=2) command earlier, such as in node [0].

Re: Alternate portrait not registering

Posted: Wed Aug 17, 2016 6:00 am
by Laurie_CF
Hi Tony,

Sorry, I think I wasn't quite clear. The SetPortrait() command only worked when Show PC Subtitles During Line was ticked. Once I untick it, the portraits remain unchanging, no matter where the command is placed.

But when Show PC Subtitles During Line is ticked, the dialogue system does not work as intended and effectively shows each message twice, and the portrait only changes on the second time.

And thanks for the clarification on where to put the sequence, that makes sense.

Thank you!

Re: Alternate portrait not registering

Posted: Wed Aug 17, 2016 6:51 am
by Tony Li
Hi,

Try assigning the same PC portrait image UI element to Response Menu > PC Image. So it should be assigned to PC Subtitle > Portrait Image and Response Menu > PC Image.

Re: Alternate portrait not registering

Posted: Wed Aug 17, 2016 7:51 am
by Laurie_CF
Hi Tony, looking forward to trying this.

I think perhaps our UI structure might be a bit off, as I'm not seeing the objects you're mentioning. Here's mine:
Screen Shot 2016-08-17 at 12.40.30.png
Screen Shot 2016-08-17 at 12.40.30.png (63.26 KiB) Viewed 1470 times
(I'm sorry my screenshots are always too big, retina display)

I'm not sure which template our UI was built from, but I think it was one of the JRPG ones. Are we missing something to have these features working?

Thanks as always

Re: Alternate portrait not registering

Posted: Wed Aug 17, 2016 8:34 am
by Tony Li
I think it should still work with your current UI structure.

Inspect PerpetualNight Dialogue UI with Continue Button. Under Dialogue > Response Menu, locate the field named PC Image. Make sure the child GameObject Portrait Image is assigned to PC Image.

If it's already set that way, please let me know.

Re: Alternate portrait not registering

Posted: Wed Aug 17, 2016 9:20 am
by Laurie_CF
Hi Tony,

It seems to be correct:
Screen Shot 2016-08-17 at 14.18.08.png
Screen Shot 2016-08-17 at 14.18.08.png (223.81 KiB) Viewed 1468 times

Re: Alternate portrait not registering

Posted: Wed Aug 17, 2016 9:26 am
by Tony Li
Hmm, I'm out at a customer site at the moment, but when I get back to the office (in about 6 hours), I'll give it a test with the same UI structure.

As a test, does it work correctly if you temporarily switch to a different UI such as the legacy Circle UI or the Generic Unity UI?

Re: Alternate portrait not registering

Posted: Wed Aug 17, 2016 4:19 pm
by Laurie_CF
Hi Tony,

That would be great, thank you. Though I'm increasingly feeling that there must be something interfering on my end, rather than a problem with DSfU. Thank you for trying though!

The issue remained when testing Circle UI, and I tried a few Generic Unity UIs, but they didn't seem to feature PC portraits.

Re: Alternate portrait not registering

Posted: Wed Aug 17, 2016 8:48 pm
by Tony Li
If the issue remained with the other UIs, it's probably not a UI issue. Unfortunately, I don't know how to reproduce it. Here's an example scene that uses a UI structure similar to your screenshot:

Test_Laurie_CF_2016-08-17.unitypackage

I built it in Unity 5.3.4. (I forgot to ask you what version of Unity you're using.) It imports into a folder named "Test".

If you play the scene, it will start a conversation right away. After the first player response menu, the next NPC line will change the player's portrait. The second player response menu will show a different player portrait (with a red guy instead of the trooper model portrait).

If that doesn't shed any light on the issue, would it be possible for you to send a pared-down example scene to tony (at) pixelcrushers.com? Even if it doesn't include any graphics assets or other content, as long as it can demonstrate the issue it should help me get to the bottom of it.