Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_HelicopterCollimatorSightComponent Interface Reference
Inheritance diagram for SCR_HelicopterCollimatorSightComponent:
SCR_CollimatorSightsComponent BaseCollimatorSightsComponent SightsComponent BaseSightsComponent GameComponent

Public Member Functions

override void OnSightADSActivate ()
 
override void OnSightADSDeactivated ()
 
void OwnerSyncSightState (bool newState)
 Method called by authority that can broadcast the change.
 
void OverrideSightState (bool newState)
 Method used to locally override current state of the sight.
 
- Public Member Functions inherited from SCR_CollimatorSightsComponent
override float GetReticleBrightnessDay ()
 Get the Brightness of the reticle glow.
 
override float GetReticleBrightnessNight ()
 
override void OnPostInit (IEntity owner)
 Called on PostInit when all components are added.
 
void ReticleToggleIllumination ()
 
override void UpdateReticlePosition (float u, float v, float uScale, float vScale)
 Called to update the sight position U/V.
 
override void UpdateReticleShapeIndex (int index)
 Called to update the Reticle shape.
 
override void UpdateReticleColor (vector inner, vector glow)
 Called to update reticle color.
 
override void UpdateReticleBrightnessScale (float scale)
 Called to set auto brightness factor.
 
override void UpdateReticleBrightness (float lvFactor, bool useOwn)
 Called to set glow brightness.
 
- Public Member Functions inherited from BaseCollimatorSightsComponent
proto external void SetReticleSize (float angularSize, float reticlePortion)
 Set virtual reticle size.
 
proto external float GetReticleAngularSize ()
 Get the default angular size of the reticle, in degrees.
 
proto external float GetReticlePortion ()
 Get the default portion of the reticle that covers the given angular size.
 
proto external int GetNumReticles ()
 Get the number of reticle infos.
 
proto external bool IsReticleValid (int index)
 Is reticle index valud.
 
proto external BaseCollimatorReticleInfo GetReticleByIndex (int index)
 Get a reticle by index.
 
proto external int GetCurrentReticleShape ()
 Get current reticle shape.
 
proto external void ReticleNextShape ()
 Set the next reticle shape. This always works, but might not do anything if only one reticle is defined.
 
proto external void ReticlePreviousShape ()
 Set the previous reticle shape. This always works, but might not do anything if only one reticle is defined.
 
proto external bool SetReticleShapeByIndex (int iIndex)
 Set reticle shape by index. Returns true if successful.
 
proto external int GetNumColors ()
 Get the number of reticle colors.
 
proto external int IsColorValid (int index)
 Is color index valid.
 
proto external BaseCollimatorReticleColor GetColorByIndex (int index)
 Get a color record by index.
 
proto external int GetCurrentColor ()
 Get current reticle color index.
 
proto external void ReticleNextColor ()
 Set the next reticle color. This always works, but might not do anything if only one or no color is defined.
 
proto external void ReticlePreviousColor ()
 Set the previous reticle color. This always works, but might not do anything if only one or no color is defined.
 
proto external float GetNormalizedLightIntensity ()
 Get the normalized light intensity at the sight.
 
proto external bool SetReticleColorByIndex (int iIndex)
 Set reticle color by index. Return true if successful.
 
proto external void SetVerticalAngularCorrection (float fAngle)
 Set the angular correction (vertical) (in mils)
 
proto external float GetVerticalAngularCorrection ()
 Get the angular correction (vertical) in mils.
 
proto external void SetHorizontalAngularCorrection (float fAngle)
 Set the angular correction (widage) (in mils)
 
proto external float GetHorizontalAngularCorrection ()
 Get the angular correction (windage) in mils.
 
proto external bool IsSightActive ()
 Returns true if the sight is active, false if it isn't THis doesn't necessarily mean that the sight is visible, it can be active but the reticle might be hidden because it is only visible during ADS.
 
proto external void SetSightForcedOff (bool forceOff)
 Set the sight on or off.
 
proto external void EnableManualBrightness (bool bEnable)
 Enable manual brightness setting.
 
proto external bool IsManualBrightnessEnabled ()
 Returns true if manual brightness is enabled.
 
proto external void SetManualBrightness (float fBrightness, bool bClamp)
 Enable and set manaul brightness control.
 
proto external float GetManualBrightness ()
 Return the current reticle manual brightness.
 
proto external bool GetManualBrightnessClamp ()
 Return true if manual brighness is clamped between day and night, or false if between off and day.
 
- Public Member Functions inherited from SightsComponent
void ApplyRecoilToCamera (inout vector pOutCameraTransform[4], vector aimModAngles)
 Applies the given recoil angles to the camera transform according to the type of sight By default this method is empty.
 
bool CanFreelook ()
 
bool GetDOFRelatedPrefabData (out int opticDOFDistanceScale=-1, out bool forceSimpleDOF=false)
 Used by SCR_DepthOfFieldEffect to scale the DOF based on each particular ironsight-distance.
 
- Public Member Functions inherited from BaseSightsComponent
proto external IEntity GetOwner ()
 
proto external void ForceSightsZeroValue (vector offset, vector angles, vector turnOffset)
 Allow to override Zeroing via aim modifier (only works in Workbench)
 
proto external void ForceSightsZeroValueEnablel (bool bOnOff)
 Disable forced zeroing data.
 
proto external bool IsSightADSActive ()
 
proto external float GetADSActivationPercentage ()
 
proto external float GetADSDeactivationPercentage ()
 
proto external bool AreSightsValid (bool front=true, bool rear=true)
 
proto external vector GetSightsRearPosition (bool localSpace=false)
 Returns additional sights position used for calculating zeroing A vector is calculated from start position to end position and used as direction for calculating zeroing offsets Start position should be the one closer to eye position than end position.
 
proto external vector GetSightsFrontPosition (bool localSpace=false)
 Returns additional sights position used for calculating zeroing A vector is calculated from start position to end position and used as direction for calculating zeroing offsets End position should be the one further from eye position than start position.
 
proto external vector GetSightsDirection (bool localSpace=false, bool normalize=true)
 Returns a direction vector from the rear sight position to the front sight position A vector is calculated from the rear sight to the front sight in such a way that GetSightsRearPosition() + GetSightsDirection() == GetSightsFrontPosition()
 
proto external vector GetSightsDirectionUntransformed (bool localSpace=false, bool normalize=true)
 Like GetSightsDirection, but ignores and bones associated with the sight points.
 
proto external vector GetSightsOffset ()
 Returns the local sights reference point offset.
 
proto external bool GetSightsTransform (out vector transform[4], bool localSpace=false)
 Returns the transform matrix of the local sights.
 
proto external float GetFOV ()
 Returns current value of field of view.
 
proto external vector GetCurrentSightsRange ()
 Returns current range info value where x: animation value y: distance z: unused.
 
proto external SightsFOVInfo GetFOVInfo ()
 Returns currently selected sights FOV info or null if none.
 
proto external float GetCameraRecoilAmount ()
 Percentage 0...1 of recoil that should be applied to camera when using this sights component.
 
proto external bool GetSightsPriority ()
 Boolean indicating whether this sight component is prioritized.
 
proto external bool GetSightsSkipSwitch ()
 Return true if the sights can be switched to.
 
proto external void SetSightsVisibility (float visFactor)
 Hide parts of the sight on ADS. 0 means completely visible, 1 means completely hidden.
 
proto external PointInfo GetPositionPointInfo ()
 
proto external PointInfo GetRearPositionPointInfo ()
 
proto external PointInfo GetFrontPositionPointInfo ()
 
- Public Member Functions inherited from GameComponent
bool OnTicksOnRemoteProxy ()
 

Protected Member Functions

void ToggleSightState (float value=0.0, EActionTrigger reason=0, string actionName=string.Empty)
 Keybind callback responsible for switching deplyed state of the sight.
 
void OnSightStateSynced ()
 
SignalsManagerComponent FindSignalsManagerComponent ()
 Finds signals manager component that is responsible for animation playback.
 
void ChangeSightDeployedState (bool newState)
 
void ChangeSightElevation (float value=0.0, EActionTrigger reason=0, string actionName=string.Empty)
 Keybind callback that locally changes the elevation of the sight.
 
void SetUpActionListeners ()
 
void RemoveActionListeners ()
 
- Protected Member Functions inherited from SCR_CollimatorSightsComponent
void ToggleIllumination (float value, EActionTrigger trigger)
 
- Protected Member Functions inherited from SightsComponent
override bool WB_GetZeroingData (IEntity owner, BaseSightsComponent sights, float weaponAngle, out vector offset, out vector angles)
 Positive weapon angle tilts weapon upwards (muzzle goes up, stock goes down) Negative weapon angle tilts weapon downwards (muzzle goes down, stock goes up) Called from GameCode, do not remove!
 
bool FindParent (IEntity owner, string eyeBoneName, out IEntity parentWeapon, out int boneIndex)
 

Protected Attributes

string m_sDeploySignalName
 
int m_iSignalHierarchyLevel
 
string m_sSoundEventBoneName
 
string m_sDeploySoundEventName
 
string m_sStowSoundEventName
 
float m_fMinSightAngle
 
float m_fMaxSightAngle
 
float m_fElevationAngleStep
 
float m_fElevationToSignalFactor
 
string m_sElevationSignalName
 
string m_sElevationSoundEventBoneName
 
bool m_bIsDeployed
 
- Protected Attributes inherited from SCR_CollimatorSightsComponent
float m_fDaylightBrightness
 
float m_fNightBrightness
 

Static Protected Attributes

const string DEPLOY_COLLIMATOR_ACTION_NAME = "HelicopterSightDeploy"
 
const string CHANGE_COLLIMATOR_ELEVATION_ACTION_NAME = "HelicopterSightZeroing"
 

Additional Inherited Members

- Static Public Member Functions inherited from SightsComponent
static ZeroingGeneratedData CalculateDataWithParent (BaseSightsComponent sights, IEntity owner, IEntity parent, float desiredAngle)
 Takes front sights position as the anchor around which it rotates both the owner and the parent under desiredAngle (or rather negative desired angle, as we are pivoting around our target) and calculates new transformation that needs to be applied to reach desired angle.
 
- Public Attributes inherited from SCR_CollimatorSightsComponent
SCR_CollimatorControllerComponent m_managerComponent
 
bool m_bReticleDaylight = true
 
int m_iColorIndex = -1
 
- Static Public Attributes inherited from SCR_CollimatorSightsComponent
const string ACTION_ILLUMINATION = "WeaponToggleSightsIllumination"
 
- Static Public Attributes inherited from SightsComponent
const string EYE_BONE = "eye"
 

Member Function Documentation

◆ ChangeSightDeployedState()

void SCR_HelicopterCollimatorSightComponent.ChangeSightDeployedState ( bool newState)
protected
Parameters
[in]newState

◆ ChangeSightElevation()

void SCR_HelicopterCollimatorSightComponent.ChangeSightElevation ( float value = 0::0,
EActionTrigger reason = 0,
string actionName = string::Empty )
protected

Keybind callback that locally changes the elevation of the sight.

Parameters
[in]value
[in]reason
[in]actionName

◆ FindSignalsManagerComponent()

SignalsManagerComponent SCR_HelicopterCollimatorSightComponent.FindSignalsManagerComponent ( )
protected

Finds signals manager component that is responsible for animation playback.

◆ OnSightADSActivate()

override void SCR_HelicopterCollimatorSightComponent.OnSightADSActivate ( )

◆ OnSightADSDeactivated()

override void SCR_HelicopterCollimatorSightComponent.OnSightADSDeactivated ( )

◆ OnSightStateSynced()

void SCR_HelicopterCollimatorSightComponent.OnSightStateSynced ( )
protected

◆ OverrideSightState()

void SCR_HelicopterCollimatorSightComponent.OverrideSightState ( bool newState)

Method used to locally override current state of the sight.

Parameters
[in]newState

◆ OwnerSyncSightState()

void SCR_HelicopterCollimatorSightComponent.OwnerSyncSightState ( bool newState)

Method called by authority that can broadcast the change.

Parameters
[in]newState

◆ RemoveActionListeners()

void SCR_HelicopterCollimatorSightComponent.RemoveActionListeners ( )
protected

◆ SetUpActionListeners()

void SCR_HelicopterCollimatorSightComponent.SetUpActionListeners ( )
protected

◆ ToggleSightState()

void SCR_HelicopterCollimatorSightComponent.ToggleSightState ( float value = 0::0,
EActionTrigger reason = 0,
string actionName = string::Empty )
protected

Keybind callback responsible for switching deplyed state of the sight.

Parameters
[in]value
[in]reason
[in]actionName

Member Data Documentation

◆ CHANGE_COLLIMATOR_ELEVATION_ACTION_NAME

const string SCR_HelicopterCollimatorSightComponent.CHANGE_COLLIMATOR_ELEVATION_ACTION_NAME = "HelicopterSightZeroing"
staticprotected

◆ DEPLOY_COLLIMATOR_ACTION_NAME

const string SCR_HelicopterCollimatorSightComponent.DEPLOY_COLLIMATOR_ACTION_NAME = "HelicopterSightDeploy"
staticprotected

◆ m_bIsDeployed

bool SCR_HelicopterCollimatorSightComponent.m_bIsDeployed
protected

◆ m_fElevationAngleStep

float SCR_HelicopterCollimatorSightComponent.m_fElevationAngleStep
protected

◆ m_fElevationToSignalFactor

float SCR_HelicopterCollimatorSightComponent.m_fElevationToSignalFactor
protected

◆ m_fMaxSightAngle

float SCR_HelicopterCollimatorSightComponent.m_fMaxSightAngle
protected

◆ m_fMinSightAngle

float SCR_HelicopterCollimatorSightComponent.m_fMinSightAngle
protected

◆ m_iSignalHierarchyLevel

int SCR_HelicopterCollimatorSightComponent.m_iSignalHierarchyLevel
protected

◆ m_sDeploySignalName

string SCR_HelicopterCollimatorSightComponent.m_sDeploySignalName
protected

◆ m_sDeploySoundEventName

string SCR_HelicopterCollimatorSightComponent.m_sDeploySoundEventName
protected

◆ m_sElevationSignalName

string SCR_HelicopterCollimatorSightComponent.m_sElevationSignalName
protected

◆ m_sElevationSoundEventBoneName

string SCR_HelicopterCollimatorSightComponent.m_sElevationSoundEventBoneName
protected

◆ m_sSoundEventBoneName

string SCR_HelicopterCollimatorSightComponent.m_sSoundEventBoneName
protected

◆ m_sStowSoundEventName

string SCR_HelicopterCollimatorSightComponent.m_sStowSoundEventName
protected

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