Note: This is an archived post that was originally sent to the Hollywood mailing list on Wed, 15 Feb 2006 22:28:47 +0100
Hello!
I would like to move a single sprite with very slow speed. If I set the speed to 1, there is 1 pixel movement per refresh. But how can I make an even slower movement?
[15 Feb 2006] slow motion
[15 Feb 2006] Re: slow motion
Note: This is an archived post that was originally sent to the Hollywood mailing list on Wed, 15 Feb 2006 13:44:29 -0800 (PST)
Have you tried using SetInterval() to accomplish this?
Have you tried using SetInterval() to accomplish this?
[16 Feb 2006] Re: slow motion
Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 16 Feb 2006 07:57:49 +0100
Use a loop and within the loop check an interval, as i don't have the documentation here that is all for the moment that i can say about that
Use a loop and within the loop check an interval, as i don't have the documentation here that is all for the moment that i can say about that
-
SamuraiCrow
- Posts: 475
- Joined: Fri May 15, 2015 5:15 pm
- Location: Waterville, Minnesota USA
[16 Feb 2006] RE: slow motion
Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 16 Feb 2006 09:51:16 -0600
Divide the fine coordinates by the course increment you want to happen on the screen.
For example if you want to move 3/16 of a pixel in the x direction then
Divide the fine coordinates by the course increment you want to happen on the screen.
For example if you want to move 3/16 of a pixel in the x direction then
Code: Select all
x=x+3
position=x/16
I'm on registered MorphOS using FlowStudio.