What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

countdown timer in gps

Detk0rd

Member
Joined
Aug 14, 2014
Messages
178
Reaction score
0
Hey as the title states anyone know how to use a gps to be able to countdown or time it will take from point a to point b? Csnt seem to find it , appreciate everyone's hard work,
 
Can you give me a little context as to why you want to run a countdown/time it?
 
Can you give me a little context as to why you want to run a countdown/time it?

he want to know how long he needs from Point A to B.

@Detk0rd, read about the pythagoros (now you know why you learned it in the school :P) it works for vectors too. But maybe you find a function in the api which u can use.

The speed you can get via the api through the Creature prop toX, toY and toZ.
 
Last edited:
he want to know how long he needs from Point A to B.

@Detk0rd, read about the pythagoros (now you know why you learned it in the school :P) it works for vectors too. But maybe you find a function in the api which u can use.

The speed you can get via the api through the Creature prop toX, toY and toZ.

thanks for this will take a peak :)
 
he want to know how long he needs from Point A to B.

@Plugreg I get that, I asked why... For example: Is he asking so he can time speed buffs/mount abilities? I have code that could be useful, depending on what he is trying to accomplish. It is also possible that determining the run time isn't necessary, again, depending on what he is trying to accomplish. I asked for context because if I can help solve the greater problem, I'd rather spend my time doing that.

@Detk0rd speaking in euphemisms here: You've asked for tomato sauce, I have lasagna. If you're making lasagna, I should share it with you. However, if you're making spaghetti then tomato sauce is really what you need.

Here is the tomato sauce you've asked for, it might be missing some ingredients:
If you know the destinations x,y,z coordinates, you can get distance using dist(x, y, z); (Located in the Self Class)
Also located in the Self Class are the properties toX, toY, toZ. These store the speed you are moving. I'd start with the formula (dist(x, y, z)/(toX+toY+toZ)) test how accurate it is then adjust from there.

user
 
due to the limitations of gps at the moment, and the fact it will ALWAYS move in a straight line between points, using your current position, move to position, and your movement speed - Yes you can use the pythagoros theorem to accurately determine time between each point. To determine time from current position to the end of the route? much more diffficult, but still in theory possible
 
due to the limitations of gps at the moment, and the fact it will ALWAYS move in a straight line between points, using your current position, move to position, and your movement speed - Yes you can use the pythagoros theorem to accurately determine time between each point. To determine time from current position to the end of the route? much more diffficult, but still in theory possible

Same thing in loop :P
 
Yeah, I guess my "solution" could only be accurate if you were moving "As the crow flies", not taking into account twists, turns etc.
So, you can use Gps.GpsGetPath() to return the list of waypoints then loop through them like Sidalol mentioned. (starting with your current position)
 
Back
Top