Page 2 of 2
Re: Damage per distance
Posted: Wed Jan 18, 2012 10:58 pm
by jpalomo
Xaser wrote:Why not suggest a feature to modify a projectile's damage value? That'd give all the flexibility one would really need.
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.
Re: Damage per distance
Posted: Wed Jan 18, 2012 11:29 pm
by NeuralStunner
That changes the Random(1,8) damage multiplier though. It's useless for custom formulas.
Re: Damage per distance
Posted: Thu Jan 19, 2012 12:06 am
by Blue Shadow
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?
Re: Damage per distance
Posted: Thu Jan 19, 2012 9:33 am
by Spottswoode
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
Posted: Sat Jan 21, 2012 7:53 am
by Blox
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?
Re: Damage per distance
Posted: Mon Jan 23, 2012 10:24 pm
by Spottswoode
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.
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.
Re: Damage per distance
Posted: Fri Mar 16, 2012 6:08 pm
by TheBladeRoden
NeuralStunner 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.)
How would you do that? I can only seem to put a number in the explosion amount
Re: Damage per distance
Posted: Fri Mar 16, 2012 7:48 pm
by rollingcrow
TheBladeRoden wrote:NeuralStunner 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.)
How would you do that? I can only seem to put a number in the explosion amount
I think
this will help you.