Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release Distance to ground surface.
#1
Code:
DistanceToGroundsurface( origin )
{
    return (origin[2] - BulletTrace( origin, origin + ( 0, 0, -200000 ), false, self )[ "position" ][2]) * 2.54;
}
Remove the * 2.54 if you want the result in inches instead of centimetres.

Example usage:
Code:
self iPrintLn( DistanceToGroundsurface( self.origin ));
Reply

#2
i = Distance(self.origin, BulletTrace( self.origin, self.origin-(0,0,200000), false, self )["position"]);


works too
YouTube 1:Azumikkel- Modding
YouTube 2:DerpShark- Gaming Entertainment
Website:Jensby.me
Contact: im[at]jensby.me
Reply

#3
(10-02-2011, 22:54)AZUMIKKEL Wrote: i = Distance(self.origin, BulletTrace( self.origin, self.origin-(0,0,200000), false, self )["position"]);


works too

and this too:

Code:
i = Distance(self.origin, BulletTrace( self.origin, self.origin-(0,0,200001), false, self )["position"]);

feel the diffrence!
[Image: ctoc.jpg]
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Print a .iwi on the ground Keouf 14 7,527 07-13-2013, 19:49
Last Post: Keouf
  [Release] Dota 2 BETA Camera Distance Tool barata 7 7,598 04-29-2012, 15:34
Last Post: AZUMIKKEL
  Distance(self.origin, location) not working? xplosiff 3 3,271 01-05-2012, 17:39
Last Post: xplosiff
  Help check Distance not working? masterbob 3 2,622 08-10-2011, 02:40
Last Post: Phl3x_
  [Unapproved] Control gunship from ground Afgfighter 2 2,410 06-22-2011, 01:05
Last Post: Afgfighter
Exclamation Help balance weapon dmg on range and distance T3h vICE 2 2,432 06-21-2011, 13:49
Last Post: T3h vICE
  Drop things to the ground? alistair3149 3 2,595 12-02-2010, 11:53
Last Post: alistair3149

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.