OnNpcAttack
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private void OnNpcAttack( BaseNpc instance, BaseEntity AttackTarget )
{
Puts( "OnNpcAttack works!" );
}
Location
- BaseNpc::StartAttack()
csharp
//---
}
if (!this.AttackReady())
{
return;
}
if (Interface.CallHook("OnNpcAttack", this, this.AttackTarget) != null)
{
return;
}
if ((this.AttackTarget.ServerPosition - this.ServerPosition).magnitude > this.AttackRange)
{
//---