Page 1 of 1

[ACS + Decorate] Atan's Tracer System

Posted: Tue Mar 31, 2015 7:43 pm
by Arctangent
Something I've been wanting to try is making a tracer system that works with hitscans, and, well ...





I think I've succeeded.

Most of the system is ACS which is then called in Decorate, preferable by ACS_NamedExecuteWithResult because it can handle a fourth script parameter. The most basic usage can be done by adding the ACS and the BulletTracer actor directly to your project, then copying the modifications to the BulletPuff actor into the BulletPuffs you're using. More advanced use has brief documentation in the ACS source.

Download here.

Anyone's free to use this, just give credit to me somewhere.

Edit: Just realized a quick oversight meant that offsets were relative to the world, not to the firer's angle. While this could be worked around, I decided to fix this because it was kind of silly.

Re: [ACS + Decorate] Atan's Tracer System

Posted: Wed Apr 01, 2015 12:23 am
by Nash
Wow, that's a good-looking tracer effect!

Re: [ACS + Decorate] Atan's Tracer System

Posted: Wed Apr 01, 2015 7:58 am
by Slax
May wanna speed up the rate at which that stuff disappears. No more lasers.
Also, keep it invisible for a while after firing so it won't look like you're spewing said lasers out of your gut.

Re: [ACS + Decorate] Atan's Tracer System

Posted: Wed Apr 01, 2015 11:32 am
by scroton
Slax wrote:Also, keep it invisible for a while after firing so it won't look like you're spewing said lasers out of your gut.
You can use a dummy actor spawned with a_spawnitemex and an executewithresult script that returns the tid of the dummy actor and sets it to the player's/actor's user var and use the position of the dummy actor as the origin of the effect. You could also just calculate the offsets in the script itself.

Re: [ACS + Decorate] Atan's Tracer System

Posted: Wed Apr 01, 2015 12:24 pm
by Arctangent
Slax wrote:May wanna speed up the rate at which that stuff disappears. No more lasers.
Also, keep it invisible for a while after firing so it won't look like you're spewing said lasers out of your gut.
That's all just for demonstration purposes; this system is pretty easy to modify ( it has infrastructure to support multiple tracer types, too ,so you could use it for a laser and still have bullet tracers ) so that the tracers appear and move to your liking.

Re: [ACS + Decorate] Atan's Tracer System

Posted: Wed Apr 01, 2015 8:40 pm
by Sinael
I think something like that (if not exactly that) was used in Dakka, except Dakka did it better IMO.

Re: [ACS + Decorate] Atan's Tracer System

Posted: Thu Apr 02, 2015 1:48 pm
by RikohZX
It does seem like standing in something like the Underhalls water causes the tracers to come from your face rather than your body due to the hitbox wonkiness involved with all that. Definitely an interesting means of seeing hitscan patterns at work otherwise, though.

Re: [ACS + Decorate] Atan's Tracer System

Posted: Thu Apr 02, 2015 2:18 pm
by Arctangent
RikohZX wrote:It does seem like standing in something like the Underhalls water causes the tracers to come from your face rather than your body due to the hitbox wonkiness involved with all that. Definitely an interesting means of seeing hitscan patterns at work otherwise, though.
I'm going to guess this is because fake 3D liquids don't affect the height of the player, just their view height. At least, that's the only reason I can think of causing that, considered by the default Doom flats are as solid as any other regardless of if they're animated or not.

Still, if you give the player's weapons a unique bullet puff, you can expand the include "Get Target Property" script to add an option to get the view height instead, then use that in the player's bullet puff's tracer call. The usage of the actor's height for a z-offset is not hard coded at all.

Re: [ACS + Decorate] Atan's Tracer System

Posted: Wed May 13, 2015 6:45 am
by WARCHILD_89
I used the tracer in Particle fire enhancer and recoded it to be fired as missile, so I do not have any Hitscans in any weapon of my mod AND I can define Damage and damage type by defining a new tracer inheriting from the basic one. The next step would be to add a 3d model to it. The tracer does also work with "Ketchuptest.pk3" (brutal doom style blood)


So you get nice looking tracers which have the hitscan particle effects when hitting a wall. Honestly I haven´t seen anything better yet, but your version is well for people who do NOT use the particle fire enhancer.


NOTE: What exactly were you trying to do? I did not get why ACS is used.....

Re: [ACS + Decorate] Atan's Tracer System

Posted: Wed May 13, 2015 6:55 am
by TheBadHustlex
I'd make 'em a little thinner, they look like lasers right now. But otherwise not bad.

Re: [ACS + Decorate] Atan's Tracer System

Posted: Sat May 16, 2015 5:39 pm
by Arctangent
WARCHILD_89 wrote:NOTE: What exactly were you trying to do? I did not get why ACS is used.....
Basically, you execute the included script via a hitscan's bullet puff, then it'll draw a line of particles from the firer's location to the puff's. It's a bit more complicated than that, however, as the line "travels" over time, choosing the faster of a set speed or a duration ( so that long-range hitscans don't have the tracer hit five seconds after the bullet puff's already gone, while keeping the tracer from going too slow if the distance it has to travel isn't that long ).
TheBadHustlex wrote:I'd make 'em a little thinner, they look like lasers right now. But otherwise not bad.
Ideally, someone using these would define their own tracers that fit the weapons. There's documentation on how to do this in the source.

One of the things I made with messing with these was actually a laser, so y'know.

Re: [ACS + Decorate] Atan's Tracer System

Posted: Mon Jul 20, 2015 2:39 am
by WARCHILD_89
ok you seem to want to get some specific effect. Maybe it´s not cpu usage intensive?

My weapon tracers just work like missiles with different speeds, damage values and damage types. So when I fire e.g. my shotgun, it fires a bunch of tracers, spawning blood when hitting bleeding actors, junk when hitting eg an enemy tank with +NOBLOOD flag set and sparks when hitting a wall. I have no Puff types at all.

I remember my old laptop could not handle this and my fps got down.

Re: [ACS + Decorate] Atan's Tracer System

Posted: Thu Jul 18, 2019 9:42 pm
by Thfpjct
There is some way to change the tracer position?
like, from where on screen it comes out?