Garry's Mod Wiki

Revision Difference

util.BlastDamage#568528

<function name="BlastDamage" parent="util" type="libraryfunc"> <description> Applies explosion damage to all entities in the specified radius. Performs line-of-sight checking.⤶ <note>This function will not deal damage to the ``Hunter-Chopper`` type NPC. To deal damage, use the <page>util.BlastDamageInfo</page> function and add <page text="DMG_AIRBOAT">Enums/DMG#DMG_AIRBOAT</page> to the damage type.</note> Applies explosion damage to all entities in the specified radius. Performs line-of-sight checking. This a simpler version of <page>util.BlastDamageInfo</page>⤶ ⤶ <note>This function will not deal damage to the ``Hunter-Chopper`` type NPC. To deal damage, use the <page>util.BlastDamageInfo</page> function and add <page text="DMG_AIRBOAT">Enums/DMG#DMG_AIRBOAT</page> to the damage type.</note> </description> <realm>Server</realm> <args> <arg name="inflictor" type="Entity">The entity that caused the damage.</arg> <arg name="attacker" type="Entity">The entity that attacked.</arg> <arg name="damageOrigin" type="Vector">The center of the explosion</arg> <arg name="damageRadius" type="number">The radius in which entities will be damaged.</arg> <arg name="damage" type="number">The amount of damage to be applied.</arg> </args> </function>