Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: lilinuyasha on Wed 11/03/2015 16:40:16

Title: Variable character speeds?
Post by: lilinuyasha on Wed 11/03/2015 16:40:16
I tried searchign for this and couldn't find anything, so here goes.

How would I mkae a character walk faster than their normal walking speed? I'm trying to have a guilty character Dash out of the room as fast as possible, which seems really anticlimactic at her normal walk speed. How would I make this faster?

note:I don't have running (Actually, given that they're all ponies, galloping) animations.
Title: Re: Variable character speeds?
Post by: NickyNyce on Wed 11/03/2015 17:40:24
check out... Character.SetWalkSpeed

Code (ags) Select
cEgo.SetWalkSpeed(10, 10);
Title: Re: Variable character speeds?
Post by: lilinuyasha on Wed 11/03/2015 18:07:03
hm. I seemed to have missed that. I was looking at "speed" in the dynamic list and it didn't come up. Thanks!
Title: Re: Variable character speeds?
Post by: Snarky on Wed 11/03/2015 18:17:50
But if you're using the same animations as for the regular walk, you don't want to mess with the walkspeed, because that's basically the "step length." Your character will animate at the same speed, but jump further between each frame.

What you want instead is (the slightly misnamed) Character.AnimationSpeed, which is how long it holds each animation frame. Set it to a low value (like 1 or 2), and the animation will fly more quickly, and the character move correspondingly faster.