Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_AdjustCollimatorAction.c
Go to the documentation of this file.
1
class
SCR_AdjustCollimatorAction
:
SCR_AdjustSignalAction
2
{
3
protected
SCR_CollimatorSightsComponent
m_SightsComponent
;
4
protected
SCR_CollimatorControllerComponent
m_SightControllerComponent
;
5
6
[
Attribute
(
desc
:
"When filled, this sound effect will be used instead when the signal is adjusted back to it's starting value"
)]
7
protected
string
m_sAlternativeMovementStopSoundEffect
;
8
9
//------------------------------------------------------------------------------------------------
10
override
void
Init
(
IEntity
pOwnerEntity,
GenericComponent
pManagerComponent)
11
{
12
super.Init(pOwnerEntity, pManagerComponent);
13
14
m_SightsComponent
=
SCR_CollimatorSightsComponent
.Cast(pOwnerEntity.
FindComponent
(
SCR_CollimatorSightsComponent
));
15
m_SightControllerComponent
=
SCR_CollimatorControllerComponent
.Cast(pOwnerEntity.
FindComponent
(
SCR_CollimatorControllerComponent
));
16
17
m_SoundComponent
=
SoundComponent
.Cast(pOwnerEntity.
FindComponent
(
SoundComponent
));
18
}
19
20
//------------------------------------------------------------------------------------------------
21
override
bool
CanBeShownScript
(
IEntity
user)
22
{
23
if
(!
m_SightsComponent
|| !
m_SightControllerComponent
)
24
return
false
;
25
26
return
super.CanBeShownScript(user);
27
}
28
29
//------------------------------------------------------------------------------------------------
31
override
void
PlayMovementAndStopSound
(
float
lerp)
32
{
33
if
(
m_sAlternativeMovementStopSoundEffect
.IsEmpty() || !
m_SoundComponent
||
m_fLerpLast
== lerp ||
float
.AlmostEqual(lerp, 1))
34
{
35
super.PlayMovementAndStopSound(lerp);
36
return
;
37
}
38
39
if
(!
float
.AlmostEqual(
m_fLerpLast
, 0))
40
{
41
m_SoundComponent
.Terminate(
m_MovementAudioHandle
);
42
if
(
m_sMovementStopSoundEvent
!=
string
.Empty)
43
{
44
vector
contextTransform[4];
45
GetActiveContext
().GetTransformationModel(contextTransform);
46
m_SoundComponent
.SoundEventOffset(
m_sAlternativeMovementStopSoundEffect
, contextTransform[3]);
47
}
48
}
49
50
m_fLerpLast
= lerp;
51
}
52
}
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
BaseUserAction::GetActiveContext
proto external UserActionContext GetActiveContext()
Getter for m_pActiveContext.
GenericComponent
Definition
GenericComponent.c:13
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
SCR_AdjustCollimatorAction
Definition
SCR_AdjustCollimatorAction.c:2
SCR_AdjustCollimatorAction::m_SightControllerComponent
SCR_CollimatorControllerComponent m_SightControllerComponent
Definition
SCR_AdjustCollimatorAction.c:4
SCR_AdjustCollimatorAction::m_sAlternativeMovementStopSoundEffect
string m_sAlternativeMovementStopSoundEffect
Definition
SCR_AdjustCollimatorAction.c:7
SCR_AdjustCollimatorAction::CanBeShownScript
override bool CanBeShownScript(IEntity user)
Definition
SCR_AdjustCollimatorAction.c:21
SCR_AdjustCollimatorAction::PlayMovementAndStopSound
override void PlayMovementAndStopSound(float lerp)
Plays movement and stop movement sound events.
Definition
SCR_AdjustCollimatorAction.c:31
SCR_AdjustCollimatorAction::m_SightsComponent
SCR_CollimatorSightsComponent m_SightsComponent
Definition
SCR_AdjustCollimatorAction.c:3
SCR_AdjustCollimatorAction::Init
override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
Definition
SCR_AdjustCollimatorAction.c:10
SCR_AdjustSignalAction
Definition
SCR_AdjustSignalAction.c:2
SCR_AdjustSignalAction::m_SoundComponent
SoundComponent m_SoundComponent
Sound component on owner entity.
Definition
SCR_AdjustSignalAction.c:54
SCR_AdjustSignalAction::m_MovementAudioHandle
AudioHandle m_MovementAudioHandle
Movement sound AudioHandle.
Definition
SCR_AdjustSignalAction.c:60
SCR_AdjustSignalAction::m_sMovementStopSoundEvent
string m_sMovementStopSoundEvent
Movement stop sound event name.
Definition
SCR_AdjustSignalAction.c:37
SCR_AdjustSignalAction::m_fLerpLast
float m_fLerpLast
Last lerp value.
Definition
SCR_AdjustSignalAction.c:57
SCR_CollimatorControllerComponent
Definition
SCR_CollimatorControllerComponent.c:7
SCR_CollimatorSightsComponent
Definition
SCR_CollimatorSightsComponent.c:16
SoundComponent
Definition
SoundComponent.c:13
vector
Definition
vector.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
UserActions
SCR_AdjustCollimatorAction.c
Generated by
1.17.0