Calculate Falloff Damage

Pure
CalculateFalloffDamage

Calculates damage with distance-based falloff (linear, quadratic, etc.).

Type: Pure (no side effects)
Category: Fortuna|Gameplay Utilities
Keywords: gameplay utilities

Inputs

NameTypeDefaultDescription
BaseDamagefloatBaseDamage parameter
DistancefloatDistance parameter
MaxRangefloatMaxRange parameter
FalloffExponentfloat1.0FalloffExponent parameter

Outputs

NameTypeDescription
ReturnValuefloatReturnValue output

Example Use Cases

Example 1

Explosion damage that decreases with distance.

Example 2

Shotgun pellet damage falloff.