Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: croquetasesina on Thu 04/07/2019 12:24:58

Title: problems when finishing an animation
Post by: croquetasesina on Thu 04/07/2019 12:24:58
I have a problem, and that is that I make a change from the normal view of a character to another view to make an animation. When I finish it I return to the normal view but the character appears in another place, because the animation is wider than the normal view of the character. How could I solve it?
Title: Re: problems when finishing an animation
Post by: Laura Hunt on Thu 04/07/2019 12:50:38
One option that comes to mind would be to store the character's x and y coordinates in a couple of variables right before you switch views, and use them to restore the character's position when you return to its normal view. It might happen that the character will appear in the displaced position for like a fraction of a second though? Try it out and see! :)
Title: Re: problems when finishing an animation
Post by: Cassiebsg on Thu 04/07/2019 12:52:16
You either have to align your animation sprites with the normal view (the best way to do it from the start).
Otherwise you can change the characters coordinates (x & y) just prior to unlocking the view, so that your character "jumps" to place without the player noticing it.
Title: Re: problems when finishing an animation
Post by: Slasher on Thu 04/07/2019 13:00:46
Is this just in one room?

If all else fails you could use a dummy character... set it's x y in relation to the player and tweak between player & dummy... This may be an option..

Title: Re: problems when finishing an animation
Post by: Laura Hunt on Thu 04/07/2019 13:41:46
Quote from: Cassiebsg on Thu 04/07/2019 12:52:16
You either have to align your animation sprites with the normal view (the best way to do it from the start).

(nod) This, though.

Working with a professional artist has taught me that nothing beats careful planning and doing things right from the get-go to allow for maximum flexibility. For example, when it turned out that the solution to a problem I had was to replace walk-behind areas with objects, it wasn't an issue because the artist had already created all room assets as separate sprites rather than painting them directly on the background -- and he also anticipated the exact issue with animations that croqueta is having, which is why he's creating all character sprites and animations with this in mind.

Now, if I could only apply this same attitude to my own coding habits... :-D