Scripts / Track Distance Traveled

Author
Message
MrEaKing(YT)
7
Years of Service
User Offline
Joined: 9th Mar 2017
Location: Ontario
Posted: 11th Jul 2017 17:17


So this is a little code I wrote to roughly calculate the distance that the player has traveled and store it in a global variable g_dist_traveled. I know maybe not a lot of uses but something I wanted in my statistics and thought others may want it too.
MrEaKing(YT)
7
Years of Service
User Offline
Joined: 9th Mar 2017
Location: Ontario
Posted: 11th Jul 2017 17:29
DERP



got thinking after I posted with the bit I did to determine if you had hit a wall I could rewrite that to more accurately determine how far you've traveled with fewer lines and no timer.
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 11th Jul 2017 19:38
My version:

Been there, done that, got all the T-Shirts!
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 11th Jul 2017 20:41
@ MrEaKing(YT)
Cool you giving a try to the new LUA commands, I myself do when have some time left; here master LEE did a good job.
I thing maybe you being a bit redundant using ismoving var, since "GetGamePlayerControlMovement()" already do, ihmo.

my version



3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
MrEaKing(YT)
7
Years of Service
User Offline
Joined: 9th Mar 2017
Location: Ontario
Posted: 11th Jul 2017 20:56
Thank you both for your added scripts, gave me some new ways to think about it might use it later for other scripts.
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 11th Jul 2017 21:53
Your welcome.

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM

Login to post a reply

Server time is: 2024-03-28 12:21:43
Your offset time is: 2024-03-28 12:21:43