Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
largetentbackpack.c
Go to the documentation of this file.
1 class LargeTentBackPack extends Backpack_Base
2 {
3  ref protected EffectSound m_RepackingLoopSound;
4 
5  void LargeTentBackPack()
6  {
8  }
9 
10  void ~LargeTentBackPack()
11  {
12  SEffectManager.DestroyEffect( m_RepackingLoopSound );
13  }
14 
15  override void OnRPC(PlayerIdentity sender, int rpc_type,ParamsReadContext ctx)
16  {
17  super.OnRPC(sender, rpc_type, ctx);
18 
19  Param1<bool> p = new Param1<bool>(false);
20 
21  if (!ctx.Read(p))
22  return;
23 
24  bool play = p.param1;
25 
26  switch (rpc_type)
27  {
28  case SoundTypeTent.REPACK:
29 
30  if ( play )
31  {
33  }
34  else
35  {
37  }
38 
39  break;
40  }
41  }
42 
44  {
45  if ( !m_RepackingLoopSound || !m_RepackingLoopSound.IsSoundPlaying() )
46  {
47  m_RepackingLoopSound = SEffectManager.PlaySound( "largetent_deploy_SoundSet", GetPosition(), 0.5, 0.5 );
48  }
49  }
50 
52  {
53  m_RepackingLoopSound.SetSoundFadeOut(0.5);
54  m_RepackingLoopSound.SoundStop();
55  }
56 
57  override void SetActions()
58  {
59  super.SetActions();
60 
61  //AddAction(ActionRepackTent);
62  }
63 };
Backpack_Base
Definition: alicebag_colorbase.c:1
SoundTypeTent
SoundTypeTent
Definition: largetent.c:1
Serializer
Serialization general interface. Serializer API works with:
Definition: serializer.c:55
OnRPC
void OnRPC(ParamsReadContext ctx)
Definition: displaystatus.c:216
PlayerIdentity
The class that will be instanced (moddable)
Definition: gameplay.c:377
GetPosition
class JsonUndergroundAreaTriggerData GetPosition
Definition: undergroundarealoader.c:9
EffectSound
Wrapper class for managing sound through SEffectManager.
Definition: effectsound.c:4
SetActions
void SetActions()
Definition: advancedcommunication.c:79
m_RepackingLoopSound
enum SoundTypeTent m_RepackingLoopSound
StopRepackingLoopSound
void StopRepackingLoopSound()
Definition: largetent.c:80
SEffectManager
Manager class for managing Effect (EffectParticle, EffectSound)
Definition: effectmanager.c:5
PlayRepackingLoopSound
void PlayRepackingLoopSound()
Definition: largetent.c:72