I can't assign view for character

Started by paolamurias, Wed 14/11/2012 00:11:44

Previous topic - Next topic

paolamurias

Hello, this is my first post and I will make a newbie question:
Import-Ya sprites
-I created the views
-I created the new character
How do I assign the view to the character? How do I make that character use these view loops and not others?
Thanks

MurrayL

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

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:
Code: AGS

cYourChar.ChangeView(10); // Change YourChar's 'Normal' view to view 10
cYourChar.SpeechView = 11; // Change YourChar's 'Speech' view to view 11

Slasher

QuoteTo make a more permanent change, like a change of costume, you can do this instead:
And don't for get to change its idle view .

cEgo.SetIdleView(12, 30);

will change/set the character EGO's idle view to 12. The idle view will be played if the character is idle for 30 seconds.

Simply amend above to your characters player script name.




paolamurias

Thank's! it slowly starts to work ...

SMF spam blocked by CleanTalk