Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_RepeatingParticleEffectEntity.c
Go to the documentation of this file.
2{
3 [Attribute(defvalue: "1000", desc: "Delay in ms until particles will play again", params: "0 inf", category: "Loop")]
4 protected int m_iLoopDelay;
5
6 [Attribute(defvalue: "0", desc: "Max value of additional time in ms, which is going to be randomized when scheduling next particle playback", params: "0 inf", category: "Loop")]
8
9 [Attribute(desc: "Configuration of the audio, which will be played when particles are triggered", category: "Sound")]
10 protected ref SCR_AudioSourceConfiguration m_AudioSourceConfiguration;
11
12 //------------------------------------------------------------------------------------------------
14 {
15 return m_iLoopDelay;
16 }
17
18 //------------------------------------------------------------------------------------------------
23
24 //------------------------------------------------------------------------------------------------
25 SCR_AudioSourceConfiguration GetAudioSourceConfiguration()
26 {
28 }
29}
30
31class SCR_RepeatingParticleEffectEntity: ParticleEffectEntity
32{
33 //------------------------------------------------------------------------------------------------
34 protected void LoopPlayback()
35 {
37 Stop();
38
40
43 SCR_AudioSourceConfiguration audioConfig = data.GetAudioSourceConfiguration();
44 if (audioConfig)
45 SCR_SoundManagerModule.CreateAndPlayAudioSource(this, audioConfig);
46
47 int delay = data.GetLoopDelay();
48 if (delay <= 0)
49 return;
50
51 int additionalDelay = data.GetRandomDelayVariation();
52 if (additionalDelay > 0)
53 additionalDelay = Math.RandomInt(0, additionalDelay);
54
55 GetGame().GetCallqueue().CallLater(LoopPlayback, delay + additionalDelay);
56 }
58 //------------------------------------------------------------------------------------------------
59 override protected void EOnInit(IEntity owner)
60 {
62 }
63
64 //------------------------------------------------------------------------------------------------
65 protected void ParticleEffectEntity(IEntitySource src, IEntity parent)
66 {
67 SetEventMask(EntityEvent.INIT);
68 }
69}
ArmaReforgerScripted GetGame()
Definition game.c:1398
Get all prefabs that have the spawner data
void ParticleEffectEntity(IEntitySource src, IEntity parent)
SCR_RepeatingParticleEffectEntityClass ParticleEffectEntityClass LoopPlayback()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
SCR_VehicleDamageManagerComponentClass GetPrefabData()
Definition Math.c:13
ref SCR_AudioSourceConfiguration m_AudioSourceConfiguration
override void EOnInit(IEntity owner)
void Stop()
Stop tracking time in this menu, prepare for sending data.
bool Play()
Start playing the animation. Call 'Prepare' first if you need to change the setup of a component!
SCR_FieldOfViewSettings Attribute
EntityEvent
Various entity events.
Definition EntityEvent.c:14
proto external EParticleEffectState GetState()
EParticleEffectState