OnEntityDestroy
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private void OnEntityDestroy( BradleyAPC instance )
{
Puts( "OnEntityDestroy works!" );
}
csharp
private void OnEntityDestroy( CH47HelicopterAIController instance )
{
Puts( "OnEntityDestroy works!" );
}
Location
- BradleyAPC::OnKilled(HitInfo info)
- CH47HelicopterAIController::OnKilled(HitInfo info)
csharp
//---
{
if (base.isClient)
{
return;
}
if (Interface.CallHook("OnEntityDestroy", this) != null)
{
return;
}
this.CreateExplosionMarker(10f);
Effect.server.Run(this.explosionEffect.resourcePath, this.mainTurretEyePos.transform.position, Vector3.up, null, true, null);
//---
csharp
public override void OnKilled(HitInfo info)
{
if (Interface.CallHook("OnEntityDestroy", this) != null)
{
return;
}
if (!this.OutOfCrates())
{
//---