Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_SoundComponentCinematicTrack.c
Go to the documentation of this file.
1[CinematicTrackAttribute(name:"Sound Component Track", description:"Track used for triggering sound on SoundComponent")]
3{
4 [Attribute("")]
5 protected string m_sSoundEvent;
6
7 [Attribute("")]
8 protected string m_sBoneName;
9
10 protected IEntity m_owner;
11
12 override void OnInit(World world)
13 {
14 super.OnInit(world);
15
17 }
18
20 void PlayEvent()
21 {
22 if (m_sSoundEvent.IsEmpty())
23 {
24 return;
25 }
26
27 if (!m_owner)
28 {
30 }
31
32 if (!m_owner)
33 {
34 return;
35 }
36
37 SoundComponent soundComponent = SoundComponent.Cast(m_owner.FindComponent(SoundComponent));
38 if (!soundComponent)
39 {
40 return;
41 }
42
43 if (m_sBoneName.IsEmpty())
44 {
45 soundComponent.SoundEvent(m_sSoundEvent);
46 }
47 else
48 {
49 soundComponent.SoundEventBone(m_sSoundEvent, m_sBoneName)
50 }
51 }
52}
void CinematicEventAttribute(string name="")
Definition attributes.c:18
Definition World.c:16
SCR_FieldOfViewSettings Attribute