4 XmasSleighLight m_SleighLight;
6 int m_MaxDeersAmount = 4;
7 int m_MinDeersAmount = 2;
8 int m_MaxDeersSpawnRange = 25;
9 int m_MinDeersSpawnRange = 5;
11 void Wreck_SantasSleigh()
13 if (!
g_Game.IsDedicatedServer())
16 m_ParticleEfx =
ParticleManager.GetInstance().PlayOnObject(ParticleList.AURORA_SANTA_WRECK,
this,vector.Zero,vector.Zero,
true);
19 m_SleighLight = XmasSleighLight.Cast(ScriptedLightBase.CreateLight(XmasSleighLight,vector.Zero));
20 m_SleighLight.AttachOnMemoryPoint(
this,
"light");
25 override string GetSoundSet()
27 return "SledgeCrash_Distant_SoundSet";
33 SpawnRandomDeerLater();
38 super.EEDelete(parent);
40 if ( !
g_Game.IsDedicatedServer() )
43 m_SleighLight.Destroy();
47 void SpawnRandomDeerLater()
54 void SpawnRandomDeers()
59 int deersAmount = Math.RandomIntInclusive(m_MinDeersAmount,m_MaxDeersAmount);
61 for (
int i = 0; i < m_MaxDeersAmount; i++)
64 deer =
EntityAI.Cast(
g_Game.CreateObject(
"Animal_RangiferTarandus", 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]));
72 deer =
EntityAI.Cast(
g_Game.CreateObject(
"Animal_RangiferTarandus_Xmas", deer_pos,
false,
true));
73 deer.SetHealth01(
"",
"", 0);
74 vector redorientation = deer.GetOrientation();
75 deer.SetOrientation(
Vector(Math.RandomIntInclusive(0,360),redorientation[1],redorientation[2]));
85 randX = Math.RandomIntInclusive(m_MinDeersSpawnRange, m_MaxDeersSpawnRange);
86 if (Math.RandomIntInclusive(0,1) < 1)
89 randZ = Math.RandomIntInclusive(m_MinDeersSpawnRange, m_MaxDeersSpawnRange);
90 if (Math.RandomIntInclusive(0,1) < 1)
93 origin[0] = origin[0] + randX;
94 origin[2] = origin[2] + randZ;
override void EEDelete(EntityAI parent)
override void EEOnCECreate()
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
vector GetPosition()
Get the world position of the Effect.
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor).