Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_VehicleWeaponActionBase.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
3{
4 protected SCR_FireModeManagerComponent fireModeManager;
5
7 [Attribute(desc: "Action sound event name")]
8 protected string m_sActionSoundEvent;
9
10 //------------------------------------------------------------------------------------------------
11 override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
12 {
13 super.Init(pOwnerEntity, pManagerComponent);
14
15 fireModeManager = SCR_FireModeManagerComponent.Cast(GetOwner().FindComponent(SCR_FireModeManagerComponent));
16 }
17
18 //------------------------------------------------------------------------------------------------
20 override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
21 {
22 super.PerformAction(pOwnerEntity, pUserEntity);
23
25 }
26
27 //------------------------------------------------------------------------------------------------
28 protected void PlayActionSound()
29 {
30 if (m_sActionSoundEvent.IsEmpty())
31 return;
32
33 SoundComponent soundComp = SoundComponent.Cast(GetOwner().GetRootParent().FindComponent(SoundComponent));
34 if (!soundComp)
35 return;
36
37 vector contextTransform[4];
38 GetActiveContext().GetTransformationModel(contextTransform);
39 soundComp.SoundEventOffset(m_sActionSoundEvent, contextTransform[3]);
40 }
41}
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external UserActionContext GetActiveContext()
Getter for m_pActiveContext.
proto external IEntity GetOwner()
Returns the parent entity of this action.
string m_sActionSoundEvent
Movement sound event name.
override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
By default toggle the current state of the interaction.
SCR_FireModeManagerComponent fireModeManager
SCR_FieldOfViewSettings Attribute