Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
largetentbackpack.c
Go to the documentation of this file.
1class LargeTentBackPack extends Backpack_Base
2{
4
9
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};
void StopRepackingLoopSound()
EffectSound m_RepackingLoopSound
override void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
void PlayRepackingLoopSound()
Wrapper class for managing sound through SEffectManager.
Definition effectsound.c:5
The class that will be instanced (moddable)
Definition gameplay.c:389
Manager class for managing Effect (EffectParticle, EffectSound)
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Serialization general interface. Serializer API works with:
Definition serializer.c:56
class JsonUndergroundAreaTriggerData GetPosition
enum SoundTypeTent m_RepackingLoopSound
SoundTypeTent
Definition largetent.c:2