Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SCR_CompartmentAccessComponent Interface Reference
Inheritance diagram for SCR_CompartmentAccessComponent:
[legend]

Public Member Functions

ScriptInvoker GetOnCompartmentEntered (bool createNew=true)
 
ScriptInvoker GetOnCompartmentLeft (bool createNew=true)
 
OnPlayerEnterCompartment GetOnPlayerCompartmentEnter (bool createNew=true)
 
OnPlayerExitCompartment GetOnPlayerCompartmentExit (bool createNew=true)
 
override void OnCompartmentEntered (IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
 
override void OnCompartmentLeft (IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
 
void OnLifeStateChanged (ECharacterLifeState previousLifeState, ECharacterLifeState newLifeState)
 
BaseCompartmentSlot FindFreeAndAccessibleCompartment (IEntity vehicle, ECompartmentType compartmentType, BaseCompartmentSlot customSlot=null)
 Find a compartment that is marked as accessible and not occupied by anyone.
 
bool MoveInVehicle (IEntity vehicle, ECompartmentType compartmentType, bool performWhenPaused=false, BaseCompartmentSlot customSlot=null)
 Move in vehicle to specified slot type.
 
bool MoveInVehicleAny (IEntity vehicle)
 Move in vehicle to any available slot.
 
IEntity GetVehicle ()
 Get vehicle this entity is in.
 
IEntity GetVehicle (out int compartmentID)
 
void ~SCR_CompartmentAccessComponent ()
 
- Public Member Functions inherited from CompartmentAccessComponent
proto external IEntity GetVehicleCompartmentManagerOwner ()
 
proto external BaseCompartmentSlot GetCompartment ()
 Returns the compartent we're in.
 
proto external BaseCompartmentSlot FindFreeCompartment (IEntity targetEntity, ECompartmentType compartmentType, bool useReserved=true)
 Returns the first free compartment of a given type on.
 
proto external BaseCompartmentSlot FindCompartmentReservedBy (IEntity targetEntity, IEntity reservedBy)
 
proto external bool IsInCompartment ()
 Returns true if we're inside a compartment.
 
proto external bool IsInCompartmentADS ()
 Returns true if we're inside a compartment with enabled ADS.
 
proto external bool IsTargetVehicleAccessible (IEntity targetEntity)
 Returns true if.
 
proto external bool GetInVehicle (IEntity vehicle, BaseCompartmentSlot compartment, bool forceTeleport, int doorInfoIndex, ECloseDoorAfterActions closeDoor, bool performWhenPaused)
 
proto external bool GetOutVehicle (EGetOutType type, int doorInfoIndex, ECloseDoorAfterActions closeDoor, bool performWhenPaused)
 
proto external bool GetOutVehicle_NoDoor (vector targetTransform[4], bool sendIntoRagdoll, bool performWhenPaused)
 
proto external void KickFromVehicle (int doorInfoIndex)
 
proto external bool OpenDoor (IEntity vehicle, ECharacterDoorAnimType doorAnimType, int doorInfoIndex)
 
proto external bool AreDoorsFromDifferentVehicle (IEntity vehicle, int doorIndex)
 
proto external bool CloseDoor (IEntity vehicle, ECharacterDoorAnimType doorAnimType, int doorInfoIndex)
 
proto external void InterruptVehicleActionQueue (bool interruptCurrentAction, bool forced, bool replicate)
 
proto external bool CanGetInVehicle (IEntity targetEntity)
 Returns true if.
 
proto external IEntity GetOwner ()
 Returns the entity owning the component.
 
proto external bool CanGetInVehicleViaDoor (IEntity targetEntity, BaseCompartmentManagerComponent compartmentManagerCompartment, int doorInfoIndex)
 Returns true if.
 
proto external bool CanAccessDoor (IEntity targetEntity, BaseCompartmentManagerComponent compartmentManagerCompartment, int doorInfoIndex)
 Returns true if.
 
proto external bool IsGettingIn ()
 Returns true while getting in.
 
proto external bool IsGettingOut ()
 Returns true while getting out.
 
proto external bool CanGetOutVehicle ()
 Returns true if compartment can be gotten out of.
 
proto external bool CanGetOutVehicleViaDoor (int doorIndex)
 Returns true if compartment can be gotten out of via the door with index.
 
proto external bool IsSwitchingSeatsAnim ()
 Returns true if character is in the switching animation.
 
proto external bool FindSuitableTeleportLocation (vector TR[4])
 
proto external bool CanJumpOutVehicle ()
 Returns true if current compartment can be jumped from.
 
proto external bool IsVehicleFlipped (float dotThreshold)
 
proto external bool CompareSeatOutVectorAndGravity (float dotThreshold)
 
proto external void SetActivePilotCompartment (BaseCompartmentSlot pilotCompartment)
 
- Public Member Functions inherited from GameComponent
bool OnTicksOnRemoteProxy ()
 

Static Public Member Functions

static ECompartmentType GetCompartmentType (notnull BaseCompartmentSlot compartment)
 Get type of a compartment.
 
- Static Public Member Functions inherited from CompartmentAccessComponent
static proto IEntity GetVehicleIn (IEntity entity)
 Returns the vehicle entity is in (root entity of whole hierarchy)
 

Protected Member Functions

void MoveInVehicleOwner (RplId slotEntityID, int slotID, bool performWhenPaused)
 
void OnCompartmentEntered (IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
 
void OnCompartmentLeft (IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
 

Protected Attributes

ref OnPlayerEnterCompartment m_OnPlayerEnterCompartment
 
ref OnPlayerExitCompartment m_OnPlayerExitCompartment
 

Static Protected Attributes

const int WAIT_FOR_VEHICLE_MAX_TRIES = 10
 
static int s_iWaitForVehicleTries = 0
 

Constructor & Destructor Documentation

◆ ~SCR_CompartmentAccessComponent()

void SCR_CompartmentAccessComponent.~SCR_CompartmentAccessComponent ( )

Member Function Documentation

◆ FindFreeAndAccessibleCompartment()

BaseCompartmentSlot SCR_CompartmentAccessComponent.FindFreeAndAccessibleCompartment ( IEntity  vehicle,
ECompartmentType  compartmentType,
BaseCompartmentSlot  customSlot = null 
)

Find a compartment that is marked as accessible and not occupied by anyone.

Parameters
vehicleTarget vehicle
compartmentTypeType of compartment
Returns
Compartment, null if none was found

◆ GetCompartmentType()

static ECompartmentType SCR_CompartmentAccessComponent.GetCompartmentType ( notnull BaseCompartmentSlot  compartment)
static

Get type of a compartment.

Parameters
compartmentQueried compartment
Returns
Compartment type, or -1 if invalid

◆ GetOnCompartmentEntered()

ScriptInvoker SCR_CompartmentAccessComponent.GetOnCompartmentEntered ( bool  createNew = true)

◆ GetOnCompartmentLeft()

ScriptInvoker SCR_CompartmentAccessComponent.GetOnCompartmentLeft ( bool  createNew = true)

◆ GetOnPlayerCompartmentEnter()

OnPlayerEnterCompartment SCR_CompartmentAccessComponent.GetOnPlayerCompartmentEnter ( bool  createNew = true)

◆ GetOnPlayerCompartmentExit()

OnPlayerExitCompartment SCR_CompartmentAccessComponent.GetOnPlayerCompartmentExit ( bool  createNew = true)

◆ GetVehicle() [1/2]

IEntity SCR_CompartmentAccessComponent.GetVehicle ( )

Get vehicle this entity is in.

Works even when the entity is not directly in the vehicle, but in one of its child entities (e.g., turrets) Use this function when you specifically need pointer to the vehicle. If you want to simply check if a character is in a vehicle, use IsInCompartment()!

Returns
Vehicle, null when not in any compartment

◆ GetVehicle() [2/2]

IEntity SCR_CompartmentAccessComponent.GetVehicle ( out int  compartmentID)

◆ MoveInVehicle()

bool SCR_CompartmentAccessComponent.MoveInVehicle ( IEntity  vehicle,
ECompartmentType  compartmentType,
bool  performWhenPaused = false,
BaseCompartmentSlot  customSlot = null 
)

Move in vehicle to specified slot type.

When executed on server while the character is owned by a client, this function will send the request there.

Parameters
vehicleTarget vehicle
compartmentTypeType of compartment
Returns
True if the request was successful

◆ MoveInVehicleAny()

bool SCR_CompartmentAccessComponent.MoveInVehicleAny ( IEntity  vehicle)

Move in vehicle to any available slot.

When executed on server while the character is owned by a client, this function will send the request there.

Parameters
vehicleTarget vehicle
Returns
True if the request was successful

◆ MoveInVehicleOwner()

void SCR_CompartmentAccessComponent.MoveInVehicleOwner ( RplId  slotEntityID,
int  slotID,
bool  performWhenPaused 
)
protected

◆ OnCompartmentEntered()

override void SCR_CompartmentAccessComponent.OnCompartmentEntered ( IEntity  targetEntity,
BaseCompartmentManagerComponent  manager,
int  mgrID,
int  slotID,
bool  move 
)

◆ OnCompartmentLeft()

override void SCR_CompartmentAccessComponent.OnCompartmentLeft ( IEntity  targetEntity,
BaseCompartmentManagerComponent  manager,
int  mgrID,
int  slotID,
bool  move 
)

◆ OnLifeStateChanged()

void SCR_CompartmentAccessComponent.OnLifeStateChanged ( ECharacterLifeState  previousLifeState,
ECharacterLifeState  newLifeState 
)

Member Data Documentation

◆ m_OnPlayerEnterCompartment

ref OnPlayerEnterCompartment SCR_CompartmentAccessComponent.m_OnPlayerEnterCompartment
protected

◆ m_OnPlayerExitCompartment

ref OnPlayerExitCompartment SCR_CompartmentAccessComponent.m_OnPlayerExitCompartment
protected

◆ s_iWaitForVehicleTries

int SCR_CompartmentAccessComponent.s_iWaitForVehicleTries = 0
staticprotected

◆ WAIT_FOR_VEHICLE_MAX_TRIES

const int SCR_CompartmentAccessComponent.WAIT_FOR_VEHICLE_MAX_TRIES = 10
staticprotected

The documentation for this interface was generated from the following file: