Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Alexis Vale on Fri 18/06/2004 19:26:32

Title: Sprite to Animation Alignment
Post by: Alexis Vale on Fri 18/06/2004 19:26:32
I have my character move to a point (to the window). I change the view and animate it (opening the window). I change the view back to normal (normal view).

Unfortunately, the sprites do not align up where the character is. Will I have to change my sprites so the character aligns up? My sprite that I animate has both the window and the character in it. Will I have to split them?
Title: Re: Sprite to Animation Alignment
Post by: viktor on Fri 18/06/2004 19:30:51
Well...
I'm no ecspert but I think that you einther have to or your character is positioned on the exact same spot as in your animation. But that is dificult to do (at least for me).
Title: Re: Sprite to Animation Alignment
Post by: TerranRich on Fri 18/06/2004 21:44:15
If I understand correctly, the character's center and your animation's center are not aligned. You should try adding transparent space to one end of the animation's sprites to adjust the alignment of the centers.

For example, if the anmation's center is two pixels to the left of the character's sprite's center, add four to the left to adjust the animation's center. This will appear to move the animation two pixels to the left.
Title: Re: Sprite to Animation Alignment
Post by: Ashen on Fri 18/06/2004 21:44:17
Are the 'opening the window' view sprites a different size to the normal view sprites? It sounds like that would be the case.

If so, you can either split them up and redo the view, like you said, or play with the SetCharacterViewEx() or SetCharacterViewOffset() commands, to align them properly.