Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Licht61 on Wed 14/04/2021 09:53:42

Title: Enable and disable dialogue portraits? [Solved]
Post by: Licht61 on Wed 14/04/2021 09:53:42
In my game portraits of characters are shows during dialogues + I made comments from main hero about the environment through the cEgo.Say

And I was faced with problem - I am not satisfied that while examining the environment, a portrait of the main character is shown.

Are there any commands to enable the display of portraits strictly in dialogs and disable them in all other parts of the game? Something like enablind\disabling StatusBar, IconBar etc?
Title: Re: Enable and disable dialogue portraits?
Post by: Khris on Wed 14/04/2021 10:54:51
Sounds like you basically want to call
Code (ags) Select
  Speech.Style = eSpeechSierraWithBackground;
before a dialog,
and
Code (ags) Select
  Speech.Style = eSpeechLucasarts;
right before calling  stop  inside a dialog script.
Title: Re: Enable and disable dialogue portraits?
Post by: Licht61 on Tue 20/04/2021 15:06:24
Sorry for long silence!

It didn't work on the first try, but it turned out that for some reason I removed the portraits from the project lol. Upload them again and it works great. Thanks a lot!
Title: Re: Enable and disable dialogue portraits?
Post by: Licht61 on Fri 23/04/2021 17:36:28
It turned out to be a little different from how it works.

After the dialogue, when the main character comments on something from the environment (hotspots for example), his portrait is shown instead of his main sprite when I add Speech.Style = eSpeechLucasarts in Dialog file before "stop" command.

I tried to change cEgo.SpeechView to 0, but game crashes.
Title: Re: Enable and disable dialogue portraits? [not solved]
Post by: Khris on Mon 26/04/2021 11:26:44
Yeah, the two styles use speech views differently. You need to set back the SpeechView to the actual value. The game crashes because there is no view 0.
Title: Re: Enable and disable dialogue portraits? [Solved]
Post by: Licht61 on Mon 26/04/2021 15:02:14
Solved this problem by creating additional view for main hero with stand still frames.

Before dialogues I change SpeechView to Portrait View and before "stop" command in Dialog-file change this to this "stand still" View. 

Apparently, I'm in the role of a programmer - this is a bad idea. :grin:

Thank's again, Khris. You pushed me in the right direction!