Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
destructioneffects.c
Go to the documentation of this file.
1/*
2class TestDestructionEffect : DestructionEffectBase
3{
4 ref AreaDamageManager m_AreaManager;
5 override void Init()
6 {
7 m_EntityIsTakeable = true;
8
9 m_ParticlePersistent = ParticleList.GRENADE_M18_GREEN_LOOP;
10 m_ParticleOneTime = ParticleList.GRENADE_M84;
11
12 m_SoundSetOneTime = "AlarmClock_Destroyed_SoundSet";
13 m_SoundSetPersistent= "KitchenTimer_Ticking_Loop_SoundSet";
14
15 m_ReplaceWithEntity = "";
16 m_KeepHealthOnReplace = true;
17 m_ReplaceDelay = 1000;
18
19 m_HasExplosionDamage = true;
20 m_AmmoType = "";
21 m_DamageType = 0;
22 }
23
24 override void OnEntityDestroyedOneTimeClient(EntityAI entity, int oldLevel, string zone)
25 {
26 }
27
28 override void OnEntityDestroyedOneTimeServer(EntityAI entity, int oldLevel, string zone)
29 {
30 }
31
32 override void OnEntityDestroyedPersistentClient(EntityAI entity, string zone)
33 {
34 }
35
36 override void OnEntityDestroyedPersistentServer(EntityAI entity, string zone)
37 {
38 AreaDamageLoopedDeferred_NoVehicle area_damage = new AreaDamageLoopedDeferred_NoVehicle( m_Entity );
39 area_damage.SetDamageComponentType(AreaDamageComponentTypes.HITZONE);
40
41 vector min, max;
42 m_Entity.GetBounds(min, max);
43 vector center = m_Entity.GetPosition();
44
45 vector orientation = m_Entity.GetOrientation();
46
47 area_damage.SetExtents( "-1 -1 -1", "1 1 1" );
48 area_damage.SetAreaPosition( center );
49 area_damage.SetAreaOrientation( orientation );
50 area_damage.SetLoopInterval( 1.0 );
51 area_damage.SetDeferDuration( 0.2 );
52 area_damage.SetHitZones( { "Torso","LeftHand","LeftLeg","LeftFoot","RightHand","RightLeg","RightFoot" } );
53 area_damage.SetAmmoName( "BarbedWireHit" );
54 area_damage.Spawn();
55
56 m_AreaManager = area_damage;
57
58 }
59}
60
61//--------------------------------------------------------------------
62
63
64
65class TestDestructionEffect2 : DestructionEffectBase
66{
67 override void Init()
68 {
69 m_EntityIsTakeable = false;
70
71
72 m_ParticlePersistent = ParticleList.GRENADE_M18_GREEN_LOOP;
73 m_ParticleOneTime = ParticleList.GRENADE_M84;
74
75 m_SoundSetOneTime = "AlarmClock_Destroyed_SoundSet";
76 m_SoundSetPersistent= "KitchenTimer_Ticking_Loop_SoundSet";
77
78 m_ReplaceWithEntity = "";
79 m_KeepHealthOnReplace = true;
80 m_ReplaceDelay = 1000;
81
82 m_HasExplosionDamage = true;
83 m_AmmoType = "LandFuelFeed_Ammo";
84 m_DamageType = DamageType.EXPLOSION;
85 }
86
87
88 override void OnEntityDestroyedOneTimeClient(EntityAI entity, int oldLevel, string zone)
89 {
90 }
91
92 override void OnEntityDestroyedOneTimeServer(EntityAI entity, int oldLevel, string zone)
93 {
94 }
95
96 override void OnEntityDestroyedPersistentClient(EntityAI entity, string zone)
97 {
98 }
99
100 override void OnEntityDestroyedPersistentServer(EntityAI entity, string zone)
101 {
102 }
103
104 override void OnExplosionEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
105 {
106 if ( !GetGame().IsDedicatedServer() )
107 {
108 vector n = surfNormal.VectorToAngles() + "0 90 0";
109 Particle p1 = ParticleManager.GetInstance().PlayInWorld(ParticleList.SMOKE_GENERIC_WRECK, pos);
110 p1.SetOrientation(n);
111
112 Particle p2 = ParticleManager.GetInstance().PlayInWorld(ParticleList.EXPLOSION_LANDMINE, pos);
113 p2.SetOrientation(n);
114
115 Particle p3 = ParticleManager.GetInstance().PlayInWorld(ParticleList.IMPACT_METAL_RICOCHET, pos);
116 p3.SetOrientation(n);
117
118 Particle p4 = ParticleManager.GetInstance().PlayInWorld(ParticleList.IMPACT_GRAVEL_RICOCHET, pos);
119 p4.SetOrientation(n);
120 }
121 }
122}
123*/
125{
126 override void Init()
127 {
128 m_EntityIsTakeable = true;
129
130
131 m_ParticlePersistent = ParticleList.NONE;
132 m_ParticleOneTime = ParticleList.RGD5;
133
134 m_SoundSetOneTime = "";
135 m_SoundSetPersistent= "";
136
137 m_ReplaceWithEntity = "";
138 m_KeepHealthOnReplace = true;
139 m_ReplaceDelay = 1000;
140
141 m_HasExplosionDamage = true;
142 m_AmmoType = "GasCanister_Ammo";
143 m_DamageType = DamageType.EXPLOSION;
144 }
145
146
147 override void OnEntityDestroyedOneTimeClient(EntityAI entity, int oldLevel, string zone)
148 {
149 }
150
151 override void OnEntityDestroyedOneTimeServer(EntityAI entity, int oldLevel, string zone)
152 {
153 }
154
155 override void OnEntityDestroyedPersistentClient(EntityAI entity, string zone)
156 {
157 }
158
159 override void OnEntityDestroyedPersistentServer(EntityAI entity, string zone)
160 {
161 }
162
163 override void OnExplosionEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
164 {
165 }
166}
167
168class DestructionEffectMetalicMechanism : DestructionEffectBase
169{
170 override void Init()
171 {
172 m_EntityIsTakeable = true;
173
174
175 m_ParticlePersistent = ParticleList.NONE;
176 m_ParticleOneTime = ParticleList.NONE;
177
178 m_SoundSetOneTime = "AlarmClock_Destroyed_SoundSet";
179 m_SoundSetPersistent= "";
180
181 m_ReplaceWithEntity = "";
182 m_KeepHealthOnReplace = true;
183 m_ReplaceDelay = 1000;
184
185 m_HasExplosionDamage = false;
186 m_AmmoType = "";
187 m_DamageType = DamageType.EXPLOSION;
188 }
189
190
191 override void OnEntityDestroyedOneTimeClient(EntityAI entity, int oldLevel, string zone)
193 }
194
195 override void OnEntityDestroyedOneTimeServer(EntityAI entity, int oldLevel, string zone)
197 }
198
199 override void OnEntityDestroyedPersistentClient(EntityAI entity, string zone)
201 }
202
203 override void OnEntityDestroyedPersistentServer(EntityAI entity, string zone)
205 }
206
207 override void OnExplosionEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
209 }
210}
211
213{
214 override void Init()
215 {
216 m_EntityIsTakeable = false;
217
218 m_ParticlePersistent = ParticleList.NONE;
219 m_ParticleOneTime = ParticleList.EXPLOSION_GOAT;
220
221 m_SoundSetOneTime = "";
222 m_SoundSetPersistent= "";
223
224 m_ReplaceWithEntity = "";
225 m_KeepHealthOnReplace = false;
226 m_ReplaceDelay = 0;
227
228 m_HasExplosionDamage = false;
229 m_AmmoType = "";
230 m_DamageType = DamageType.EXPLOSION;
231 }
232
233
234 override void OnEntityDestroyedOneTimeClient(EntityAI entity, int oldLevel, string zone)
235 {
236 }
237
238 override void OnEntityDestroyedOneTimeServer(EntityAI entity, int oldLevel, string zone)
239 {
240 }
241
242 override void OnEntityDestroyedPersistentClient(EntityAI entity, string zone)
243 {
244 }
245
246 override void OnEntityDestroyedPersistentServer(EntityAI entity, string zone)
247 {
248 }
249
250 override void OnExplosionEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
251 {
252 }
253}
int m_DamageType
DamageType
exposed from C++ (do not change)
override Widget Init()
Definition dayzgame.c:127
override void OnExplosionEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
override void OnEntityDestroyedOneTimeClient(EntityAI entity, int oldLevel, string zone)
override void OnEntityDestroyedPersistentClient(EntityAI entity, string zone)
override void OnEntityDestroyedPersistentServer(EntityAI entity, string zone)
override void OnEntityDestroyedOneTimeServer(EntityAI entity, int oldLevel, string zone)
string m_AmmoType