Damage per distance

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Damage per distance

Re: Damage per distance

by rollingcrow » Fri Mar 16, 2012 7:48 pm

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.

Re: Damage per distance

by TheBladeRoden » Fri Mar 16, 2012 6:08 pm

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

by Spottswoode » Mon Jan 23, 2012 10:24 pm

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

by Blox » Sat Jan 21, 2012 7:53 am

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

by Spottswoode » Thu Jan 19, 2012 9:33 am

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.
:oops: I had completely forgotten about this though.....shame on me.

Re: Damage per distance

by Blue Shadow » Thu Jan 19, 2012 12:06 am

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

by NeuralStunner » Wed Jan 18, 2012 11:29 pm

That changes the Random(1,8) damage multiplier though. It's useless for custom formulas.

Re: Damage per distance

by jpalomo » Wed Jan 18, 2012 10:58 pm

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

by Spottswoode » Wed Jan 18, 2012 10:50 pm

Hmm..that would be considerably more flexible if it were an actor state or state change. It still doesn't fit quite the purpose I had in mind, but it could be worked around to some degree. I would really want to apply it to a railgun though.

Re: Damage per distance

by Xaser » Wed Jan 18, 2012 10:31 pm

XutaWoo wrote:...I'd still like easy damage falloff or rampup over time, considering how much hell it is to modifiy a projectile's damage. :P
Why not suggest a feature to modify a projectile's damage value? That'd give all the flexibility one would really need.

Re: Damage per distance

by wildweasel » Wed Jan 18, 2012 10:28 pm

Gez wrote:Okay, why is it realistic that ballistic projectiles (i.e., not self-propelling objects) acquire more energy over distance? This seems highly counter-intuitive and I'd like to have an explanation for the physics involved.
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.

Re: Damage per distance

by XutaWoo » Wed Jan 18, 2012 9:26 pm

...I'd still like easy damage falloff or rampup over time, considering how much hell it is to modifiy a projectile's damage. :P

Re: Damage per distance

by Spottswoode » Wed Jan 18, 2012 5:59 pm

Graf Zahl wrote:
Gez wrote:Okay, why is it realistic that ballistic projectiles (i.e., not self-propelling objects) acquire more energy over distance? This seems highly counter-intuitive and I'd like to have an explanation for the physics involved.


Physically it's nonsense, plain and simple.

It's also not quite as easy to implement as it is written here and considering the limited appeal of something this weird, I take the easy solution...
Hmm..no. It's real simple. Long range bullets (.408 Chey Tac for example) are fired in a parabolic trajectory to hit a target around the curvature of the earth with maximum impact. Wind speed, air temperature, and variable humidity also affect bullet trajectory. At 1 mile (or 1760 yards) a bullet travelling at close to Mach 3 generates enough energy to blow a human apart via hydrostatic shock. My example is a SIMPLIFICATION of said physics, as 1 mile in range is completely infeasible in map design with the current standards. Is my example a gross oversimplification? Absolutely. But as stated above, it's Doom and this was just a fleeting suggestion. I was well aware of the goofiness and odds of such a suggestion.
Oh yes, I also said time was more feasible than distance in programming. It's just not better for more accurate simulation.
Just something to think about. Christ. :|

Re: Damage per distance

by Edward-san » Wed Jan 18, 2012 5:32 pm

ChronoSeth wrote: Refer to the second line of my post. :P
ChronoSeth wrote:When has physics ever made sense within it?
Obviously Doom physics never made sense, but it doesn't mean zdoom should implement more nonsense physics properties (though I'd like to ask devs if in these years of development there are some of these).

Re: Damage per distance

by ChronoSeth » Wed Jan 18, 2012 3:59 pm

Edward-san wrote:
ChronoSeth wrote:Gravity?
:nitpick:
Only in a planet without air and if you're shooting from higher z to lower z position (gravity is a conservative force btw).

Otherwise (still in the planet) ... air resistance, air resistance ... it will slow every projectile to a certain speed, which depends on the mass of the projectile and the air composition, because it compensates the gravity force.
Refer to the second line of my post. :P

Top