Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Glenjamin on Wed 19/08/2015 01:58:32

Title: Slow movement speeds for background objects.
Post by: Glenjamin on Wed 19/08/2015 01:58:32
In my game, I'm making a character walk (It's just an object with the move function) in the background whilst the player stands in the foreground. The only issue is, he moves way to fast.

This is my code.
Code (ags) Select


cshadow.Move(-100, 64, 1, eNoBlock, eAnywhere);


Now a logical thing to do would be put something like 0.5 in for the speed, but obviously that doesn't work. How can I make the object move slower than 1?
Title: Re: Slow movement speeds for background objects.
Post by: Gilbert on Wed 19/08/2015 03:03:10
For characters, putting a negative number for the speed parameter will make them move slower. I don't know whether objects do the same (they most probably do, but the current explanations in the manual is not very clear, which form a labyrinth of loops, like in Object.Move() it just mentions to refer to Character.Move() for details, and in Character.Move() refer to Character.Walk() and then further points you to the general Characters section) and if that doesn't work for objects, just use a character instead.
Title: Re: Slow movement speeds for background objects.
Post by: Slasher on Wed 19/08/2015 07:08:34
QuoteFor characters, putting a negative number for the speed parameter will make them move slower. I don't know whether objects do the same
Objects do take negative numbers -

Example (assuming that your cshadow is an object):
Code (ags) Select

cshadow.Move(-100, 64, -10, eNoBlock, eAnywhere); //  -10: will move slowly





Title: Re: Slow movement speeds for background objects.
Post by: Monsieur OUXX on Thu 20/08/2015 13:39:00
Mildly relevant: The one annoying thing about idle animations is the delay. It's changed only through script, and when you're a beginner it's hard to find in the help if you don't know what you're looking for.