Is it possible to change the angle of the player character? (2 Solutions)

Started by silverwolfpet, Sun 07/08/2011 11:29:29

Previous topic - Next topic

silverwolfpet

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?

barefoot

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

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..



I May Not Be Perfect but I Have A Big Heart ..

Dualnames

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.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

silverwolfpet

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).

SMF spam blocked by CleanTalk