Author Topic: Opposite Of VectorDist  (Read 1023 times)

limit = radius of green circle

limit = radius of green circle
What about the radius of the blue circle? I guess I could just take a value of the green circle and check for that instead of 1.

What about the radius of the blue circle? I guess I could just take a value of the green circle and check for that instead of 1.

It's simple subtraction.

When I do echo(mClampF(1 - 5 / vectorDist(findClientByName("jes00").player.getPosition(), 9969.getPosition()), 0, 1)); the number goes from 0 and goes up. I want it to go from 1 down.


Best I could come up with.
Code: [Select]
function weHateVectorDist(%pos1, %pos2, %circle)
{
%raw = mClampF(1 - %circle / vectorDist(%pos1, %pos2), 0, 1) - 1;

return getSubStr(%raw, 1, strLen(%raw));
}