DayZ
1.24
Loading...
Searching...
No Matches
DynamicArea_Flare.c
Go to the documentation of this file.
1
// The dummy entity which is spawned in the announcement process of Dynamic Contaminated Areas
2
class
DynamicArea_Flare
:
ScriptedEntity
3
{
4
const
float
FALL_SPEED
= 0.5;
// The speed at which this object falls ( units per second )
5
const
float
LIFETIME
= 40000;
// How long this entity will stay in world
6
private
Particle
m_Particle
;
7
void
DynamicArea_Flare
()
8
{
9
SetEventMask(
EntityEvent
.FRAME);
10
SetFlags
(
EntityFlags
.ACTIVE,
false
);
11
12
// We create the particle effect
13
m_Particle
=
ParticleManager
.GetInstance().PlayOnObject(
ParticleList
.
FLAREPROJ_ACTIVATE_RED
,
this
);
14
15
// We specify we will delete this object after set time
16
GetGame
().GetCallQueue(
CALL_CATEGORY_SYSTEM
).CallLater(
GetGame
().ObjectDeleteOnClient,
LIFETIME
,
false
,
this
);
17
}
18
19
// We slowly fall
20
override
void
EOnFrame
(
IEntity
other
,
float
timeSlice
)
21
{
22
vector
newPos
=
GetPosition
();
23
newPos
[1] =
newPos
[1] - (
FALL_SPEED
*
timeSlice
);
24
SetPosition
(
newPos
);
25
}
26
27
// We delete the entity and stop the particles
28
override
void
EEDelete
(
EntityAI
parent)
29
{
30
if
(
m_Particle
)
31
m_Particle
.
Stop
();
32
}
33
}
ParticleManager
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Definition
ParticleManager.c:84
GetPosition
class JsonUndergroundAreaTriggerData GetPosition
Definition
UndergroundAreaLoader.c:9
DynamicArea_Flare
Definition
DynamicArea_Flare.c:3
DynamicArea_Flare::EEDelete
override void EEDelete(EntityAI parent)
Definition
DynamicArea_Flare.c:28
DynamicArea_Flare::LIFETIME
const float LIFETIME
Definition
DynamicArea_Flare.c:5
DynamicArea_Flare::FALL_SPEED
const float FALL_SPEED
Definition
DynamicArea_Flare.c:4
DynamicArea_Flare::DynamicArea_Flare
void DynamicArea_Flare()
Definition
DynamicArea_Flare.c:7
DynamicArea_Flare::EOnFrame
override void EOnFrame(IEntity other, float timeSlice)
Definition
DynamicArea_Flare.c:20
DynamicArea_Flare::m_Particle
Particle m_Particle
Definition
DynamicArea_Flare.c:6
EntityAI
Definition
Building.c:6
IEntity
Definition
EnEntity.c:164
Param3
Definition
EntityAI.c:95
Particle
Legacy way of using particles in the game.
Definition
Particle.c:7
Particle::Stop
void Stop()
Legacy function for backwards compatibility with 1.14 and below.
Definition
Particle.c:262
ParticleList
Definition
ParticleList.c:12
ParticleList::FLAREPROJ_ACTIVATE_RED
static const int FLAREPROJ_ACTIVATE_RED
Definition
ParticleList.c:90
ScriptedEntity
Definition
TriggerCarrierBase.c:2
vector
Definition
EnConvert.c:106
GetGame
proto native CGame GetGame()
SetPosition
proto native void SetPosition(vector position)
Set the world position of the Effect.
Definition
Effect.c:420
SetFlags
proto native void SetFlags(ShapeFlags flags)
EntityEvent
EntityEvent
Entity events for event-mask, or throwing event from code.
Definition
EnEntity.c:44
EntityFlags
EntityFlags
Entity flags.
Definition
EnEntity.c:114
CALL_CATEGORY_SYSTEM
const int CALL_CATEGORY_SYSTEM
Definition
tools.c:8
scripts
4_World
Classes
ContaminatedArea
DynamicArea_Flare.c
Generated by
1.10.0