DayZ 1.24
Loading...
Searching...
No Matches
Land_Underground_Stairs_Exit.c
Go to the documentation of this file.
2{
4
6 //EffectSound m_OpenSoundLoop;
8
12
13 const string LOCKING_SOUNDSET = "UndergroundDoor_Lock_SoundSet";
14 const string OPENING_SOUNDSET_LOOP_IN = "UndergroundSmallExitDoor_Open_Start_SoundSet";
15 const string OPENING_SOUNDSET_LOOP = "UndergroundSmallExitDoor_Open_Loop_SoundSet";
16 const string OPENING_SOUNDSET_LOOP_OUT = "UndergroundSmallExitDoor_Open_End_SoundSet";
17
18 const string CLOSING_SOUNDSET_LOOP_IN = "UndergroundSmallExitDoor_Close_Start_SoundSet";
19 const string CLOSING_SOUNDSET_LOOP = "UndergroundSmallExitDoor_Close_Loop_SoundSet";
20 const string CLOSING_SOUNDSET_LOOP_OUT = "UndergroundSmallExitDoor_Close_End_SoundSet";
21
26
40
41 override float GetOpeningTime()
42 {
43 return AdjustTime(3);
44 }
45
47 {
48 switch (newState)
49 {
50 case EUndegroundEntranceState.OPENING_A:
52 SetAnimationPhase("EntranceDoor", 1);
53 break;
54 case EUndegroundEntranceState.OPENING_B:
55 GetGame().UpdatePathgraphRegionByObject(this);
57 break;
58 case EUndegroundEntranceState.CLOSING_A:
60 m_AnimTimerDoorServer.Run(0, this, "OnUpdateServer", "OnFinishedTimerServer", GetOpeningTime(), false, 1 / AdjustTime(1));
62 break;
63 case EUndegroundEntranceState.CLOSING_B:
65 GetGame().UpdatePathgraphRegionByObject(this);
66 break;
67 }
68 }
69 void SoundEnded(Effect eff)
70 {
71 if (eff == m_CloseSoundIn)
72 PlaySoundSetLoop(m_CloseSoundLoop, CLOSING_SOUNDSET_LOOP, 0, 0);
73 }
74
76 {
77 if (newState == EUndegroundEntranceState.OPENING_A)
78 {
79 PlaySoundSet(m_LockingSound, LOCKING_SOUNDSET, 0, 0);
80 PlaySoundSet(m_OpenSoundIn, OPENING_SOUNDSET_LOOP_IN, 0, 0);
81 }
82 else if (newState == EUndegroundEntranceState.OPENING_B)
83 {
84 if (m_OpenSoundIn)
86 PlaySoundSet(m_OpenSoundOut, OPENING_SOUNDSET_LOOP_OUT, 0, 0);
87 }
88 else if (newState == EUndegroundEntranceState.CLOSING_A)
89 {
90 PlaySoundSet(m_CloseSoundIn, CLOSING_SOUNDSET_LOOP_IN, 0, 0);
92 m_CloseSoundIn.Event_OnEffectEnded.Insert(SoundEnded);
93 }
94 else if (newState == EUndegroundEntranceState.CLOSING_B)
95 {
98 PlaySoundSet(m_CloseSoundOut, CLOSING_SOUNDSET_LOOP_OUT, 0, 0);
99 PlaySoundSet(m_LockingSound, LOCKING_SOUNDSET, 0, 0);
100
101 }
102 }
103
104 override void CreateLights()
105 {
106 m_InteriorLight1 = EntranceLight.Cast(ScriptedLightBase.CreateLightAtObjMemoryPoint(EntranceLightStairs1, this, "Light1"));
107 m_InteriorLight2 = EntranceLight.Cast(ScriptedLightBase.CreateLightAtObjMemoryPoint(EntranceLightStairs2, this, "Light2"));
108 }
109
110}
class EntranceLight extends PointLightBase EntranceLightStairs1()
AnimationTimer class. This timer is for animating float value. usage:
Definition tools.c:618
Wrapper class for managing sound through SEffectManager.
Definition EffectSound.c:5
override void Stop()
Stops sound.
float AdjustTime(float originalTime, float adjustedTime=-1)
void RequestLatentTransition(float time, EUndegroundEntranceState targetState=EUndegroundEntranceState.UNINITIALIZED)
override void HandleAudioPlayback(EUndegroundEntranceState newState, EUndegroundEntranceState prevState)
override void OnDoorStateChangedServer(EUndegroundEntranceState newState)
Manager class for managing Effect (EffectParticle, EffectSound)
static bool DestroySound(EffectSound sound_effect)
Legacy, backwards compatibility.
proto native CGame GetGame()