07-18-2011, 19:39
Hello, 
I am going to explain something about this usefull command.
A bullettrace is something like the line that a bullet forms. It has a start and a end. Basically its structure is like this:
The start is obvious what it is: the position from the one it starts.
The end is the position where it ends,
.
The True is a command that will detect players or not, if you want it to detect players put true, if not false.
The self I putted is a entity that wont be affected by the trace, with self, it wont detect the own player or whatever you are using self for.
A example of usage:
This will find the point that is forward to you at a scale of 100000. If you want to get the position, call it like this:
You can get the entity that is in that point with:
In a bullettrace there is also a fraction, that can have a value beetween 0 and 1, 1 means that the trace has completely crashed against the surface(I am not very sure about this, is just what I tested, correct me if I am wrong)
You can call it like this:
There is also the surfacetype, that is the type of surface that is in the point of the bullettrace, like water,sand or mud:
You can call it like:
This is a list of them, I think that is complete, I putted it in alphabetical order:
I think that this is all, I hope I helped a bit, if I said something wrong correct me.
Yamato,

I am going to explain something about this usefull command.
A bullettrace is something like the line that a bullet forms. It has a start and a end. Basically its structure is like this:
Code:
RandomTrace = Bullettrace(start,end,true,self);
The start is obvious what it is: the position from the one it starts.
The end is the position where it ends,

The True is a command that will detect players or not, if you want it to detect players put true, if not false.
The self I putted is a entity that wont be affected by the trace, with self, it wont detect the own player or whatever you are using self for.
A example of usage:
Code:
ForwardTrace = Bullettrace(self getEye(),self getEye()+anglestoforward(self getplayerangles())*100000,true,self);
This will find the point that is forward to you at a scale of 100000. If you want to get the position, call it like this:
Code:
ForwardTrace["position"]
You can get the entity that is in that point with:
Code:
ForwardTrace["entity"]
In a bullettrace there is also a fraction, that can have a value beetween 0 and 1, 1 means that the trace has completely crashed against the surface(I am not very sure about this, is just what I tested, correct me if I am wrong)
You can call it like this:
Code:
ForwardTrace["fraction"]
There is also the surfacetype, that is the type of surface that is in the point of the bullettrace, like water,sand or mud:
You can call it like:
Code:
ForwardTrace["surfacetype"]
This is a list of them, I think that is complete, I putted it in alphabetical order:
Code:
asphalt
bark
brick
carpet
cloth
concrete
default
dirt
flesh
foliage
glass
grass
gravel
ice
metal
mud
paper
rock
sand
snow
water
wood
I think that this is all, I hope I helped a bit, if I said something wrong correct me.
Yamato,
