class BoatSource
Boat › Transport › Pawn › EntityAI › Entity › ObjectTyped › Object › IEntity › Managed
View all 6 descendants
All members, including inherited
Native class for boats - handles physics simulation
Methods 37
protected override event typename GetOwnerStateType()protected override event typename GetMoveType()proto native float GetSteering()Returns the actual steering value in range <-1, 1>.
proto native void SetSteering(float value)Sets the future steering value.
proto native float GetThrottle()Returns the actual throttle value in range <0, 1>.
proto native void SetThrottle(float value)Sets the future throttle value.
proto native int GetClutch()Returns the value of how much the clutch is disengaged.
proto native void SetClutch(float value)Sets the future clutch value.
proto native float EngineGetRPMMin()Returns engine's min operating rpm.
proto native float EngineGetRPMIdle()Returns engine's idle rpm before engine stalls.
proto native float EngineGetRPMMax()Returns engine's max rpm before engine blows up.
proto native float EngineGetRPMRedline()Returns engine's maximal working rpm without damaging the engine.
proto native float EngineGetRPM()Returns engine's rpm value.
proto native bool EngineIsOn()Returns true when engine is running, false otherwise.
proto native void EngineStart()Starts the engine.
proto native void EngineStop()Stops the engine.
proto native int GetCurrentGear()Returns the index of the current gear, -1 if there is no engine.
proto native int GetGear()Returns the index of the future gear, -1 if there is no engine.
proto native int GetNeutralGear()Returns the index of the neutral gear.
proto native int GetGearCount()Returns the number of gears.
proto native void ShiftUp()Shifts the future gear up, triggering gearbox simulation.
proto native void ShiftTo(int gear)Shifts the future gear to selected gear, triggering gearbox simulation.
proto native void ShiftDown()Shifts the future gear down, triggering gearbox simulation.
proto native vector PropellerGetPosition()Returns the propeller position in local space
Show 1 more
, BoatScript.OnEngineStop()proto native float PropellerGetAngularVelocity()Returns the angular velocity of the propeller
Returns tank capacity for the specified vehicle's fluid.
fluid- the specified fluid type
Show 1 more
, CAContinuousFillFuel.Setup()Returns fraction value (in range <0, 1>) of the current state of the specified vehicle's fluid.
- in
fluid - the specified fluid type
Removes from the specified fluid the specified amount.
proto native void LeakAll(BoatFluid fluid)Removes all the specified fluid from vehicle.
Adds to the specified fluid the specified amount.
Show 1 more
, CAContinuousFillFuel.CalcAndSetQuantity()bool OnBeforeEngineStart()Is called every time the game wants to start the engine.
Returns: true if the engine can start, false otherwise.
void OnEngineStart()Is called every time the engine starts.
Is called every time when the simulation changed gear.
- in
newGear - new gear level
- in
oldGear - previous gear level before gear shift
Is called every time when the specified vehicle's fluid level changes. This callback is called on owner only.
- in
fluid - fluid identifier, \see BoatFluid
- in
newValue - new fluid level
- in
oldValue - previous fluid level before change
float OnSound(BoatSoundCtrl ctrl, float oldValue)Is called every sound simulation step. In this callback, user can modify behaviour of sound controllers.
- in
ctrl - sound controller identifier, \see BoatSoundCtrl
- in
oldValue - already computed value by the game code
Returns: new value of the specified sound controller.