Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need some Definitions
#1
uhm yh i want to make this command like

if (Distance( "my position", "enemy position i shoot at" ) <="rndm")

what do i have to put for my position and the enemy position?
or is there a other line for?
Reply

#2
Any, since values will get abs(x) later ( as I know ).
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#3
my position = self.origin or self getOrigin()
enemy position = what do you want? the point where you are aiming or that particular enemys position you are aiming?
Reply

#4
(02-06-2015, 20:00)Yamato Wrote: my position = self.origin or self getOrigin()
enemy position = what do you want? the point where you are aiming or that particular enemys position you are aiming?

the particular enemys position im aiming at
Reply

#5
(02-15-2015, 12:52)rvyASVP Wrote:
(02-06-2015, 20:00)Yamato Wrote: my position = self.origin or self getOrigin()
enemy position = what do you want? the point where you are aiming or that particular enemys position you are aiming?

the particular enemys position im aiming at

I dont know how you are going to use it in your mod, so I put you the code like this and you adapt it

Code:
ForwardTrace = Bullettrace( self getEye(), self getEye() + anglestoforward( self getplayerangles() ) * 100000, true, self );

if( ForwardTrace["entity"] isPlayer() )

location = ForwardTrace["entity"].origin;

Source: https://www.itsmods.com/forum/Thread-Tut...trace.html
Reply

#6
(02-16-2015, 00:25)Yamato Wrote:
(02-15-2015, 12:52)rvyASVP Wrote:
(02-06-2015, 20:00)Yamato Wrote: my position = self.origin or self getOrigin()
enemy position = what do you want? the point where you are aiming or that particular enemys position you are aiming?

the particular enemys position im aiming at

I dont know how you are going to use it in your mod, so I put you the code like this and you adapt it

Code:
ForwardTrace = Bullettrace( self getEye(), self getEye() + anglestoforward( self getplayerangles() ) * 100000, true, self );

if( ForwardTrace["entity"] isPlayer() )

location = ForwardTrace["entity"].origin;

Source: https://www.itsmods.com/forum/Thread-Tut...trace.html

k got it thx
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

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