Customizable damage based on distance
Kirby859 opened this issue ยท 0 comments
First off, leave the Damage variable alone. This is very important, as some pack makers won't bother replacing "Damage 20" With "Damage 0 -1 20" if this enhancement replaces Damage. Create a new variable. Unless you don't want to. I'm not the boss.
Here's an example:
VarDamage 0 20 7
VarDamage: The variable
0: The minimum range (greater than or equal to)
20: The maximum range (less than)
7: The damage value.
So, VarDamage 0 20 7 would mean "If the distance between the shooter and the target when the bullet impacts is greater than or equal to 0 and less than 20, then the damage dealt will be 7.
If the second field of VarDamage is -1 (or something like inf), then the field will be treated as infinity:
VarDamage 20 -1 6
"If the distance between the shooter and the target when the bullet impacts is greater than 20, then the damage dealt will be 6."
If there is a gap in the VarDamage "graph," then:
If there is a Damage variable present, use that when the gap is triggered.
If there is not a Damage variable present, crash the game (or use a preset hardcoded number and inform the player via the console that there is a gap in the VarDamage graph)
I will gladly clarify anything.