• How does util.ParticleTracer work?
    6 replies, posted
There's no page for it on the wiki, but it's a command. I'm guessing it makes a tracer using the particle system, but I have no idea how to use it.
[QUOTE=Empty_Shadow;17041517]There's no page for it on the wiki, but it's a command. I'm guessing it makes a tracer using the particle system, but I have no idea how to use it.[/QUOTE] This is how you use it: [code]util.ParticleTracer(strName, vecStart, vecEnd, boolWhizz)[/code] I think the parameters are self-explaining. (Except for boolWhizz, no idea what that is for.) There's also a similar function called "util.ParticleTracer.Ex", but that never really worked for me: [code]util.ParticleTracerEx(strName, vecStart, vecEnd, boolWhizz, int iEntity, int iAttachment)[/code] An alternate way would be to create a [URL=http://developer.valvesoftware.com/wiki/Info_particle_system]info_particle_system[/URL] entity and set the keyvalues manually. That's what I'd do.
Yeah but info_particle_systems are painful to assign control points with, so I'll give it a shot.
I think this is Lovely!
That's lovely swampyard! [editline]08:46PM[/editline] Well I hooked it up like this. [code] local bullet = {} bullet.Num = numbullets bullet.Src = self.Owner:GetShootPos() bullet.Dir = self.Owner:GetAimVector() bullet.Spread = Vector( scale, scale, 0 ) bullet.Tracer = 1 bullet.Force = math.Round(damage * 1.1) bullet.Damage = math.Round(damage) bullet.AmmoType = "Pistol" bullet.TracerName = "Tracer" bullet.Callback = function ( attacker, tr, dmginfo ) util.ParticleTracer( tracer_du, self.Owner:GetShootPos(), tr.HitPos, true ) end[/code] And it's making the tracer(yay!) but it's coming from the origin. It's hitting the target, but not coming from my gunbarrel.
[QUOTE=Silverlan;17041949](Except for boolWhizz, no idea what that is for.) [/QUOTE] I think that if it is true and the trace went near a player, a "WHIZZ" sound is played for that player.
Yes, whenever an individual particle moves near a player they get a whizz noise.
Sorry, you need to Log In to post a reply to this thread.