tf2 Ho. velocity counter
posted in Customization

I was looking at the surf plugins and thought to myself it would be pretty cool to have this ingame. so, is this idea possible?
Looking at cl_showpos this has your x y and z pos, as well as your angle, and your velocity. As most of you will know however, the velocity is your Horizontal velocity added to your vertical velocity. I want to make it so I can only see my horizontal speed and not vertical. Could I write a hud element or some kind of config to look at the x and y pos and display the average change per second?
say I am a scout and i walk in a 45 degree angle for 1 second. If my start pos was 0 0, then my new pos would have to be 200 200. The config/hud element would count 1 second and then add the 200s together showing that my horizontal velocity was 400. ideas? :3

I was looking at the surf plugins and thought to myself it would be pretty cool to have this ingame. so, is this idea possible?
Looking at cl_showpos this has your x y and z pos, as well as your angle, and your velocity. As most of you will know however, the velocity is your Horizontal velocity added to your vertical velocity. I want to make it so I can only see my horizontal speed and not vertical. Could I write a hud element or some kind of config to look at the x and y pos and display the average change per second?
say I am a scout and i walk in a 45 degree angle for 1 second. If my start pos was 0 0, then my new pos would have to be 200 200. The config/hud element would count 1 second and then add the 200s together showing that my horizontal velocity was 400. ideas? :3

bump

bump

Might be easier to just look at z pos change and subtract that from the showpos velocity
Well not subtract exactly, use pythagoras obviously but yeah

I can't code so no idea how feasible this all is. Probably not too difficult. Good luck

Might be easier to just look at z pos change and subtract that from the showpos velocity
Well not subtract exactly, use pythagoras obviously but yeah

I can't code so no idea how feasible this all is. Probably not too difficult. Good luck

I know YaLTeR got this to work in HL2, so it might be possible.

I know YaLTeR got this to work in HL2, so it might be possible.
MOOSE_say I am a scout and i walk in a 45 degree angle for 1 second. If my start pos was 0 0, then my new pos would have to be 200 200. The config/hud element would count 1 second and then add the 200s together showing that my horizontal velocity was 400. ideas?

here's an idea you could take a trig class lole lole lole

[quote=MOOSE_]say I am a scout and i walk in a 45 degree angle for 1 second. If my start pos was 0 0, then my new pos would have to be 200 200. The config/hud element would count 1 second and then add the 200s together showing that my horizontal velocity was 400. ideas?[/quote]

here's an idea you could take a trig class lole lole lole

velocity is not x + y + z, where x,y,z are speeds in each dimension.

it's a vector, which means it has a magnitude and a direction.

it sounds like you want the magnitude of velocity, which would be (x^2 + y^2 + z^2)^0.5

if you just want horizontal component, then (x^2 + y^2)^0.5

velocity is not x + y + z, where x,y,z are speeds in each dimension.

it's a vector, which means it has a magnitude and a direction.

it sounds like you want the magnitude of velocity, which would be (x^2 + y^2 + z^2)^0.5

if you just want horizontal component, then (x^2 + y^2)^0.5
aatjevelocity is not x + y + z, where x,y,z are speeds in each dimension.

it's a vector, which means it has a magnitude and a direction.

it sounds like you want the magnitude of velocity, which would be (x^2 + y^2 + z^2)^0.5

if you just want horizontal component, then (x^2 + y^2)^0.5

NERD

[quote=aatje]velocity is not x + y + z, where x,y,z are speeds in each dimension.

it's a vector, which means it has a magnitude and a direction.

it sounds like you want the magnitude of velocity, which would be (x^2 + y^2 + z^2)^0.5

if you just want horizontal component, then (x^2 + y^2)^0.5[/quote]

[size=16][b]NERD[/b][/size]
takramNERD

Posting something like that on a videogame forum

[quote=takram][size=16][b]NERD[/b][/size][/quote]

Posting something like that on a videogame forum [img]https://upload.wikimedia.org/wikipedia/commons/3/3b/Paris_Tuileries_Garden_Facepalm_statue.jpg[/img]
aatjevelocity is not x + y + z, where x,y,z are speeds in each dimension.

it's a vector, which means it has a magnitude and a direction.

it sounds like you want the magnitude of velocity, which would be (x^2 + y^2 + z^2)^0.5

if you just want horizontal component, then (x^2 + y^2)^0.5

ok but even if I did this I'm still not sure how to turn it into a hud element or config :3

[quote=aatje]velocity is not x + y + z, where x,y,z are speeds in each dimension.

it's a vector, which means it has a magnitude and a direction.

it sounds like you want the magnitude of velocity, which would be (x^2 + y^2 + z^2)^0.5

if you just want horizontal component, then (x^2 + y^2)^0.5 [/quote]
ok but even if I did this I'm still not sure how to turn it into a hud element or config :3
MOOSE_takramvelocity is not x + y + z, where x,y,z are speeds in each dimension.

it's a vector, which means it has a magnitude and a direction.

it sounds like you want the magnitude of velocity, which would be (x^2 + y^2 + z^2)^0.5

if you just want horizontal component, then (x^2 + y^2)^0.5
ok but even if I did this I'm still not sure how to turn it into a hud element or config :3

You can't since it's not possible to put any kind of math in the text fields. There is also no way to get the player's speed in the first place.

[quote=MOOSE_][quote=takram]velocity is not x + y + z, where x,y,z are speeds in each dimension.

it's a vector, which means it has a magnitude and a direction.

it sounds like you want the magnitude of velocity, which would be (x^2 + y^2 + z^2)^0.5

if you just want horizontal component, then (x^2 + y^2)^0.5 [/quote]
ok but even if I did this I'm still not sure how to turn it into a hud element or config :3[/quote]

You can't since it's not possible to put any kind of math in the text fields. There is also no way to get the player's speed in the first place.
oamgYou can't since it's not possible to put any kind of math in the text fields. There is also no way to get the player's speed in the first place.

what do you mean? cl_showpos 1?

[quote=oamg]You can't since it's not possible to put any kind of math in the text fields. There is also no way to get the player's speed in the first place.[/quote]
what do you mean? cl_showpos 1?
MOOSE_oamgYou can't since it's not possible to put any kind of math in the text fields. There is also no way to get the player's speed in the first place.what do you mean? cl_showpos 1?

There's no way to get those values and put them into a hud element, except with external programs and/or addons, which require insecure mode running. End of story.

[quote=MOOSE_][quote=oamg]You can't since it's not possible to put any kind of math in the text fields. There is also no way to get the player's speed in the first place.[/quote]
what do you mean? cl_showpos 1?[/quote]

There's no way to get those values and put them into a hud element, except with external programs and/or addons, which require insecure mode running. End of story.

I was derping around in csgo a few days ago and noticed that the cl_showpos 1 in cs only shows horizontal velocity, so obviously it is possible in source

I was derping around in csgo a few days ago and noticed that the cl_showpos 1 in cs only shows horizontal velocity, so obviously it is possible in source