Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
wheelsmoke.c
Go to the documentation of this file.
2{
3 const float WHEEL_SMOKE_THRESHOLD = 5.0;
4
6 {
7 }
8
9 void SetSurface(string surface)
10 {
11 int particleID = Surface.GetWheelParticleID(surface);
12
13 if (m_ParticleID != particleID)
14 {
15 if (particleID != 0)
16 {
17 SetParticleState(particleID);
18 }
19 else
20 {
21 Stop();
22 }
23 }
24 }
25
26 void SetParticleState( int state )
27 {
28 bool was_playing = IsPlaying();
29
30 Stop();
31
32 SetParticleID(state);
33
34 if (was_playing)
35 {
36 Start(); // resume effect
37 }
38 }
39}
const float WHEEL_SMOKE_THRESHOLD
Definition wheelsmoke.c:3
void SetParticleState(int state)
Definition wheelsmoke.c:26
void SetSurface(string surface)
Definition wheelsmoke.c:9
void EffWheelSmoke()
Definition wheelsmoke.c:5
void SetParticleID(int id)
Sets the id of the particle to be used.
void EffectParticle()
ctor
int m_ParticleID
The ID in the ParticleList to create Particle from.
override void Start()
Plays all elements this effect consists of.
override void Stop()
Stops all elements this effect consists of.
static int GetWheelParticleID(string surface_name)
Definition surface.c:8
bool IsPlaying()
Returns true when the Effect is playing, false otherwise.
Definition effect.c:197