class Transport
Transport › Pawn › EntityAI › Entity › ObjectTyped › Object › IEntity › Managed
Base class depends on build flags: PawnFEATURE_NETWORK_RECONCILIATION · EntityAI!FEATURE_NETWORK_RECONCILIATION
Uses NetworkMoveStrategy.NONE
Members 25
private static ref VehicleFlippedContext m_FlippedContextShared context across all vehicles for flipping
ref TIntArray m_SingleUseActionsref TIntArray m_ContinuousActionsref TIntArray m_InteractActionsprotected bool m_EngineStartedShow 1 more
, MotorbikeScript.SetEngineStarted()protected bool m_EngineDestroyedprotected int m_HeadlightsStateprotected int m_RearLightTypeprotected bool m_EngineZoneReceivedHitprotected vector m_fuelPosref VehicleContactCache m_ContactCacheShow 1 more
, Transport()protected float m_dmgContactCoef = 0.023protected float m_VehicleContactDamageCoef = 0.12protected float m_CrewContactDamageCoef = 0.023protected ref VehicleContactData m_ContactDataprotected float m_MomentumPrevTickprotected vector m_VelocityPrevTickprotected bool m_PlayCrashSoundLightprotected bool m_PlayCrashSoundHeavyref EffectSound m_CrashSoundLightref EffectSound m_CrashSoundHeavystatic EVehicleDebugOutputType DEBUG_OUTPUT_TYPEDIAG_DEVELOPERbool m_ContactCalledDIAG_DEVELOPERMethods 114
override void EEDelete(EntityAI parent)override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)Show 2 more
, GetGame(), and SetEngineZoneReceivedHit()override int GetMeleeTargetType()protected override event typename GetOwnerStateType()protected override event typename GetMoveType()proto native void Synchronize()Synchronizes car's state in case the simulation is not running.
Show 1 more
, MotorbikeScript.EEItemDetached()proto native bool HasCrew()Returns true if at least one member of crew is present.
proto native int CrewSize()Returns crew capacity of this vehicle.
Returns crew member index based on action component index. -1 is returned when no crew position corresponds to given component index.
Returns crew member index based on player's instance. -1 is returned when the player is not isnide.
Show 8 more
, ActionGetOutTransport.ActionCondition(), ActionSwitchLights.ActionCondition(), ActionSwitchSeats.ActionCondition(), ActionSwitchSeats.AddActionJuncture(), ActionVehicleHornBase.PlayerIsDriver(), DayZPlayerImplement.CommandHandler(), DayZPlayerImplement.HandleDeath(), and PlayerBase.OnUnconsciousStart()Returns crew member based on position index. Null can be returned if no Human is present on the given position.
proto native Human CrewDriver()Returns the driver Null can be returned if no Human is present.
Reads entry point and direction into vehicle on given position in model space.
Reads entry point and direction into vehicle on given position in world space.
Returns crew transformation indside vehicle in model space
Returns crew transformation indside vehicle in world space
Performs transfer of player from world into vehicle on given position.
Performs transfer of player from vehicle into world from given position.
proto native void CrewDeath(int posIdx)Handles death of player in vehicle and awakes its physics if needed
void OnDriverEnter(Human player)Is called when the crew member enters the driver seat
- in
player - The player that entered the driver seat
void OnDriverExit(Human player)Is called when the crew member leaves the driver seat
- in
player - The player that left the driver seat
proto native bool LightIsOn()Returns true when lights are on, false otherwise.
proto native void LightOn()Signals for LightIsOn to return true
proto native void LightOff()Signals for LightIsOn to return false
proto native void LightToggle()Calls LightOn/LightOff depending on current light state
bool OnBeforeLightOn()Is called by native every time the game wants to turn on the light
Returns: true if the light can turn on, false otherwise.
void OnUpdateLight()Is called by native every time the game wants to update the light
proto void ApplyForce(vector force)Applies constant force on the physics body (at origin).
proto void ApplyTorque(vector force)Applies constant torque on the physics body.
Applies constant force on the physics body at a position (world space coordinates).
proto void ApplyCentralImpulse(vector centralImpulse)Applies impulse on the physics body (at origin).
proto void ApplyTorqueImpulse(vector torqueImpulse)Applies impulse torque on the physics body.
Applies impulse on the physics body at a position (world space coordinates).
proto native int Random()Random number in range of <0,0xffffffff> - !!! use this only during deterministic simulation (EOnSimulate/EOnPostSimulate)
Returns: int value in range of <0,0xffffffff>
Random number in range of <0,pRange-1> - !!! use this only during deterministic simulation (EOnSimulate/EOnPostSimulate)
pRange- upper bounds of random number
Returns: int value in range of <0,pRange-1>
proto native float Random01()Random number in range of <0,1> - !!! use this only during deterministic simulation (EOnSimulate/EOnPostSimulate)
Returns: float value in range of <0,1>
Random number in range of <min,max> - !!! use this only during deterministic simulation (EOnSimulate/EOnPostSimulate)
Returns: float value in range of <min,max>
Is called every time when vehicle collides with other object.
- in
zoneName - configured vehicle's zone that was hit
- in
localPos - position where the vehicle was hit in vehicle's space
- in
other - object with which the vehicle is colliding
- in
data - contact properties
Show 16 more
, GetMomentum(), GetVelocity(), array.Insert(), map.Insert(), CGame.IsServer(), Debug.Log(), vector.Normalized(), vector.Normalized(), VehicleContactData.SetData(), new VehicleContactData(), DEBUG_OUTPUT_TYPE, Contact.Impulse, m_ContactCache, m_ContactCalled, m_MomentumPrevTick, and m_VelocityPrevTickvoid OnInput(float dt)Called after every input simulation step.
Note that the player character and other systems can always change the internal state. It is highly recommended to store state of custom inputs elsewhere and call Setters here.
- in
dt - delta time since last called in seconds
void OnUpdate(float dt)Is called every game frame on client, fixed rate on server
- in
dt - delta time since last called in seconds
void UpdateLights(int new_gear = -1)override bool IsTransport()override bool IsDetectableByVicinityCone()override bool IsIgnoredByConstruction()override bool IsHealthVisible()override bool ShowZonesHealth()override int GetHideIconMask()float GetMomentum()bool IsVitalSparkPlug()bool IsVitalGlowPlug()bool IsVitalFuelTank()protected void CheckVitalItemCallback(bool isVital, int slotId, Object caller = null, string callbackMethodName = "", Param params = null)Show 2 more
, EntityAI.GetInventory(), and Object.IsRuined()protected void PartsHealthCheck()int GetFluidCapacityScript(ETransportFluid fluidType)fluids
float GetFluidFractionScript(ETransportFluid fluidType)void FillScript(ETransportFluid fluidType, float amount)void UpdateBattery(IEntity battery)string GetVehicleType()string GetActionCompNameFuel()float GetActionDistanceFuel()vector GetRefillPointPosWS()float GetWeightCoef()artificial value that helps to distinguish between different weight categories (mainly for particles)
Show 2 more
, string.ToLower(), and new TStringArray()protected EffectSound CreateSoundForAnimationSource(string animSource)protected VehicleFlippedContext GetFlipContext()Show 1 more
, m_FlippedContextprotected bool DetectFlippedUsingSurface(VehicleFlippedContext ctx, float angleTolerance)Show 14 more
, vector.Direction(), vector.Dot(), Object.GetDirectionUp(), CGame.GetSurface(), Object.GetTightlyPackedCorners(), CGame.GetWaterDepth(), VehicleFlippedContext.IsDebug(), vector.Normalize(), vector.Normalize(), Math.DEG2RAD, VehicleFlippedContext.m_SurfaceParams, VehicleFlippedContext.m_SurfaceResult, vector.Up, and vector.Zeroprotected bool DetectFlipped(VehicleFlippedContext ctx)bool IsFlipped()Don't override, may change to native for caching 'DetectFlipped' in the future based on active-ness (i.e. only updated when vehicle changes active state)
Show 1 more
, VehicleFlippedContext.m_bIsActionDon't override, may change to native for caching 'DetectFlipped' in the future based on active-ness (i.e. only updated when vehicle changes active state)
Show 1 more
, VehicleFlippedContext.m_bIsActionbool IsAnyCrewPresent()float GetTransportCameraDistance()void MarkCrewMemberUnconscious(int crewMemberIndex)void MarkCrewMemberDead(int crewMemberIndex)vector GetTransportCameraOffset()bool CanGetIn()bool HasDirectionalInOutAction()Called from native
void SetEngineZoneReceivedHit(bool pState)Ignore any player that is currently in this vehicle
bool HasEngineZoneReceivedHit()bool NeedElectricitySourceDevice()EntityAI GetElectricitySourceDevice()Show 11 more
, CivilianSedan.GetElectricitySourceDevice(), Hatchback_02.GetElectricitySourceDevice(), MotorbikeScript.OnEngineStart(), MotorbikeScript.OnEngineStop(), MotorbikeScript.OnUpdate(), Offroad_02.GetElectricitySourceDevice(), OffroadHatchback.GetElectricitySourceDevice(), Sedan_02.GetElectricitySourceDevice(), Truck_01_Base.GetElectricitySourceDevice(), Truck_02.GetElectricitySourceDevice(), and Van_01.GetElectricitySourceDevice()string GetElectricitySourceDeviceType()Managed GetVehicleHornComponent()component helpers
bool IsAreaAtDoorFree(int currentSeat, float maxAllowedObjHeight, inout vector extents, out vector transform[4])protected bool GetCrashLightSound()protected bool GetCrashHeavySound()protected void SynchCrashLightSound(bool play)protected void SynchCrashHeavySound(bool play)protected void PlayCrashLightSound()protected void PlayCrashHeavySound()protected void PlaySoundEx(string soundset, EffectSound sound, out bool soundbool)Show 3 more
, EffectSound.SetAutodestroy(), Effect.SetPosition(), and EffectSound.SoundPlay()void PlaySound(string soundset, EffectSound sound, out bool soundbool)void CleanupEffects()Show 2 more
, ~Transport(), and EEDelete()override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)DIAG_DEVELOPERShow 3 more
, new TSelectableActionInfoWithColor(), FadeColors.LIGHT_GREY, and FadeColors.REDoverride bool OnAction(int action_id, Man player, ParamsReadContext ctx)DIAG_DEVELOPER