Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: silverwolfpet on Sun 07/08/2011 11:29:29

Title: Is it possible to change the angle of the player character? (2 Solutions)
Post by: silverwolfpet on Sun 07/08/2011 11:29:29
Let's say your character has to walk up a hill.
For comic purposes, you don't want him to be 100% vertical as he climbs that hill. You want him to be perpendicular on the hill's surface.
So, if the hill has an inclination angle of, let's say, 30 degrees... your character should have the same inclination angle.

I've checked the rotation function and it's not exactly what I need (or maybe I didn't quite understand how it works).
Basically, one would need to make all the character frames (from standing to walking, talking etc.) inclined. In just one room.

Any thoughts, please?
Title: Re: Is it possible to change the angle of the player character?
Post by: barefoot on Sun 07/08/2011 14:43:55
One possibility is as you said: make a new view with the needed loop views for when the character walks up or down the hill. This will call for you to import the inclined sprites into the views frames. You will also need new talking views if he talks and possibly new idle view if required.

For reference:

Simply use this to change players normal view when it is required:

player.ChangeView();


This could be when he walks on a region or part of an if function etc..

This new view can be used in any room just by calling it.

There will be other ways and Im sure someone will let you know..



Title: Re: Is it possible to change the angle of the player character?
Post by: Dualnames on Sun 07/08/2011 15:24:25
Skewing/Distorting the player's current sprites, may be a bit more complicated and harder to do, than just doing it in photoshop. I may therefore suggest you do that.
Title: Re: Is it possible to change the angle of the player character?
Post by: silverwolfpet on Tue 09/08/2011 20:32:00
Thanks guys... :)

I think I'll go with the easier version. No hills  ;D

Still, the answers were useful... I'm naming this thread (solutions inside).