![]() |
|
[Tutorial] Bullettrace - Printable Version +- ItsMods (https://www.itsmods.com) +-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html) +--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html) +--- Thread: [Tutorial] Bullettrace (/Thread-Tutorial-Bullettrace.html) |
Bullettrace - Yamato - 07-18-2011 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: 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
woodI think that this is all, I hope I helped a bit, if I said something wrong correct me. Yamato,
RE: Bullettrace - iAegle - 07-18-2011 ![]() you just ruined something epic I wanted to release with something epic that not everyone knew RE: Bullettrace - AZUMIKKEL - 07-18-2011 Didn't know about the ["stuff"]. Thanks you! I think this counts for Black Ops too, yes? Should move/copy it there c: RE: Bullettrace - Pozzuh - 07-18-2011 Yep, works for black ops. RE: Bullettrace - Nukem - 07-18-2011 Overall this is a nice tutorial for people who don;t know about this. (I do )P.S. trace["position"] is where the trace ends at an object/material you can't shoot through, not always at Code: self getEye()+anglestoforward(self getplayerangles())*100000RE: Bullettrace - iAegle - 08-24-2011 can I make it so it ignores every player not just self? like Code: bulletTrace( eyePos, blabla_end, true, level.players );RE: Bullettrace - Yamato - 08-24-2011 (08-24-2011, 19:00)iAegle Wrote: can I make it so it ignores every player not just self? never tried,
RE: Bullettrace - some_kid - 09-12-2011 (08-24-2011, 19:00)iAegle Wrote: can I make it so it ignores every player not just self? Sorry for the late reply but I just had to post this ![]() Code: bulletTrace( eyePos, blabla_end, FALSE, self);![]() (07-18-2011, 19:39)Yamato Wrote: The True is a command that will detect players or not, if you want it to detect players put true, if not false. RE: Bullettrace - aname - 01-17-2012 (09-12-2011, 01:39)some_kid Wrote:(08-24-2011, 19:00)iAegle Wrote: can I make it so it ignores every player not just self? I think he wants to ignore people he wants so the bullettrace won't crash and complete, make another variable like this: Code: Ignoretracem = ignoretracem();
bulletTrace( eyePos, blabla_end, FALSE, Ignoretracem);Then put something like this: Code: ignoretracem()
{
if(blablabla)
return variable;
} |