DayZ 1.24
Loading...
Searching...
No Matches
CrashBase Class Reference
Collaboration diagram for CrashBase:
[legend]

Private Member Functions

void Wreck_Mi8_Crashed ()
 
void Wreck_SantasSleigh ()
 
override string GetSoundSet ()
 
override void EEOnCECreate ()
 
override void EEDelete (EntityAI parent)
 
void SpawnRandomDeerLater ()
 
void SpawnRandomDeers ()
 
vector RandomizePosition (vector origin)
 
void Wreck_UH1Y ()
 

Private Attributes

XmasSleighLight m_SleighLight
 
int m_MaxDeersAmount = 4
 
int m_MinDeersAmount = 2
 
int m_MaxDeersSpawnRange = 25
 
int m_MinDeersSpawnRange = 5
 

Detailed Description

Definition at line 2 of file Wreck_MI8.c.

Member Function Documentation

◆ EEDelete()

override void CrashBase::EEDelete ( EntityAI parent)
inlineprivate

Definition at line 36 of file Wreck_SantasSleigh.c.

37 {
38 super.EEDelete(parent);
39
40 if (!GetGame().IsDedicatedServer())
41 {
42 if (m_SleighLight)
43 m_SleighLight.Destroy();
44 }
45 }
XmasSleighLight m_SleighLight
proto native CGame GetGame()

References GetGame().

◆ EEOnCECreate()

override void CrashBase::EEOnCECreate ( )
inlineprivate

Definition at line 30 of file Wreck_SantasSleigh.c.

31 {
32 super.EEOnCECreate();
34 }
void SpawnRandomDeerLater()

References SpawnRandomDeerLater().

◆ GetSoundSet()

override string CrashBase::GetSoundSet ( )
inlineprivate

Definition at line 25 of file Wreck_SantasSleigh.c.

26 {
27 return "SledgeCrash_Distant_SoundSet";
28 }

Referenced by House::EEInit(), and House::RequestSoundEvent().

◆ RandomizePosition()

vector CrashBase::RandomizePosition ( vector origin)
inlineprivate

Definition at line 72 of file Wreck_SantasSleigh.c.

73 {
74 int randX;
75 int randZ;
76
78 if (Math.RandomIntInclusive(0, 1) < 1)
79 randX = -randX;
80
82 if (Math.RandomIntInclusive(0, 1) < 1)
83 randZ = -randZ;
84
85 origin[0] = origin[0] + randX;
86 origin[2] = origin[2] + randZ;
87
88 return origin;
89
90 }
Definition EnMath.c:7
static int RandomIntInclusive(int min, int max)
Returns a random int number between and min [inclusive] and max [inclusive].
Definition EnMath.c:54

References Math::RandomIntInclusive().

◆ SpawnRandomDeerLater()

void CrashBase::SpawnRandomDeerLater ( )
inlineprivate

Definition at line 47 of file Wreck_SantasSleigh.c.

48 {
49 //SpawnRandomDeers();
50 GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(SpawnRandomDeers, 0);
51 }
void SpawnRandomDeers()
const int CALL_CATEGORY_GAMEPLAY
Definition tools.c:10

References CALL_CATEGORY_GAMEPLAY, and GetGame().

Referenced by EEOnCECreate().

◆ SpawnRandomDeers()

void CrashBase::SpawnRandomDeers ( )
inlineprivate

Definition at line 54 of file Wreck_SantasSleigh.c.

55 {
58
60
61 for (int i = 0; i < m_MaxDeersAmount; i++)
62 {
64 deer = EntityAI.Cast(GetGame().CreateObject("Animal_CervusElaphus", deer_pos, false, true));
65 deer.SetHealth01("", "", 0);
66 vector orientation = deer.GetOrientation();
67 deer.SetOrientation(Vector(Math.RandomIntInclusive(0, 360), orientation[1], orientation[2]));
68 }
69 }
void RandomizePosition()
class JsonUndergroundAreaTriggerData GetPosition
proto native vector Vector(float x, float y, float z)
Vector constructor from components.

References GetGame(), GetPosition, m_MaxDeersAmount, Math::RandomIntInclusive(), RandomizePosition(), and Vector().

◆ Wreck_Mi8_Crashed()

void CrashBase::Wreck_Mi8_Crashed ( )
inlineprivate

Definition at line 4 of file Wreck_MI8.c.

5 {
6 if (!GetGame().IsDedicatedServer())
7 m_ParticleEfx = ParticleManager.GetInstance().PlayOnObject(ParticleList.SMOKING_HELI_WRECK, this, Vector(2, 0, -5));
8 }
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
static const int SMOKING_HELI_WRECK

References GetGame(), ParticleManager(), ParticleList::SMOKING_HELI_WRECK, and Vector().

◆ Wreck_SantasSleigh()

void CrashBase::Wreck_SantasSleigh ( )
inlineprivate

Definition at line 11 of file Wreck_SantasSleigh.c.

12 {
13 if (!GetGame().IsDedicatedServer())
14 {
15 //particles - Aurora trail
16 m_ParticleEfx = ParticleManager.GetInstance().PlayOnObject(ParticleList.AURORA_SANTA_WRECK, this, Vector(0, 0, 0));
17
18 //lights - green light
19 m_SleighLight = XmasSleighLight.Cast(ScriptedLightBase.CreateLight(XmasSleighLight, Vector(0, 0, 0)));
20 m_SleighLight.AttachOnMemoryPoint(this, "light");
21 }
22 }
static const int AURORA_SANTA_WRECK

References ParticleList::AURORA_SANTA_WRECK, GetGame(), ParticleManager(), and Vector().

◆ Wreck_UH1Y()

void CrashBase::Wreck_UH1Y ( )
inlineprivate

Definition at line 3 of file Wreck_UH1Y.c.

4 {
5 if (!GetGame().IsDedicatedServer())
6 m_ParticleEfx = ParticleManager.GetInstance().PlayOnObject(ParticleList.SMOKING_HELI_WRECK, this, Vector(-0.5, 0, -1.0));
7 }

References GetGame(), ParticleManager(), ParticleList::SMOKING_HELI_WRECK, and Vector().

Member Data Documentation

◆ m_MaxDeersAmount

int CrashBase::m_MaxDeersAmount = 4
private

Definition at line 6 of file Wreck_SantasSleigh.c.

Referenced by SpawnRandomDeers().

◆ m_MaxDeersSpawnRange

int CrashBase::m_MaxDeersSpawnRange = 25
private

Definition at line 8 of file Wreck_SantasSleigh.c.

◆ m_MinDeersAmount

int CrashBase::m_MinDeersAmount = 2
private

Definition at line 7 of file Wreck_SantasSleigh.c.

◆ m_MinDeersSpawnRange

int CrashBase::m_MinDeersSpawnRange = 5
private

Definition at line 9 of file Wreck_SantasSleigh.c.

◆ m_SleighLight

XmasSleighLight CrashBase::m_SleighLight
private

Definition at line 4 of file Wreck_SantasSleigh.c.


The documentation for this class was generated from the following files: