Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: AnimeKA on Wed 02/04/2014 06:42:43

Title: Help in changing character portraits
Post by: AnimeKA on Wed 02/04/2014 06:42:43
Hello everyone,

i only just recently started using AGS and I been through the tutorial and I already working on a short game for my project however I basically a noob when it comes to programming. My game is technically features characters with different expressions during conversation. I need to know how to change character portraits"example, when the conversation hits a certain sentence the main character portrait(different expression) will change"
Title: Re: Help in changing character portraits
Post by: Andail on Wed 02/04/2014 07:44:07
You can insert e.g.
cEgo.SpeechView = 5;
whereever you want in the dialog. If you're using the standard dialog editor, remember to indent normal code with at least one space. Thus:

ego: How are you?
sidekick: My mother just died.
cEgo.SpeechView = [number of sad view];
ego: That's terrible!

For a large game, it might be wise to create custom functions for this so you don't have to remember which view is which, but I don't know if you find that too advanced at this point.
Title: Re: Help in changing character portraits
Post by: AnimeKA on Mon 07/04/2014 05:59:10
Tried it. Although it does make my Views a little messy but the command is simple and that's whats important. Thanks a lot.