• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] How To Calculate Total Distance Travel

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
^
If I do that, when I return back to Point A, the total distance travelled would be 0 (as in you calculated Displacement instead of Distance Travelled).

@themerion
As I've stated earlier, I want Distance Travelled, not Displacement.
In that thread, it uses Turn-based Movement System in which the unit will halt its movement when travel to a distance >= 600, if that unit make a turn and goes back to initial location, the distance still will be 0 and the unit won't stop its turn yet until it is fully traversed 600 range OR the user decides to end the turn prematurely (I don't know, it's his game, just making assumption).
 
Level 4
Joined
Jan 27, 2010
Messages
133
Ah, no, your assumption is wrong.

He is not using original location except in the beginning of the trigger. He's checking with the location the unit had 0.1 seconds ago, and adding up the distance. His trigger checks distance travelled (if you scroll down, you see the setup triggers).
 
Status
Not open for further replies.
Top