Why does this piece of code call “Damaged by another Player”, when the damage is caused by storm? I want to catch the case where a player is damaged by another player (even himself), but not the environment.
HandlePlayerHit(DamageResult : damage_result) :void=
Target := DamageResult.Target
if (DamagedPlayer := fort_character[Target], player[DamagedPlayer.GetAgent[]]):
Print("HandlePlayerHit")
if(Instigator := DamageResult.Instigator?, AgentInstigator := Instigator.GetInstigatorAgent[], FortInstigator := AgentInstigator.GetFortCharacter[]):
Print("Damaged by another player")