Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
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
{
7
m_RepackingLoopSound
=
new
EffectSound
;
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
{
32
PlayRepackingLoopSound
();
33
}
34
else
35
{
36
StopRepackingLoopSound
();
37
}
38
39
break
;
40
}
41
}
42
43
void
PlayRepackingLoopSound
()
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
51
void
StopRepackingLoopSound
()
52
{
53
m_RepackingLoopSound
.SetSoundFadeOut(0.5);
54
m_RepackingLoopSound
.SoundStop();
55
}
56
};
Backpack_Base
Definition
alicebag_colorbase.c:1
Backpack_Base::StopRepackingLoopSound
void StopRepackingLoopSound()
Definition
largetentbackpack.c:51
Backpack_Base::OnRPC
override void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
Definition
largetentbackpack.c:15
Backpack_Base::~LargeTentBackPack
void ~LargeTentBackPack()
Definition
largetentbackpack.c:10
Backpack_Base::m_RepackingLoopSound
EffectSound m_RepackingLoopSound
Definition
largetentbackpack.c:3
Backpack_Base::PlayRepackingLoopSound
void PlayRepackingLoopSound()
Definition
largetentbackpack.c:43
Backpack_Base::LargeTentBackPack
void LargeTentBackPack()
Definition
largetentbackpack.c:5
EffectSound
Wrapper class for managing sound through SEffectManager.
Definition
effectsound.c:5
PlayerIdentity
The class that will be instanced (moddable).
Definition
gameplay.c:389
SEffectManager
Manager class for managing Effect (EffectParticle, EffectSound).
Definition
effectmanager.c:6
SEffectManager::DestroyEffect
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Definition
effectmanager.c:271
SEffectManager::PlaySound
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.
Definition
effectmanager.c:169
Serializer::Read
proto bool Read(void value_in)
ParamsReadContext
Serializer ParamsReadContext
Definition
gameplay.c:15
GetPosition
vector GetPosition()
Get the world position of the Effect.
Definition
effect.c:473
SoundTypeTent
SoundTypeTent
Definition
largetent.c:2
Games
Dayz
scripts
4_world
entities
itembase
tentbase
largetentbackpack.c
Generated by
1.17.0