Extension to A_Fire?

Moderator: GZDoom Developers

Post Reply
User avatar
Jimmy
 
 
Posts: 4726
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him
Contact:

Extension to A_Fire?

Post by Jimmy »

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.
User avatar
Nightfall
Posts: 555
Joined: Thu Aug 06, 2009 4:00 am
Location: Finland

Re: Extension to A_Fire?

Post by Nightfall »

Maybe try use A_JumpIfTargetInLOS? Just a thought..
User avatar
Jimmy
 
 
Posts: 4726
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him
Contact:

Re: Extension to A_Fire?

Post by Jimmy »

Adding A_JumpIfTargetInLOS("RealDeath") always kills the projectile before it has the chance to do any lasting damage to the monster. :(
User avatar
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?

Post by XutaWoo »

[wiki]A_JumpIfTargetInLOS[/wiki]

extra parameter yo
User avatar
Jimmy
 
 
Posts: 4726
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him
Contact:

Re: Extension to A_Fire?

Post by Jimmy »

After some experimentation, none of those parameters seem to help. :(
User avatar
Jimmy
 
 
Posts: 4726
Joined: Mon Apr 10, 2006 1:49 pm
Preferred Pronouns: He/Him
Contact:

Re: Extension to A_Fire?

Post by Jimmy »

This is currently the only problem that's stopping me from releasing my mutator. Any more help with this would be very appreciated. :(
User avatar
Recurracy
Posts: 558
Joined: Fri Dec 19, 2008 12:11 pm

Re: Extension to A_Fire?

Post by Recurracy »

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.
User avatar
Spleen
Posts: 497
Joined: Fri Nov 28, 2008 7:07 pm

Re: Extension to A_Fire?

Post by Spleen »

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.
User avatar
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?

Post by NeuralStunner »

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.
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.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”