Change sprite appearance during dialouge?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
nayadivide
Posts: 2
Joined: Sat Feb 18, 2023 3:18 pm

Change sprite appearance during dialouge?

Post by nayadivide »

Hi! Just got Dialogue System and I'm loving it, I'm currently creating a game where there are 2D characters in a 3D world, the 2D characters are billboard sprites, how do I have it so during dialogue, going from sentence to sentence the sprite's appearance changes (like in a visual novel) and how do I set it back to the original sprite after said conversation? Is this something Dialogue System can do?
nayadivide
Posts: 2
Joined: Sat Feb 18, 2023 3:18 pm

Re: Change sprite appearance during dialouge?

Post by nayadivide »

An example I'm thinking of is this bit from A Mall Near You, at 2:08

https://www.youtube.com/watch?v=uE2OFNnKons&t=151s
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Change sprite appearance during dialouge?

Post by Tony Li »

Hi,

Thanks for using the Dialogue System!

In the Dialogue Editor window's Actors section, inspect each actor. Assign portrait images to actor's Portrait Sprites section. Note the element number of each ([1], [2], [3], etc.).

The actor will use portrait 1 by default.

To use a different portrait when showing a dialogue entry node, include the markup tag [pic=#] in the Dialogue Text.

If you want to change portrait images for the duration of the conversation, set the SetPortrait() sequencer command instead.
kim
Posts: 4
Joined: Fri Mar 03, 2023 12:10 am

Re: Change sprite appearance during dialouge?

Post by kim »

Tony Li wrote: Sat Feb 18, 2023 4:18 pm Hi,

Thanks for using the Dialogue System!

In the Dialogue Editor window's Actors section, inspect each actor. Assign portrait images to actor's Portrait Sprites section. Note the element number of each ([1], [2], [3], etc.).

The actor will use portrait 1 by default.

To use a different portrait when showing a dialogue entry node, include the markup tag [pic=#] in the Dialogue Text.

If you want to change portrait images for the duration of the conversation, set the SetPortrait() sequencer command instead.
Hello.
I'm a different user, but I'm having a similar problem.
I have registered portrait sprites from [1] to [7] in Actor portrait and even tagged them with [pic=3] in Dialog Text, but the portrait is still outputting [1] (first one).
When I change the Tag to something else. For example, if I put [a], it displays italics as it should.
I don't know why only [pic=1,2,3,'''] doesn't work.
I am currently using the "JRPG Template Standard Dialog UI".
Can I try to import the Dialog system again?

Translated with www.DeepL.com/Translator (free version)
kim
Posts: 4
Joined: Fri Mar 03, 2023 12:10 am

Re: Change sprite appearance during dialouge?

Post by kim »

Oh, I found error. That is "IsPlayer" was checked.
I think... I understand dialogue system for unity a little bit...
JulissaGuerrero
Posts: 1
Joined: Fri Mar 03, 2023 2:20 am

Re: Change sprite appearance during dialouge?

Post by JulissaGuerrero »

I have a little bit of a handle on this. To change the appearance of a sprite during dialogue, you would need to create several different sprites for each animation or effect of the character's state and use them at points in time during the dialogue. For example, you could create sprites for an open mouth and a closed mouth, and use them to animate the character during the dialogue.To return the sprite to its original state after the dialogue, you would need to save the sprite state before the dialogue and restore it after the dialogue begins. You can do this by, for example, saving the sprite's ID or using its state before the dialogue begins and using the data to restore it to its original state after the dialogue.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Change sprite appearance during dialouge?

Post by Tony Li »

Hi,

If you have static (non-animated sprites), you can use [pic=#] markup tags or SetPortrait() sequencer command.

If you want to animate portrait images, please see Animated Portraits. You'll still have open mouth and close mouth sprites, but you'll set up animations for them and use the AnimatorPlay() sequencer command to play the animations.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Change sprite appearance during dialouge?

Post by Tony Li »

kim wrote: Fri Mar 03, 2023 2:21 amOh, I found error. That is "IsPlayer" was checked.
This may also be helpful: How To: Bypass Response Menu When Player Has One Choice
Post Reply