Dayz Explorer 1.29.162510
Loading...
Searching...
No Matches
particletest.c
Go to the documentation of this file.
1// Particle test for Maxman
2
3class ParticleTest extends ItemBase
4{
5 protected int PARTICLE_PATH;
7
8 // Constructor
10 {
11 if ( !g_Game.IsServer() || !g_Game.IsMultiplayer() ) // Client side
12 {
13 string path = ParticleList.GetPathToParticles();
14
15
16
17
18
19 // Enter particle ID to play when ParticleTest spawns
20 PARTICLE_PATH = ParticleList.DEBUG_DOT;
21
22 // Alternatively, uncomment the second line and enter particle filename without *.ptc suffix instead. Example: "menu_engine_fire"
23 string particle_filename = "menu_engine_fire";
24 //PARTICLE_PATH = ParticleList.GetParticleID( path + particle_filename );
25
26
27
28
29
30 m_Particle = ParticleManager.GetInstance().PlayOnObject( PARTICLE_PATH, this, GetPosition());
31 }
32 }
33
34 // Destructor
35 override void EEDelete(EntityAI parent)
36 {
37 super.EEDelete(parent);
38
39 if (m_Particle && g_Game) // g_Game is null when the game is being shut down
40 {
41 m_Particle.Stop();
42 g_Game.ObjectDelete(m_Particle);
43 }
44 }
45}
override void EEDelete(EntityAI parent)
void ParticleTest()
Definition particletest.c:9
Particle m_Particle
Definition particletest.c:6
int PARTICLE_PATH
Definition particletest.c:5
Legacy way of using particles in the game.
Definition particle.c:7
DayZGame g_Game
Definition dayzgame.c:3942
vector GetPosition()
Get the world position of the Effect.
Definition effect.c:473
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor).