4 override bool HasLocalEffectOnlyScript()
10 override bool CanBroadcastScript()
16 override void PerformContinuousAction(IEntity pOwnerEntity, IEntity pUserEntity,
float timeSlice)
20 VehicleControllerComponent controller = VehicleControllerComponent.Cast(m_VehicleController);
22 controller.TryStartEngine();
26 VehicleControllerComponent_SA controller = VehicleControllerComponent_SA.Cast(m_VehicleController);
28 controller.TryStartEngine();
34 override void OnActionStart(IEntity pUserEntity)
38 VehicleControllerComponent controller = VehicleControllerComponent.Cast(m_VehicleController);
40 controller.TryStartEngine();
44 VehicleControllerComponent_SA controller = VehicleControllerComponent_SA.Cast(m_VehicleController);
46 controller.TryStartEngine();
52 override void OnActionCanceled(IEntity pOwnerEntity, IEntity pUserEntity)
54 if (!m_bIsToggle && !m_bTargetState)
59 CarControllerComponent controller = CarControllerComponent.Cast(m_VehicleController);
60 if (controller && !controller.IsEngineOn())
61 controller.CancelStart();
65 VehicleControllerComponent_SA controller = VehicleControllerComponent_SA.Cast(m_VehicleController);
66 if (controller && !controller.IsEngineOn())
67 controller.CancelStart();
72 override bool CanBeShownScript(IEntity user)
78 override bool GetState()
82 VehicleControllerComponent controller = VehicleControllerComponent.Cast(m_VehicleController);
83 return controller && controller.IsEngineOn();
87 VehicleControllerComponent_SA controller = VehicleControllerComponent_SA.Cast(m_VehicleController);
88 return controller && controller.IsEngineOn();
93 override void SetState(
bool enable)
97 VehicleControllerComponent controller = VehicleControllerComponent.Cast(m_VehicleController);
102 controller.StartEngine();
104 controller.StopEngine();
108 VehicleControllerComponent_SA controller = VehicleControllerComponent_SA.Cast(m_VehicleController);
113 controller.StartEngine();
115 controller.StopEngine();