Arma Reforger Explorer
1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_SpawnMusic.c
Go to the documentation of this file.
1
class
SCR_SpawnMusic
:
ScriptedMusic
2
{
3
MusicManager m_MusicManager;
4
5
//~ On local player spawned
6
protected
void
OnPlayerSpawned()
7
{
8
m_MusicManager
.Play(
SCR_SoundEvent
.SOUND_ONSPAWN);
9
}
10
11
override
void
Init()
12
{
13
ChimeraWorld
world =
GetGame
().GetWorld();
14
15
if
(!world)
16
return
;
17
18
m_MusicManager
= world.GetMusicManager();
19
if
(!
m_MusicManager
)
20
return
;
21
22
SCR_RespawnComponent
.SGetOnLocalPlayerSpawned().Insert(OnPlayerSpawned);
23
}
24
25
override
void
OnDelete()
26
{
27
if
(!
m_MusicManager
)
28
return
;
29
30
SCR_RespawnComponent
.SGetOnLocalPlayerSpawned().Remove(OnPlayerSpawned);
31
}
32
}
ChimeraWorld
Definition:
ChimeraWorld.c:12
SCR_RespawnComponent
void SCR_RespawnComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition:
SCR_RespawnComponent.c:576
GetGame
ArmaReforgerScripted GetGame()
Definition:
game.c:1424
SCR_SoundEvent
Definition:
SCR_SoundEvent.c:1
ScriptedMusic
Definition:
ScriptedMusic.c:12
SCR_SpawnMusic
Definition:
SCR_SpawnMusic.c:1
m_MusicManager
protected MusicManager m_MusicManager
Definition:
SCR_CharacterTriggerEntity.c:70
scripts_Arma_Reforger_v1.1.0.42
scripts
Game
Music
SCR_SpawnMusic.c
Generated by
1.8.17