Hehe yeah, same. I remember I needed it when I wanted to check how fast a bot was moving because I wanted to spawn a circle of flames around it without damaging it. Decided to make him invincible to his own bullets instead tho'. Less hassle.
Date Posted: August 23, 2007, 09:16:34 PM
Oh, by the way, if it's a problem and you've got processing time to spare, you can just do the following:
Make an array with positions and speeds (or velx and vely if you prefer) with enough space for each player (clear it on mapchange, onjoin, onrespawn and onleave)
speed[playernumber] = Distance( lastpositionx[playernumber], lastpositiony[playernumber], x[playernumber], y[playernumber] ) / numberoftickspassed
or
velX[playernumber] = ( x[playernumber] - lastpositionx[playernumber] ) / Timepassed
velY[playernumber] = ( y[playernumber] - lastpositiony[playernumber] ) / Timepassed
in AppOnIdle. Cumbersome, but it'd give you a measure of the velocity at least. Heavy on larger numbers of players tho'.