OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: .pablo. on 23 Jul 2003, 01:52:38

Title: velocity
Post by: .pablo. on 23 Jul 2003, 01:52:38
has anyone written a script that gets the velocity of a person/vehicle/whatever in one number (instead of in an array)?
Title: Re:velocity
Post by: deaddog on 23 Jul 2003, 03:13:29
It's the "speed" function.

Speed returns the velocity in km/h.  To convert to meters/second, multiply the results by 0.277:

_s = (speed player) * 0.2777

Title: Re:velocity
Post by: Sui on 23 Jul 2003, 03:14:25
Err... velocity is a vector (ie. has a directional component) and as such can't be expressed as a single number...

However, if it's speed you're after, you can use the command:

speed unit

To find the linear speed of a unit ;)

[size=0.5]Edit: Bah! Beaten!! ;D[/size]
Title: Re:velocity
Post by: .pablo. on 23 Jul 2003, 03:27:45
you sound just like my last physics teacher :P

thanks for the info!!