Enable and disable dialogue portraits? [Solved]

Started by Licht61, Wed 14/04/2021 09:53:42

Previous topic - Next topic

Licht61

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?

Khris

Sounds like you basically want to call
Code: ags
  Speech.Style = eSpeechSierraWithBackground;

before a dialog,
and
Code: ags
  Speech.Style = eSpeechLucasarts;

right before calling  stop  inside a dialog script.

Licht61

#2
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!

Licht61

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.

Khris

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.

Licht61

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!

SMF spam blocked by CleanTalk