Skip to content

OnEntityTakeDamage

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnEntityTakeDamage( ResourceEntity instance, HitInfo info )
{
    Puts( "OnEntityTakeDamage works!" );
}

Location

  • ResourceEntity::OnAttacked(HitInfo info)
csharp
public override void OnAttacked(HitInfo info)
{
	if (base.isServer && !this.isKilled)
	{
		if (Interface.CallHook("OnEntityTakeDamage", this, info) != null)
		{
			return;
		}
		if (this.resourceDispenser != null)
		{
//---

Released under the MIT License.