Dayz Explorer
1.29.162510
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
g_Game
.GetCallQueue(
CALL_CATEGORY_SYSTEM
).CallLater(
g_Game
.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
}
EntityAI
Definition
inventoryitem.c:2
IEntity
Definition
enentity.c:165
Particle
Legacy way of using particles in the game.
Definition
particle.c:7
ParticleList
Definition
particlelist.c:12
ScriptedEntity
Definition
scriptedentity.c:13
vector
Definition
enconvert.c:119
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
SetPosition
proto native void SetPosition(vector position)
Set the world position of the Effect.
Definition
effect.c:463
SetFlags
proto native void SetFlags(ShapeFlags flags)
EntityEvent
EntityEvent
Entity events for event-mask, or throwing event from code.
Definition
enentity.c:45
EntityFlags
EntityFlags
Entity flags.
Definition
enentity.c:115
GetPosition
vector GetPosition()
Get the world position of the Effect.
Definition
effect.c:473
CALL_CATEGORY_SYSTEM
const int CALL_CATEGORY_SYSTEM
Definition
tools.c:8
ParticleManager
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor).
Definition
particlemanager.c:88
Daten
4_world
classes
contaminatedarea
dynamicarea_flare.c
Generated by
1.16.1