Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
exhaustsmoke.c
Go to the documentation of this file.
1
class
EffExhaustSmoke
:
EffVehicleSmoke
2
{
3
override
void
SetParticleStateLight
()
4
{
5
SetParticleState
(
ParticleList
.
HATCHBACK_EXHAUST_SMOKE
);
6
7
Car
parent =
Car
.Cast(
GetAttachmentParent
() );
8
Particle
p =
GetParticle
();
9
10
if
( parent && p )
11
{
12
float
speed = parent.GetSpeedometerAbsolute();
13
float
lifetime_scale;
14
15
if
(speed < 100)
16
lifetime_scale = (100 - speed) / 100;
17
else
18
lifetime_scale = 0.1;
19
20
float
birthrate_scale = 1 + (speed * 0.1 );
21
22
p.
ScaleParticleParamFromOriginal
(
EmitorParam
.LIFETIME, lifetime_scale );
23
p.
ScaleParticleParamFromOriginal
(
EmitorParam
.LIFETIME_RND, lifetime_scale );
24
p.
ScaleParticleParamFromOriginal
(
EmitorParam
.BIRTH_RATE, birthrate_scale );
25
p.
ScaleParticleParamFromOriginal
(
EmitorParam
.BIRTH_RATE_RND, birthrate_scale );
26
}
27
}
28
}
Car
Base script class for cars.
Definition
carscript.c:171
EffExhaustSmoke
Definition
exhaustsmoke.c:2
EffExhaustSmoke::SetParticleStateLight
override void SetParticleStateLight()
Definition
exhaustsmoke.c:3
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::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_EXHAUST_SMOKE
static const int HATCHBACK_EXHAUST_SMOKE
Definition
particlelist.c:284
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
exhaustsmoke.c
Generated by
1.17.0