Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
coolantsteam.c
Go to the documentation of this file.
1
class
EffCoolantSteam
:
EffVehicleSmoke
2
{
3
override
void
SetParticleStateLight
()
4
{
5
SetParticleState
(
ParticleList
.
HATCHBACK_COOLANT_OVERHEATING
);
6
UpdateParticle
();
7
}
8
9
override
void
SetParticleStateHeavy
()
10
{
11
SetParticleState
(
ParticleList
.
HATCHBACK_COOLANT_OVERHEATED
);
12
UpdateParticle
();
13
}
14
15
void
UpdateParticle
()
16
{
17
Car
parent =
Car
.Cast(
GetAttachmentParent
() );
18
Particle
p =
GetParticle
();
19
20
if
(parent && p)
21
{
22
float
speed = parent.GetSpeedometerAbsolute();
23
24
float
lifetime_scale = (100 - speed) / 100;
25
if
(lifetime_scale < 0.1)
26
lifetime_scale = 0.1;
27
28
float
birthrate_scale = 1 + (speed * 0.02 );
29
30
float
speed_scale = 1 + (speed * 0.2 );
31
if
(speed_scale > 10)
32
speed_scale = 10;
33
34
float
size_scale = 1 + (speed * 0.05 );
35
36
if
(size_scale > 2.5)
37
size_scale = 2.5;
38
39
float
gravity_add = speed * 0.005 ;
40
41
p.
ScaleParticleParamFromOriginal
(
EmitorParam
.LIFETIME, lifetime_scale );
42
p.
ScaleParticleParamFromOriginal
(
EmitorParam
.LIFETIME_RND, lifetime_scale );
43
p.
ScaleParticleParamFromOriginal
(
EmitorParam
.BIRTH_RATE, birthrate_scale );
44
p.
ScaleParticleParamFromOriginal
(
EmitorParam
.BIRTH_RATE_RND, birthrate_scale );
45
p.
ScaleParticleParamFromOriginal
(
EmitorParam
.VELOCITY, speed_scale );
46
p.
ScaleParticleParamFromOriginal
(
EmitorParam
.VELOCITY_RND, speed_scale );
47
p.
ScaleParticleParamFromOriginal
(
EmitorParam
.SIZE, size_scale );
48
p.
SetParticleParam
(
EmitorParam
.GRAVITY_SCALE, gravity_add );
49
}
50
}
51
}
Car
Base script class for cars.
Definition
carscript.c:171
EffCoolantSteam
Definition
coolantsteam.c:2
EffCoolantSteam::SetParticleStateHeavy
override void SetParticleStateHeavy()
Definition
coolantsteam.c:9
EffCoolantSteam::SetParticleStateLight
override void SetParticleStateLight()
Definition
coolantsteam.c:3
EffCoolantSteam::UpdateParticle
void UpdateParticle()
Definition
coolantsteam.c:15
EffVehicleSmoke::SetParticleState
void SetParticleState(int state)
Definition
vehiclesmoke.c:20
EffVehicleSmoke::EffVehicleSmoke
void EffVehicleSmoke()
Definition
vehiclesmoke.c:3
EffectParticle::GetParticle
Particle GetParticle()
Gets the main particle which this Effect is managing.
Definition
effectparticle.c:162
Particle
Legacy way of using particles in the game.
Definition
particle.c:7
Particle::SetParticleParam
void SetParticleParam(int parameter_id, float value)
Set the value of a parameter of all emitors in the particle.
Definition
particle.c:611
Particle::ScaleParticleParamFromOriginal
void ScaleParticleParamFromOriginal(int parameter_id, float coef)
Scales the given parameter on all emitors relatively to their ORIGINAL value.
Definition
particle.c:678
ParticleList
Definition
particlelist.c:12
ParticleList::HATCHBACK_COOLANT_OVERHEATED
static const int HATCHBACK_COOLANT_OVERHEATED
Definition
particlelist.c:281
ParticleList::HATCHBACK_COOLANT_OVERHEATING
static const int HATCHBACK_COOLANT_OVERHEATING
Definition
particlelist.c:280
GetAttachmentParent
Object GetAttachmentParent()
Get the parent set by SetAttachmentParent.
Definition
effect.c:599
EmitorParam
EmitorParam
Definition
envisual.c:114
Games
Dayz
scripts
3_game
effects
effectparticle
vehiclesmoke
coolantsteam.c
Generated by
1.17.0