Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
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 )
11  m_ToxicClouds = new array<Particle>;
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
45  PlaceParticles( GetWorldPosition(), m_Radius, m_InnerRings, m_InnerSpacing, m_OuterRingToggle, m_OuterSpacing, m_OuterRingOffset, m_ParticleID );
46  }
47 }
48 
49 class SpookyArea23 : SpookyArea
50 {
51  override void OnPlayerEnterServer(PlayerBase player, EffectTrigger trigger)
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 
60  override void OnPlayerExitServer(PlayerBase player, EffectTrigger trigger)
61  {
62  super.OnPlayerExitServer(player, trigger);
63 
65  MiscGameplayFunctions.RemoveAllAttachedChildrenByTypename(player,types);
66  }
67 }
GetGame
proto native CGame GetGame()
OnPlayerExitServer
override void OnPlayerExitServer(PlayerBase player, EffectTrigger trigger)
Definition: spookyarea.c:60
SpookyArea
Definition: spookyarea.c:2
m_Position
protected vector m_Position
Cached world position.
Definition: effect.c:41
OnPlayerEnterServer
SpookyArea EffectArea OnPlayerEnterServer(PlayerBase player, EffectTrigger trigger)
Definition: spookyarea.c:51
m_Radius
float m_Radius
Definition: aigroupbehaviour.c:10
EffectArea
Definition: effectarea.c:36
PlayerBase
Definition: playerbaseclient.c:1
CreateTrigger
override void CreateTrigger()
Definition: trap_tripwire.c:70
array< Particle >
SpookyPlayerStalker
this entity gets attached to each player while present in the spooky area
Definition: spookyareamisc.c:324
Debug
Definition: debug.c:13
ECE_SETUP
const int ECE_SETUP
Definition: centraleconomy.c:9
EffectTrigger
Definition: contaminatedtrigger.c:2
EntityAI
Definition: building.c:5