Hello,
Working on a Malbers integration for applying damage to the player.
I have the basic part working. All it does is when the AttackTrigger componet on the animal is enabled it checks of the collidiing object is a player, if it is it removes the damage amount. Pretty simple. This triggers the UI indicator but not the damage visualization ability on the player, which is kind of needed.
Is there any way to modify the above code to trigger the damage visualization?
Much thanks,
Nathan
Working on a Malbers integration for applying damage to the player.
I have the basic part working. All it does is when the AttackTrigger componet on the animal is enabled it checks of the collidiing object is a player, if it is it removes the damage amount. Pretty simple. This triggers the UI indicator but not the damage visualization ability on the player, which is kind of needed.
Code:
private MAttackTrigger attackTrigger;
private void Awake()
{
attackTrigger = gameObject.GetComponent<MAttackTrigger>();
}
public void OnTriggerEnter(Collider coll)
{
if (coll.gameObject.CompareTag("Player"))
{
CharacterHealth playerHealth = coll.gameObject.GetComponentInParent<CharacterHealth>();
if (playerHealth) playerHealth.Damage(attackTrigger.statModifier.Value.Value);
}
}
Is there any way to modify the above code to trigger the damage visualization?
Much thanks,
Nathan