Difference between revisions of "TOnDamageEvent"

From Soldat Community Wiki
Jump to: navigation, search
(Created page with "==Description== Type used by TActivePlayer.OnDamage as an event handler type. ==Declaration== function (Shooter, Victim: TActivePlayer; Damage: Integer; WeaponType: ...")
 
 
(8 intermediate revisions by 3 users not shown)
Line 3: Line 3:
  
 
==Declaration==
 
==Declaration==
  function (Shooter, Victim: [[TActivePlayer]]; Damage: Integer; WeaponType: Byte): Integer
+
 
 +
  function (Shooter, Victim: [[TActivePlayer]]; Damage: Single; Bullet: [[TActiveMapBullet]]): Single
 
   Shooter: player dealing damage
 
   Shooter: player dealing damage
 
   Victim: player recieving damage
 
   Victim: player recieving damage
   Damage: amount of damage (negative values heal the target)
+
   Damage: amount of damage that is supposed to be dealt
   WeaponType: type of the weapon damage is being dealt with
+
  Bullet: [[TActiveMapBullet]] object that dealt the damage
 +
   Result: amount of damage being actually dealt
 +
 
 +
{{test|What if not a bullet killed a player?}}
  
 
[[Category:Types]]
 
[[Category:Types]]

Latest revision as of 11:42, 9 September 2016

Description

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

Declaration

function (Shooter, Victim: TActivePlayer; Damage: Single; Bullet: TActiveMapBullet): Single
 Shooter: player dealing damage
 Victim: player recieving damage
 Damage: amount of damage that is supposed to be dealt
 Bullet: TActiveMapBullet object that dealt the damage
 Result: amount of damage being actually dealt
Needs testing (What if not a bullet killed a player?)