Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
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
23 {
24 m_DoorType = EUndegroundDoorType.SMALL;
25 }
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 g_Game.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 g_Game.UpdatePathgraphRegionByObject(this);
66 break;
67 }
68 }
70 {
71 if (eff == m_CloseSoundIn)
72 {
73 PlaySoundSetLoop( m_CloseSoundLoop, CLOSING_SOUNDSET_LOOP, 0, 0 );
74 }
75 }
76
78 {
79 if (newState == EUndegroundEntranceState.OPENING_A)
80 {
81 PlaySoundSet( m_LockingSound, LOCKING_SOUNDSET, 0, 0 );
82 PlaySoundSet( m_OpenSoundIn, OPENING_SOUNDSET_LOOP_IN, 0, 0 );
83 }
84 else if (newState == EUndegroundEntranceState.OPENING_B)
85 {
86 if (m_OpenSoundIn)
87 m_OpenSoundIn.Stop();
88 PlaySoundSet( m_OpenSoundOut, OPENING_SOUNDSET_LOOP_OUT, 0, 0 );
89 }
90 else if (newState == EUndegroundEntranceState.CLOSING_A)
91 {
92 PlaySoundSet( m_CloseSoundIn, CLOSING_SOUNDSET_LOOP_IN, 0, 0 );
94 m_CloseSoundIn.Event_OnEffectEnded.Insert(SoundEnded);
95 }
96 else if (newState == EUndegroundEntranceState.CLOSING_B)
97 {
99 m_CloseSoundLoop.Stop();
100 PlaySoundSet( m_CloseSoundOut, CLOSING_SOUNDSET_LOOP_OUT, 0, 0 );
101 PlaySoundSet( m_LockingSound, LOCKING_SOUNDSET, 0, 0 );
102
103 }
104 }
105
106 override void CreateLights()
107 {
108 m_InteriorLight1 = EntranceLight.Cast(ScriptedLightBase.CreateLightAtObjMemoryPoint(EntranceLightStairs1, this, "Light1"));
109 m_InteriorLight2 = EntranceLight.Cast(ScriptedLightBase.CreateLightAtObjMemoryPoint(EntranceLightStairs2, this, "Light2"));
110 }
111
112}
AnimationTimer class.
Definition tools.c:651
Wrapper class for managing sound through SEffectManager.
Definition effectsound.c:5
void RequestLatentTransition(float time, EUndegroundEntranceState targetState=EUndegroundEntranceState.UNINITIALIZED)
float AdjustTime(float originalTime, float adjustedTime=-1)
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.
DayZGame g_Game
Definition dayzgame.c:3942
void Effect()
ctor
Definition effect.c:72
class EntranceLight extends PointLightBase EntranceLightStairs1()
void EntranceLight()