DayZ 1.24
Loading...
Searching...
No Matches
SpookyArea.c
Go to the documentation of this file.
1// The base area for Spooky land, spooky particles and spooky triggers for a spooky halloween
3{
4 // ----------------------------------------------
5 // INITIAL SETUP
6 // ----------------------------------------------
7 override void EEInit()
8 {
9 // We make sure we have the particle array
10 if (!m_ToxicClouds)
12
13 SetSynchDirty();
14
15#ifdef DEVELOPER
16 // Debugs when placing entity by hand using internal tools
17 if (GetGame().IsServer() && !GetGame().IsMultiplayer())
18 {
19 Debug.Log("YOU CAN IGNORE THE FOLLOWING DUMP");
20 InitZone();
21 Debug.Log("YOU CAN USE FOLLOWING DATA PROPERLY");
22 }
23#endif
24
25 if (GetGame().IsClient() && GetGame().IsMultiplayer())
26 InitZone();
27
28 super.EEInit();
29 }
30
31 override void InitZoneServer()
32 {
33 super.InitZoneServer();
34
35 // We create the trigger on server
36 if (m_TriggerType != "")
38 }
39
40 override void InitZoneClient()
41 {
42 super.InitZoneClient();
43
44 // We spawn VFX on client
46 }
47}
48
50{
52 {
53 super.OnPlayerEnterServer(player, trigger);
54
55 EntityAI spookyEntity = EntityAI.Cast(GetGame().CreateObjectEx("SpookyPlayerStalker", "0 0 0", ECE_SETUP));
56 int boneIdx = player.GetBoneIndexByName("Head");
57 player.AddChild(spookyEntity, boneIdx, true);
58 }
59
61 {
62 super.OnPlayerExitServer(player, trigger);
63
65 MiscGameplayFunctions.RemoveAllAttachedChildrenByTypename(player, types);
66 }
67}
const int ECE_SETUP
override void OnPlayerEnterServer(PlayerBase player, EffectTrigger trigger)
override void OnPlayerExitServer(PlayerBase player, EffectTrigger trigger)
void CreateTrigger()
Definition TrapBase.c:468
Definition Debug.c:14
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
Definition Debug.c:133
ref array< Particle > m_ToxicClouds
Definition EffectArea.c:72
vector m_Position
Definition EffectArea.c:41
bool m_OuterRingToggle
Definition EffectArea.c:53
string m_TriggerType
Definition EffectArea.c:69
int m_InnerRings
Definition EffectArea.c:50
float m_Radius
Definition EffectArea.c:44
int m_OuterRingOffset
Definition EffectArea.c:54
int m_InnerSpacing
Definition EffectArea.c:51
void InitZone()
Definition EffectArea.c:168
int m_ParticleID
Definition EffectArea.c:61
void PlaceParticles(vector pos, float radius, int nbRings, int innerSpacing, bool outerToggle, int outerSpacing, int outerOffset, int partId)
Definition EffectArea.c:218
int m_OuterSpacing
Definition EffectArea.c:55
override void InitZoneClient()
Definition SpookyArea.c:40
override void EEInit()
Definition SpookyArea.c:7
override void InitZoneServer()
Definition SpookyArea.c:31
this entity gets attached to each player while present in the spooky area
proto native CGame GetGame()