Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Fri 19/05/2006 05:18:28

Title: Problem with character direction after QuickAnimation.
Post by: on Fri 19/05/2006 05:18:28
Got a very small problem with the way that Quick Animation from the interaction menu returns the player to it's "base" view at the first frame of the first loop once it is finished.

I've got my character picking up an object to his right. Before he starts the Quick Animation, he is facing right. After he's finished however, it returns him to a forward facing position.

Am I able to identify and store the character's current loop? My plan is to write an alternative function that handles animations and returns the character to that loop and view.
Title: Re: Problem with character direction after QuickAnimation.
Post by: Ashen on Fri 19/05/2006 12:06:32
Use the Character.Loop property (http://www.adventuregamestudio.co.uk/manual/Character.Loop.htm), and a variable to store it. There's no way to do it using Interaction Editor commands AFAIK, but that doesn't matter if you're thinking of writing a function anyway. Character.LockView (http://www.adventuregamestudio.co.uk/manual/Character.LockView.htm) can be used to temporarily change the character view as in the 'Quick Animation' command. Read the rest of the Character functions & properties in the manual for any others you might need.

Using the interaction editor, you could move the animation to loop 2 (right facing) - when the character is returned to its normal view, it will keep that loop, which is why using loop 0 leaves them facing forward. However depending on the number of animations you have, this might not be practical. (And if you don't mind the idea of scripting, you might as well start before you've got too much done anyway.)
Title: Re: Problem with character direction after QuickAnimation.
Post by: on Sat 20/05/2006 12:46:13
Thanks for this. I took what seemed to be the easy road (ensuring that all my animations had a loop for each direction) and it works like a charm. The Character.Loop property might come in handy down the road though, thanks.