Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Frogman on Sat 27/09/2003 16:04:50

Title: changing char speeds mid-movement
Post by: Frogman on Sat 27/09/2003 16:04:50
I know you have to use a StopMoving script before you can change a character's walking speed/animations...well, is there someway around this?  I'm looking into a Final Fantasy type walking system where you hold an arrow key to move, then Shift or something to run.

Oh.  Also, is there a way to return the coordinates of where a certain character or object is moving to?  For example, so you could "pause" the game but still mess with options, or change where they're supposed to go.  I'm thinking Baldur's Gate or some CRPG like that.
Title: Re:changing char speeds mid-movement
Post by: Ishmael on Sat 27/09/2003 16:31:43
you should pass the cords as varibables:

MoveCharacter(EGO,egomovx,egomovy);

or something
Title: Re:changing char speeds mid-movement
Post by: Pumaman on Sat 27/09/2003 20:19:38
The movement path is calculated when the move starts, thus without a rewrite of the pathfinder algorithm it's not possible to adjust speed mid-move. If you were to only use MoveCharacterStraight commands though, you could stop and restart the move without the player noticing.

To find the destination for the move, currently the only way to do that would be to record the destination co-ordinates in variables when you issue a Move command, as TK says.