Extension to A_Fire?
Moderator: GZDoom Developers
Extension to A_Fire?
A_Fire is great for pulling off certain effects, but these can be ruined when the target dies inexplicably.
One particular effect I'm shooting for is a projectile that latches onto its target, fixing it in place and doing radius damage to it until the projectile explodes (after a set number of tics). If the target dies before the projectile does, the projectile remains there, which produces an undesirable visual oddity - it's still fixed in place, latched onto the target which it just killed!
Unless there's a way to fix this that I've overlooked, I think a flag called CHECKTARGETDEAD (or something), which kills the projectile when its target dies, would be a fairly useful addition.
One particular effect I'm shooting for is a projectile that latches onto its target, fixing it in place and doing radius damage to it until the projectile explodes (after a set number of tics). If the target dies before the projectile does, the projectile remains there, which produces an undesirable visual oddity - it's still fixed in place, latched onto the target which it just killed!
Unless there's a way to fix this that I've overlooked, I think a flag called CHECKTARGETDEAD (or something), which kills the projectile when its target dies, would be a fairly useful addition.
Re: Extension to A_Fire?
Maybe try use A_JumpIfTargetInLOS? Just a thought..
Re: Extension to A_Fire?
Adding A_JumpIfTargetInLOS("RealDeath") always kills the projectile before it has the chance to do any lasting damage to the monster. 

- XutaWoo
- Posts: 4005
- Joined: Sat Dec 30, 2006 4:25 pm
- Location: beautiful hills of those who are friends
- Contact:
Re: Extension to A_Fire?
[wiki]A_JumpIfTargetInLOS[/wiki]
extra parameter yo
extra parameter yo
Re: Extension to A_Fire?
After some experimentation, none of those parameters seem to help. 

Re: Extension to A_Fire?
This is currently the only problem that's stopping me from releasing my mutator. Any more help with this would be very appreciated. 

Re: Extension to A_Fire?
I made a flamethrower weapon with 'fire' using A_Fire, and it's even worse in multiplayer, because somehow the fire warps to the target when he respawns. I'd really like a feature like this.
Re: Extension to A_Fire?
You could call an ACS script from the projectile, which calls [wiki]SetActivatorToTarget[/wiki], then returns [wiki]ActivatorTID[/wiki], returning the TID of the actor the projectile hit. I don't know if you have a system that assigns TIDs to everything as part of your mutator, but you could use A_JumpIf to have different behavior depending on whether a particular actor actually has a nonzero TID.
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: Extension to A_Fire?
A projectile's Target field is the shooter. Tracer is used for the actual aimed-for thing, but I'm not sure if that's used outside of SeekerMissiles.Spleen wrote:You could call an ACS script from the projectile, which calls [wiki]SetActivatorToTarget[/wiki], then returns [wiki]ActivatorTID[/wiki], returning the TID of the actor the projectile hit.