|
Arma Reforger Script API
|
Public Member Functions | |
| ScriptInvoker | GetOnCompartmentEntered (bool createNew=true) |
| ScriptInvoker | GetOnCompartmentLeft (bool createNew=true) |
| OnPlayerEnterCompartment | GetOnPlayerCompartmentEnter (bool createNew=true) |
| OnPlayerExitCompartment | GetOnPlayerCompartmentExit (bool createNew=true) |
| SCR_FireModeManagerComponent | GetControlledFireModeManager () |
| 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. | |
| void | AskOwnerToGetOutFromVehicle (EGetOutType type, int doorInfoIndex, ECloseDoorAfterActions closeDoor, bool performWhenPaused, bool ejectOnTheSpot=false) |
| Method used to ask the owner to leave the compartment. | |
| 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) |
| If force teleport, doorInfoIndex is ignored. closeDoor is still respected. | |
| proto external bool | GetOutVehicle (EGetOutType type, int doorInfoIndex, ECloseDoorAfterActions closeDoor, bool performWhenPaused) |
| If force teleport, doorInfoIndex is used for the teleport position and closeDoor is ignored. | |
| proto external bool | GetOutVehicle_NoDoor (vector targetTransform[4], bool sendIntoRagdoll, bool performWhenPaused) |
| Uses teleport - character is teleported to targetTransform, and door state will not be changed. | |
| proto external void | KickFromVehicle (int doorInfoIndex) |
| Kick another character out. | |
| proto external bool | OpenDoor (IEntity vehicle, ECharacterDoorAnimType doorAnimType, int doorInfoIndex) |
| Open door only. | |
| proto external bool | IsDoorFromAnotherVehicle (IEntity vehicle, int doorIndex) |
| Checks if the door at doorIndex belongs to another vehicle. | |
| proto external bool | AreDoorsFromDifferentVehicle (IEntity vehicle, int doorIndex) |
| Checks if the door at doorIndex belongs to another vehicle. | |
| proto external bool | CloseDoor (IEntity vehicle, ECharacterDoorAnimType doorAnimType, int doorInfoIndex) |
| Close door only. | |
| proto external void | InterruptVehicleActionQueue (bool interruptCurrentAction, bool forced, bool replicate) |
| Interrupt the get in/get out process. | |
| proto external bool | TurnOut (bool turnOut) |
| Turn out/in from/to compartment if it has the option for it. | |
| 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 | |
| override void | OnCompartmentEntered (IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move) |
| void | ToggleTurretFireModeControlls (notnull BaseCompartmentSlot slot, bool entered) |
| Updates the inputs for fire mode manager of a turret. | |
| override void | OnCompartmentLeft (IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move) |
| void | MoveInVehicleOwner (RplId slotEntityID, int slotID, bool performWhenPaused) |
| void | GetOutOwner (EGetOutType type, int doorInfoIndex, ECloseDoorAfterActions closeDoor, bool performWhenPaused, bool ejectOnTheSpot) |
| Replicated method executed by the owner of the character in order to get out of the vehicle. | |
Protected Attributes | |
| ref OnPlayerEnterCompartment | m_OnPlayerEnterCompartment |
| ref OnPlayerExitCompartment | m_OnPlayerExitCompartment |
| SCR_FireModeManagerComponent | m_TurretFireModeManager |
Static Protected Attributes | |
| const int | WAIT_FOR_VEHICLE_MAX_TRIES = 10 |
| static int | s_iWaitForVehicleTries = 0 |
| void SCR_CompartmentAccessComponent.~SCR_CompartmentAccessComponent | ( | ) |
| void SCR_CompartmentAccessComponent.AskOwnerToGetOutFromVehicle | ( | EGetOutType | type, |
| int | doorInfoIndex, | ||
| ECloseDoorAfterActions | closeDoor, | ||
| bool | performWhenPaused, | ||
| bool | ejectOnTheSpot = false ) |
Method used to ask the owner to leave the compartment.
| [in] | type | how player should get out of the vehicle |
| [in] | doorInfoIndex | through which door player will try to get out |
| [in] | closeDoor | should player close the door when he leaves the vehicle |
| [in] | performWhenPaused | |
| [in] | ejectOnTheSpot | if character should be ejected on the position where he currently is |
| BaseCompartmentSlot SCR_CompartmentAccessComponent.FindFreeAndAccessibleCompartment | ( | IEntity | vehicle, |
| ECompartmentType | compartmentType, | ||
| BaseCompartmentSlot | customSlot = null ) |
Find a compartment that is marked as accessible and not occupied by anyone.
| vehicle | Target vehicle |
| compartmentType | Type of compartment |
|
static |
Get type of a compartment.
| compartment | Queried compartment |
| SCR_FireModeManagerComponent SCR_CompartmentAccessComponent.GetControlledFireModeManager | ( | ) |
| ScriptInvoker SCR_CompartmentAccessComponent.GetOnCompartmentEntered | ( | bool | createNew = true | ) |
| ScriptInvoker SCR_CompartmentAccessComponent.GetOnCompartmentLeft | ( | bool | createNew = true | ) |
| OnPlayerEnterCompartment SCR_CompartmentAccessComponent.GetOnPlayerCompartmentEnter | ( | bool | createNew = true | ) |
| OnPlayerExitCompartment SCR_CompartmentAccessComponent.GetOnPlayerCompartmentExit | ( | bool | createNew = true | ) |
|
protected |
Replicated method executed by the owner of the character in order to get out of the vehicle.
| [in] | type | how player should get out of the vehicle |
| [in] | doorInfoIndex | through which door player will try to get out |
| [in] | closeDoor | should player close the door when he leaves the vehicle |
| [in] | performWhenPaused | |
| [in] | ejectOnTheSpot | if character should be ejected on the position where he currently is |
| 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()!
| IEntity SCR_CompartmentAccessComponent.GetVehicle | ( | out int | compartmentID | ) |
| 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.
| vehicle | Target vehicle |
| compartmentType | Type of compartment |
| 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.
| vehicle | Target vehicle |
|
protected |
|
protected |
Implements CompartmentAccessComponent.
|
protected |
Implements CompartmentAccessComponent.
| void SCR_CompartmentAccessComponent.OnLifeStateChanged | ( | ECharacterLifeState | previousLifeState, |
| ECharacterLifeState | newLifeState ) |
|
protected |
Updates the inputs for fire mode manager of a turret.
| [in] | slot | for which this should be exectued |
| [in] | entered |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |