Hey guys..
At first i want to say sorry for my bad english! :P
I'm new to modding but i try my best..
I created a small script to show the jump distance of a player but its not working as it should.
It prints the distance but the distance is not realy precise.
I tested it on a custom map with known gap's to check everything..
I jumped a distance of 240 Units but my script prints smaller distances then 240.
Maybe someone has a good idea to improve this script? :x
Code:
while(1)
{
if(!self.InJump && self isOnGround())
{
self.startJumpPos = self.origin;
}
else if(self.InJump && self isOnGround())
{
self.jump_distance = distance( self.startJumpPos, self.origin );
self iPrintLn("You jumped "+self.jump_distance+" units.");
self.InJump = false;
}
else if(!self isOnGround())
{
self.InJump = true;
}
wait 0.05;
}