e2 docs damage - wiremod/wire GitHub Wiki
Damage
= Damage:isType(
Type)
Returns whether the damage contains the type flag provided. For example isType(_DMG_BLAST) would return 1 if the damage contains blast damage. (1 ops)
= Damage:getAmount()
Returns the amount of damage dealt (1 ops)
= Damage:getPosition()
Returns the position where the damage was dealt (1 ops)
= Damage:getForce()
Returns the force of the damage dealt (1 ops)
= Damage:getInflictor()
Returns the inflictor (weapon) which caused the damage to be dealt (1 ops)
= Damage:getAttacker()
Returns the attacker which used the inflictor to deal the damage (1 ops)
= Damage:getAmmoType()
Returns the ammo type id of the damage dealt (1 ops)
:takeDamage(
Amount)
Applies an amount of damage to the player. Requires wire_expression2_damage_enabled to be set to 1. (20 ops)
:takeDamage(
Amount,
Attacker)
Applies an amount of damage to the player with given attacker. Requires wire_expression2_damage_enabled to be set to 1. (20 ops)
:takeDamage(
Amount,
Attacker,
Inflictor)
Applies an amount of damage to the player with given attacker and inflictor. Requires wire_expression2_damage_enabled to be set to 1. (20 ops)
Origin,
Radius,
Damage)
blastDamage(Creates blast damage at the position provided with specified radius and damage amount. Requires wire_expression2_damage_enabled to be set to 1. (10 ops)