Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
christmastree.c
Go to the documentation of this file.
1class ChristmasTree extends House
2{
3 XmasTreeLight m_TreeLight;
5 const string LOOP_SOUND = "ChristmasMusic_SoundSet";
6
8 {
9 if ( !g_Game.IsDedicatedServer() )
10 {
11 m_TreeLight = XmasTreeLight.Cast( ScriptedLightBase.CreateLight( XmasTreeLight, "0 0 0" ) );
12 m_TreeLight.AttachOnMemoryPoint( this, "action" );
13 }
14 }
15
16 override void EEInit()
17 {
18 if ( !g_Game.IsDedicatedServer() )
19 {
20 PlaySoundSetLoop( m_AmbientSoundLoop, LOOP_SOUND, 0, 0 );
21 }
22 }
23
24 override void EEDelete(EntityAI parent)
25 {
26 if ( !g_Game.IsDedicatedServer() )
27 {
28 if ( m_TreeLight )
29 m_TreeLight.Destroy();
32 }
33 }
34};
35class ChristmasTree_Green extends ChristmasTree {};
Wrapper class for managing sound through SEffectManager.
Definition effectsound.c:5
EffectSound m_AmbientSoundLoop
override void EEInit()
void ChristmasTree()
override void EEDelete(EntityAI parent)
XmasTreeLight m_TreeLight
const string LOOP_SOUND
Manager class for managing Effect (EffectParticle, EffectSound).
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
DayZGame g_Game
Definition dayzgame.c:3942