To set up a character's default views, double click them (under Characters) in the editor and assign the view numbers you want in the little Properties box (bottom-right of the screen).
You can set view numbers for 'Normal' (standing/walking), 'Speech' (looped while talking), 'Idle' (played after a little while of not moving) and 'Blink' (which makes characters blink, but only if you're using Sierra style speech).
To change a character's view in a script during the game, it depends on whether you want it to be temporary (like for a one-off animation) or permanent (like for a change of clothes).
To temporarily change view, you use something like this:
Code: AGS
To make a more permanent change, like a change of costume, you can do this instead:
Code: AGS
You can set view numbers for 'Normal' (standing/walking), 'Speech' (looped while talking), 'Idle' (played after a little while of not moving) and 'Blink' (which makes characters blink, but only if you're using Sierra style speech).
To change a character's view in a script during the game, it depends on whether you want it to be temporary (like for a one-off animation) or permanent (like for a change of clothes).
To temporarily change view, you use something like this:
cYourChar.LockView(10); // Lock YourChar's view to view number 10
cYourChar.Animate(0, 3, eBlock); // Animate YourChar using loop 0 of the locked view, at a speed of 3.
cYourChar.UnlockView(); // Returns YourChar's view to the 'Normal' one you set in the editor.
To make a more permanent change, like a change of costume, you can do this instead:
cYourChar.ChangeView(10); // Change YourChar's 'Normal' view to view 10
cYourChar.SpeechView = 11; // Change YourChar's 'Speech' view to view 11