ok, i`m not sure of a clear way of explaining this, but is there any way of changing the angle at which ags decides your character is walking up or down as opposed to left and right? Basically I am only using up and down walking animations ( I did make left and right ones but much prefer it without them) and for left and right am using the down anim. For up-left/right I am using the up anim and for down-left/right I am using the down anim. However when moving up-right or up-left the engine often uses the left and right cycles instead (so it looks like he`s moving down, but up!). Is there any way of changing the settings so that left and right are very clearly defined as being 270 degrees and 90 degrees respectively and that for any movement above this the engine uses the up-left/right cycles?
Hope that makes sense. Cheers -Will
Try the "MoveCharacterPath" command.
Currently not I'm afraid. The engine uses equal 1/8th portions for the directions - so the angle between 68 and 112 degrees is East, 113-158 is South-East, 159-202 is South, and so forth.
oh well, at least what i said must of made sense. i personally vote for that being made a feature in ags one day. word :)
If you are primarily using up/down movement (like top-down console-style game) why not just make the left/right walking frames the same as the up/down? (Or if you want left/right to be only 270/90 then just make the 1/8 perspectives the same as up/down)
Well, if your character isn't allowed to walk zig-zag paths you could make two different walking views: one consisting of move-up sprites and another of move-down. Then before executing the move command assign the appropriate view depending on what the Y-direction the char is ordered to walk. To check the direction you could verify his current Y co-ordinate and destination Y co-ordinate:
function MoveCharacterUpDown(int CharId, int destX, int destY) {
if (destY < character[CharID].y) ChangeCharacterView(ID, <up walk view>);
else ChangeCharacterView(ID, <down walk view>);
MoveCharacter(CharID, destX, destY);
}
the function could be imported via the script header if you want to use it in all rooms:
import function MoveCharacterUpDown(int CharId, int destX, int destY);
-Cheers