Damaging the LBD Component
Damaging the Location Based Damage Component
DamageArea(int DamageAmount, Transform AttackerTransform = null, int RagdollForce = 0)//Damages an AI based off of the collider hit and its multiplier.
//In this example, a raycast was used to get a reference to the object hit.
//However, something like an OnCollisionEnter or OnTriggerEnter can also be used.
LocationBasedDamageArea m_LocationBasedDamageArea = hit.collider.GetComponent<LocationBasedDamageArea>();
if (m_LocationBasedDamageArea != null)
{
m_LocationBasedDamageArea.DamageArea(DamageAmount, PlayerTransform, 400);
}Last updated