Character speed with a non-integer number

Started by placyd, Fri 29/02/2008 20:04:12

Previous topic - Next topic

placyd

Is there a way to set the character speed to a non-integer number, like 1,5?
Because my character walks too slow with the speed of 1, but walks too fast with the speed of 2. I can enter 1.5, but the speed doesn't change.

Ghost

#1
Speed is always a whole integer, but I am surprised that you consider 2 "to fast"- what are you using as a main character, a snail in a wheelchair? (no offence)

Gilbert

Since V2.72, AGS actually supports walking/moving speed that is a fraction, if you put a negative number, say -2, the speed is equivalent to 1/2, so you can make your characters/objects move slower if you wish.

UNFORTUNATELY,  it doesn't support speed like 1.5, 2.3, etc. (partially because of how moving/pathfinding/etc. is done in the engine), so what you want to have can't be done directly at the moment.

placyd

 ;D No, it's not a snail in a wheelchair, just a man.
Thanks for the answers, pity that I can't set this, but speed 1 maybe will be good for me.

Emerald

You could set a SkipUntilCharacterStops(cChar) command
so that when you press a certain key, the game skips to the point when the character stops moving (like in The Longest Journey).

Radiant

This is a hack, but you can use SetGameSpeed () to compensate.

Mikey

why dont you just rescale the background?

subspark

Nobody has asked why you need such an incremental adjustment to movement speed. If your trying to footsync, then I suggest you use the techniques presented in this thread:

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=33099.0

Or you could have a read of the Wiki which has an article dedicated to jerky motion. I'm not sure if this is your issue but I've mentioned it anyway.

http://americangirlscouts.org/agswiki/Graphics%2C_Characters%2C_Text_%26_Rooms#Jerky_character.2Fsprite_animation

Cheers,
Paul.

SMF spam blocked by CleanTalk