Summary
There is an additional triggering of the DamagedEvent()
event listener after a lethal hit
Steps to Reproduce
- Set up an event listener for the
DamagedEvent()
function of a player (or all players) - The event listener should log
DamageResult.Amount
,fort_character[DamageResult.Target].GetHealth()
andfort_character[DamageResult.Target].IsActive()
- Set up something to deal a lethal amount of damage to the player (doesn’t need to be in one hit)
Expected Result
- Last Log: Leathal hit
- Damage: [Whatever you’ve set up]
- Health: 0 or negative
- Is Active: No
Observed Result
After the log of the leathal hit, there is sometimes another log of a hit:
- Damage: 2
- Health: 98 (my max health is 100)
- Is Acitve: No
After respawning, the health is back to normal
Additional Notes
You can resolve the issue by testing if the following expression succeds in your event listener:
fort_character[DamageResult.Target].IsActive() or fort_character[DamageResult.Target].GetHealth() <= 0.0