I have not found an event where I can access an attackerObject.
In line 365 I added an EventExecute. Perhaps it is possible to adapt the standard OnHealthDamage event?
I tried to keep the event name, but that didn't work with different parameters => (null reference exception).
Using:
In line 365 I added an EventExecute. Perhaps it is possible to adapt the standard OnHealthDamage event?
Code:
EventHandler.ExecuteEvent<float, Vector3, Vector3, GameObject, object, Collider>(m_GameObject, "OnHealthDamageObject", amount, position, force, attacker, attackerObject, hitCollider);
EventHandler.ExecuteEvent<float, Vector3, Vector3, GameObject, Collider>(m_GameObject, "OnHealthDamage", amount, position, force, attacker, hitCollider);
I tried to keep the event name, but that didn't work with different parameters => (null reference exception).
Using:
Code:
Object ao = attackerObject as Object;
if (ao != null && ao.GetType() == typeof(ShootableWeapon))
... do something different!