|
-
Apr 7th, 2002, 07:10 AM
#11
Member
I think that's an example winsonlee is giving us.
Goes like this:
You need to know how far along the journey you are. Therefore:
Code:
k = timetotal / timenow
i = (x1 - x2) / k
j = (y1 - y2) / k
if j < 0 then j = -j
if i < 0 then i = -i
makecircle(i, j)
Sorry about the psuedo-code.
That gets the totaltime, and divides it by the time now (in your case, equalling 2, because 6/3 = 2/1 = 2)
Then, it gets the point in the middle of the line (assuming the line is from x1, y1 to x2, y2), and stores the points at i, j.
The little if statements make sure i and j are not negative (x1-x2 sometimes does that)
Then it makes a circle and i, j.
if you want to do that after 3 horus, just use the timer (1000 = 1 second, so 60000 = I minute, so 3600000 = 1 hour, so 10800000 = 3 hours), or use GetTickCount, and put in 10800000.
If you don't know how to use GetTickCount, sorry, I have to go now. 
Good luck.
Last edited by SapphireGreen; Apr 7th, 2002 at 07:13 AM.
On Error Give Up
Mind over matter. Then if it doesn't matter, you lose your mind.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|