Skip to content

OnExplosiveThrown

Usage

  • No return behavior

Example Autogenerated

csharp
private void OnExplosiveThrown( BasePlayer player, BaseEntity baseEntity, ThrownWeapon instance )
{
    Puts( "OnExplosiveThrown works!" );
}

Location

  • ThrownWeapon::DoThrow(BaseEntity/RPCMessage msg)
csharp
//---
		baseEntity.SetAngularVelocity(new Vector3(UnityEngine.Random.Range(-1f, 1f), UnityEngine.Random.Range(-1f, 1f), UnityEngine.Random.Range(-1f, 1f)) * this.tumbleVelocity);
	}
	baseEntity.Spawn();
	this.SetUpThrownWeapon(baseEntity);
	base.StartAttackCooldown(this.repeatDelay);
	Interface.CallHook("OnExplosiveThrown", msg.player, baseEntity, this);
	base.UseItemAmount(1);
}

Released under the MIT License.