Difference between revisions of "TOnDamageEvent"

From Soldat Community Wiki
Jump to: navigation, search
(Declaration)
Line 4: Line 4:
 
==Declaration==
 
==Declaration==
  
  function (Shooter, Victim: [[TActivePlayer]]; Damage: Integer; BulletId: Byte): Integer
+
  function (Shooter, Victim: [[TActivePlayer]]; Damage: Single; BulletId: Byte): Single
 
   Shooter: player dealing damage
 
   Shooter: player dealing damage
 
   Victim: player recieving damage
 
   Victim: player recieving damage

Revision as of 12:41, 10 July 2016

Description

Type used by TActivePlayer.OnDamage as an event handler type.

Declaration

function (Shooter, Victim: TActivePlayer; Damage: Single; BulletId: Byte): Single
 Shooter: player dealing damage
 Victim: player recieving damage
 Damage: amount of damage (negative values heal the target)
 BulletId: TActiveMapBullet.ID object that dealt the damage (if it's not been a bullet, then this parameter will result in a 255, which is not a valid BulletId