DayZ 1.24
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 (!GetGame().IsServer() || !GetGame().IsMultiplayer()) // Client side
12 {
14
15
16 // Enter particle ID to play when ParticleTest spawns
17 PARTICLE_PATH = ParticleList.DEBUG_DOT;
18
19 // Alternatively, uncomment the second line and enter particle filename without *.ptc suffix instead. Example: "menu_engine_fire"
20 string particle_filename = "menu_engine_fire";
21 //PARTICLE_PATH = ParticleList.GetParticleID( path + particle_filename );
22
23
24 m_Particle = ParticleManager.GetInstance().PlayOnObject(PARTICLE_PATH, this, GetPosition());
25 }
26 }
27
28 // Destructor
29 override void EEDelete(EntityAI parent)
30 {
31 super.EEDelete(parent);
32
33 if (m_Particle && GetGame()) // GetGame() is null when the game is being shut down
34 {
35 m_Particle.Stop();
36 GetGame().ObjectDelete(m_Particle);
37 }
38 }
39}
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
class JsonUndergroundAreaTriggerData GetPosition
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
void Stop()
Legacy function for backwards compatibility with 1.14 and below.
Definition Particle.c:262
static string GetPathToParticles()
Returns base path to all particles.
static const int DEBUG_DOT
proto native CGame GetGame()