Player/TraceHullAttack

From Garry's Mod
Jump to: navigation, search
 Player:TraceHullAttack( )

Contents

Description

Performs a trace hull and applies damage to the entities hit, returns the first entity hit.

WARNING

Hitting the victim entity with this function in ENTITY:OnTakeDamage can cause infinite loops.

Arguments

Vector startPos

The start position of the hull trace.

Arguments

Vector endPos

The end position of the hull trace.

Arguments

Vector mins

The minimum coordinates of the hull.

Arguments

Vector maxs

The maximum coordinates of the hull.

Arguments

number damage

The damage to be applied.

Arguments

Vector damageFlags

Bitflag specifying the damage type, see DMG_ Enums.

Arguments

number damageForce

The force to be applied to the hit object.

Arguments

boolean damageAllNPCs

Whether to apply damage to all hit NPCs or not.

Returns

Entity

The hit entity
Personal tools
Navigation