Arma Reforger Script API
Loading...
Searching...
No Matches
TurretControllerComponent Interface Reference
Inheritance diagram for TurretControllerComponent:
CompartmentControllerComponent BaseControllerComponent GameComponent SCR_TurretControllerComponent

Public Member Functions

proto external BaseCompartmentSlot GetCompartmentSlot ()
 
proto external bool GetCanAimOnlyInADS ()
 Returns true if we can only aim in ADS.
 
proto external bool IsFreeLookEnabled ()
 Returns true if the free look is enabled.
 
proto external bool IsWeaponADS ()
 Returns true if the weapon is in ADS.
 
proto external void SetWeaponADS (bool val)
 Request weapon ADS state.
 
proto external bool GetWeaponADSInput ()
 Returns weapon ADS input state.
 
proto external void SetWeaponADSInput (bool val)
 Request weapon ADS input state.
 
proto external void SetWeaponADSEnabled (bool val)
 Enable or disable weapon ADS.
 
proto external bool GetWeaponADSEnabled ()
 
proto external ETurretReloadState GetReloadingState ()
 
proto external float GetADSTime ()
 Returns the time to ADS in seconds.
 
proto external BaseSightsComponent GetCurrentSights ()
 
proto external bool GetCurrentSightsADS ()
 
proto external void SetCurrentSightsADS (bool on)
 Set if we are currently in ADS.
 
proto bool GetCurrentSightsCameraTransform (out vector outWorldMatrix[4], out float fov)
 Returns true if current turret is valid and has some sights data, outputs world sights transformation and FOV.
 
proto bool GetCurrentSightsCameraLocalTransform (out vector outLocalMatrix[4], out float fov)
 Returns true if current turret is valid and has some sights data, outputs local sights transformation and FOV.
 
proto external bool AssembleTurret ()
 
proto external bool DisassembleTurret ()
 
proto external bool RemoveWeapon (IEntity user, int index, IEntity receiver)
 Remove the given weapon index, and put it into pReceiver's inventory. If pReceiver is null, drop it to the ground. pUser can be nullptr if called from server.
 
proto external bool AddWeapon (IEntity user, int index, IEntity weapon)
 Add the weapon to the turret on the given slot index. pUser can be nullptr if called from server.
 
proto external TurretComponent GetTurretComponent ()
 
proto external BaseWeaponManagerComponent GetWeaponManager ()
 
proto external InventoryStorageManagerComponent GetInventoryManager ()
 
proto external bool SelectWeapon (IEntity user, BaseWeaponComponent newWeapon)
 Select the new weapon specified in parameter.
 
proto external bool SetWeaponGroup (array< int > weapons, EWeaponGroupFireMode mode, int rippleQuantity=1, float timeBetween=100.0)
 Select a group of weapons for firing.
 
proto external float GetReloadDuration ()
 
proto external float GetReloadTime ()
 
proto external bool DoReloadWeaponWith (IEntity ammunitionEntity)
 
proto external void SetFireWeaponWanted (bool val)
 Set if turret is firing or not.
 
proto external void SetAimingAngles (float yaw, float pitch)
 Set aiming angles in radians.
 
proto external bool GetIsOverridden ()
 
proto external string GetUniqueName ()
 
proto external void SetWeaponInputState (ETurretWeaponInputState state)
 Used to remotely trigger weapon actions on the turret.
 
- Public Member Functions inherited from BaseControllerComponent
proto external IEntity GetOwner ()
 Returns the entity owner of the component.
 
proto external bool CanMove ()
 Returns state of movement capacity.
 
proto external void SetCanMove (bool canMove)
 Changes state of movement capacity. Internally verifies if all necessary conditions are met.
 
bool ValidateCanMove ()
 
- Public Member Functions inherited from GameComponent
bool OnTicksOnRemoteProxy ()
 

Protected Member Functions

void OnPrepareControls (IEntity owner, ActionManager am, float dt, bool player)
 

Member Function Documentation

◆ AddWeapon()

proto external bool TurretControllerComponent.AddWeapon ( IEntity user,
int index,
IEntity weapon )

Add the weapon to the turret on the given slot index. pUser can be nullptr if called from server.

◆ AssembleTurret()

proto external bool TurretControllerComponent.AssembleTurret ( )

◆ DisassembleTurret()

proto external bool TurretControllerComponent.DisassembleTurret ( )

◆ DoReloadWeaponWith()

proto external bool TurretControllerComponent.DoReloadWeaponWith ( IEntity ammunitionEntity)

◆ GetADSTime()

proto external float TurretControllerComponent.GetADSTime ( )

Returns the time to ADS in seconds.

◆ GetCanAimOnlyInADS()

proto external bool TurretControllerComponent.GetCanAimOnlyInADS ( )

Returns true if we can only aim in ADS.

◆ GetCompartmentSlot()

proto external BaseCompartmentSlot TurretControllerComponent.GetCompartmentSlot ( )

◆ GetCurrentSights()

proto external BaseSightsComponent TurretControllerComponent.GetCurrentSights ( )

◆ GetCurrentSightsADS()

proto external bool TurretControllerComponent.GetCurrentSightsADS ( )

◆ GetCurrentSightsCameraLocalTransform()

proto bool TurretControllerComponent.GetCurrentSightsCameraLocalTransform ( out vector outLocalMatrix[4],
out float fov )

Returns true if current turret is valid and has some sights data, outputs local sights transformation and FOV.

◆ GetCurrentSightsCameraTransform()

proto bool TurretControllerComponent.GetCurrentSightsCameraTransform ( out vector outWorldMatrix[4],
out float fov )

Returns true if current turret is valid and has some sights data, outputs world sights transformation and FOV.

◆ GetInventoryManager()

proto external InventoryStorageManagerComponent TurretControllerComponent.GetInventoryManager ( )

◆ GetIsOverridden()

proto external bool TurretControllerComponent.GetIsOverridden ( )

◆ GetReloadDuration()

proto external float TurretControllerComponent.GetReloadDuration ( )

◆ GetReloadingState()

proto external ETurretReloadState TurretControllerComponent.GetReloadingState ( )

◆ GetReloadTime()

proto external float TurretControllerComponent.GetReloadTime ( )

◆ GetTurretComponent()

proto external TurretComponent TurretControllerComponent.GetTurretComponent ( )

◆ GetUniqueName()

proto external string TurretControllerComponent.GetUniqueName ( )

◆ GetWeaponADSEnabled()

proto external bool TurretControllerComponent.GetWeaponADSEnabled ( )

◆ GetWeaponADSInput()

proto external bool TurretControllerComponent.GetWeaponADSInput ( )

Returns weapon ADS input state.

◆ GetWeaponManager()

proto external BaseWeaponManagerComponent TurretControllerComponent.GetWeaponManager ( )

◆ IsFreeLookEnabled()

proto external bool TurretControllerComponent.IsFreeLookEnabled ( )

Returns true if the free look is enabled.

◆ IsWeaponADS()

proto external bool TurretControllerComponent.IsWeaponADS ( )

Returns true if the weapon is in ADS.

◆ OnPrepareControls()

void TurretControllerComponent.OnPrepareControls ( IEntity owner,
ActionManager am,
float dt,
bool player )
protected

◆ RemoveWeapon()

proto external bool TurretControllerComponent.RemoveWeapon ( IEntity user,
int index,
IEntity receiver )

Remove the given weapon index, and put it into pReceiver's inventory. If pReceiver is null, drop it to the ground. pUser can be nullptr if called from server.

◆ SelectWeapon()

proto external bool TurretControllerComponent.SelectWeapon ( IEntity user,
BaseWeaponComponent newWeapon )

Select the new weapon specified in parameter.

Parameters
userThe user will select the weapon.
newWeaponThe new weapon that will be selected.
Returns
Returns true if the selection has happened.

◆ SetAimingAngles()

proto external void TurretControllerComponent.SetAimingAngles ( float yaw,
float pitch )

Set aiming angles in radians.

IMPORTANT* Only works locally. Used mainly for cinematic

◆ SetCurrentSightsADS()

proto external void TurretControllerComponent.SetCurrentSightsADS ( bool on)

Set if we are currently in ADS.

Parameters
onTrue if we are ADS otherwise false.

◆ SetFireWeaponWanted()

proto external void TurretControllerComponent.SetFireWeaponWanted ( bool val)

Set if turret is firing or not.

◆ SetWeaponADS()

proto external void TurretControllerComponent.SetWeaponADS ( bool val)

Request weapon ADS state.

◆ SetWeaponADSEnabled()

proto external void TurretControllerComponent.SetWeaponADSEnabled ( bool val)

Enable or disable weapon ADS.

◆ SetWeaponADSInput()

proto external void TurretControllerComponent.SetWeaponADSInput ( bool val)

Request weapon ADS input state.

◆ SetWeaponGroup()

proto external bool TurretControllerComponent.SetWeaponGroup ( array< int > weapons,
EWeaponGroupFireMode mode,
int rippleQuantity = 1,
float timeBetween = 100.0 )

Select a group of weapons for firing.

Parameters
weaponsAn array of weapon slots to use (corresponding to the indices defined in WeaponSlotComponents)
modeOne of EWeaponGroupFireMode, WGFM_SALVO, WGFM_RIPPLE or WGFM_SEQUENTIAL
rippleQuantity(optional) How many weapons to fire in ripple mode (default 1)
timeBtween(optional) time between ripples (in ms, default 100) or sequential firing (if WGFM_SEQUENTIAL) Note that calling SelectWeapon or passing in an empty array will return to normal firing of single weapons

◆ SetWeaponInputState()

proto external void TurretControllerComponent.SetWeaponInputState ( ETurretWeaponInputState state)

Used to remotely trigger weapon actions on the turret.

Note that the turret must be overridden for this to have any effect


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