Author Topic: [RESOURCE] Blocko measurement functions  (Read 788 times)

First column is function, second column is full conversion, third column is simplified conversion.

Blockland uses units to measure things like velocity and position. There is no set name for these units. I can, however, tell you that 1 unit makes two bricks.

50 bricks = 75 feet


mConvertUnitsToMPH()   * 1.5 * 2 / 5280 * 60 * 60      * 1080 / 5280
mConvertUnitsToKPH()   * 1.5 * 2 / 5280 * 60 * 60 * 1.6093   * 1738.044 / 5280

mConvertKPHToMPH()   / 1.6093
mConvertMPHToKPH()   * 1.6093

mConvertBPSToMPH()   mConvertUnitsToMPH(%) / 2      * 1080 / 5280 / 2
mConvertBPSToKPH()   mConvertUnitsToKPH(%) / 2      * 1738.044 / 5280 / 2

Code: (Torque) [Select]
function mConvertUnitsToMPH(%val)
{
    return %val * 1080 / 5280;
}

function mConvertUnitsToKPH(%val)
{
    return * 1738.044 / 5280;
}

function mConvertKPHToMPH(%val)
{
    return %val / 1.6093;
}

function mConvertMPHToKPH(%val)
{
    return %val * 1.6093;
}

function mConvertBPSToMPH(%val)
{
    return %val * 1080 / 5280 / 2;
}

function mConvertBPSToKPH(%val)
{
    return %val * 1738.044 / 5280 / 2;
}

Sweetness! I've needed something like this for awhile!

Now I can see if BL's gravity is around 9.8 m/s/s :)

Can you turn this into serverCMD commands?

I'm still learning hao2script.
« Last Edit: December 10, 2009, 09:01:55 PM by Deathwishez »

Sweetness! I've needed something like this for awhile!

Now I can see if BL's gravity is around 9.8 m/s/s :)
meters = units * 1.5 * 2 / 5280 *1.6093 / 1000

So, 10717703.34928229665071770334 9282 units per second!? O.o

What?
5 units = 4.571875 meters

Math:

9.8 meters = x * 1.5*2/5280*1.6093/1000

9.8 meters = x * 3/5280*1.6093/1000

9.8 meters = x * 5.681818182e-4*1.6093/1000

9.8 meters = x * 9.14375e-4/1000

9.8 meters = x * 9.14375e-7

10717703.35 = x

10717703.35 units = 9.8 meters
« Last Edit: December 10, 2009, 10:41:51 PM by Deathwishez »

What?
5 units = 4.571875 meters

I got 4.571875e-6 meters

With 10717703.35 being the units, I got 9.800000001 meters.
« Last Edit: December 10, 2009, 10:42:12 PM by Deathwishez »