Skip to content

OnEngineStart

Usage

  • No return behavior

Example Autogenerated

csharp
private void OnEngineStart(  )
{
    Puts( "OnEngineStart works!" );
}
csharp
private void OnEngineStart(  )
{
    Puts( "OnEngineStart works!" );
}

Location

  • MotorRowboat::EngineToggle(bool wantsOn)
  • VehicleEngineController<T>::TryStartEngine(BasePlayer player)
csharp
//---
	if (!this.fuelSystem.HasFuel(true))
	{
		return;
	}
	BasePlayer OxideGen_0 = this.GetDriver();
	if (wantsOn && Interface.CallHook("OnEngineStart", this, OxideGen_0) != null)
	{
		return;
	}
	base.SetFlag(BaseEntity.Flags.On, wantsOn, false, true);
	if (wantsOn)
//---
csharp
//---
	if (!this.CanRunEngine())
	{
		this.owner.OnEngineStartFailed();
		return;
	}
	if (Interface.CallHook("OnEngineStart", this.owner, player) != null)
	{
		return;
	}
	this.owner.SetFlag(this.engineStartingFlag, true, false, true);
	this.owner.SetFlag(BaseEntity.Flags.On, false, false, true);
//---

Released under the MIT License.