This can already be done in ACS using [wiki]SetActorProperty[/wiki]. You can easily use ACS_ExecuteAlways (in decorate) in combination with SetActorProperty to modify the damage on the fly.Xaser wrote:Why not suggest a feature to modify a projectile's damage value? That'd give all the flexibility one would really need.
Damage per distance
Moderator: GZDoom Developers
Re: Damage per distance
- 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: Damage per distance
That changes the Random(1,8) damage multiplier though. It's useless for custom formulas.
-
- Posts: 5043
- Joined: Sun Nov 14, 2010 12:59 am
Re: Damage per distance
I'm not a programmer nor do I know anything about ZDoom inner workings, so excuse my ignorance, but couldn't the [wiki]A_WolfAttack[/wiki]'s 'damage over distance' feature be adapted to other attacks?
- Spottswoode
- Posts: 18
- Joined: Tue Jan 17, 2012 8:41 pm
Re: Damage per distance
It's possible but unlikely. A_WolfAttack is a hitscan attack, but there is code designed to affect distance in it. The parameters for that action are very specific, so changing the action to more open parameters is probably better than adapting the code.
I had completely forgotten about this though.....shame on me.

Re: Damage per distance
This probably wouldn't work for hitscan, but wouldn't having a projectile start at x health, then do DamageThing(y) every z tics, then at death do A_Explode(Health,smallradius) work?
- Spottswoode
- Posts: 18
- Joined: Tue Jan 17, 2012 8:41 pm
Re: Damage per distance
Gyrojet firearms are actually rocket propelled projectiles. They have a much lower velocity than most of the new long range cartridges even at their max.wildweasel wrote:I've been told that the Gyrojet is a real-world gun whose projectile accelerates the longer it is in flight, thus theoretically doing more damage if it flies farther.
-
- Posts: 13
- Joined: Thu Jan 20, 2011 10:33 pm
Re: Damage per distance
How would you do that? I can only seem to put a number in the explosion amountNeuralStunner wrote: You can factor up current absolute velocity, and add/subtract to a user variable. ([wiki]Decorate Expressions[/wiki] and [wiki]A_SetUserVar[/wiki] will help you here.) Then, [wiki]A_Explode[/wiki] can be used to deal the actual damage, with the modified damage value passed to it. (The projectile itself can be set to (0) damage.)
- rollingcrow
- Posts: 733
- Joined: Tue Mar 02, 2010 8:30 pm
- Graphics Processor: nVidia with Vulkan support
Re: Damage per distance
I think this will help you.TheBladeRoden wrote:How would you do that? I can only seem to put a number in the explosion amountNeuralStunner wrote: You can factor up current absolute velocity, and add/subtract to a user variable. ([wiki]Decorate Expressions[/wiki] and [wiki]A_SetUserVar[/wiki] will help you here.) Then, [wiki]A_Explode[/wiki] can be used to deal the actual damage, with the modified damage value passed to it. (The projectile itself can be set to (0) damage.)