Origin -> Units
Alright, so I'm working on a plugin that involves finding the origin before an entity is mvoed, and then AFTER an entity is moved, and I need to subtract these two origins and then convert them to units. I've searched both LJ Stats plugins and have found nothing on how to convert the origin (which, when I tested it, was about 9 digits each axis) to units. If you're not familiar with LJ Stats, it gives an amount of units (usually around 240, 250, etc.) instead of the origin number. If anyone could give me an equation or method of converting these two things, I'd appreciated it.
Thanks. |
Re: Origin -> Units
im not sure if this is what u want, but using get_distance_f() will return the distane between the 2 origins
|
Re: Origin -> Units
Would this return the value in a float like 250.6789? Or would it give me some random origin like the nine digit one that I explained in my last post?
|
Re: Origin -> Units
If you want to find distance between 2 origins you can do it this way:
PHP Code:
|
Re: Origin -> Units
I'm very aware as to how I can store origins, but I need them to be stored in a certain way. If I had done the way that you've presented, I'd end up with a 8-10 digit number, doing me no good. I need a value to come out such as 256.8726 or something of that sort.
|
Re: Origin -> Units
My LJStats uses get_distance().
The difference is that it uses the distance from where the player jumped to where the player landed. Code:
|
Re: Origin -> Units
Ah, thought it would be a little more complicated than that.
Thanks Exolent. |
Re: Origin -> Units
Quote:
PHP Code:
|
| All times are GMT -4. The time now is 07:26. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.