Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
object.c
Go to the documentation of this file.
8
9class ObjectSnapCallback
10{
14
17
19
22
26 void OnSetup()
27 {
28 }
29
32 void OnDebug(vector p0, vector p1, bool hasHit, bool found)
33 {
34 }
35
41 {
42 return false;
43 }
44
49 bool OnQuery(Object other)
50 {
51 return true;
52 }
53
58 bool OnCollide(Object other)
59 {
60 return true;
61 }
62};
63
64class Object extends IEntity
65{
66 private void ~Object();
67 private void Object();
68
70 {
71 return false;
72 }
73
82 void Delete()
83 {
84 g_Game.GetCallQueue(CALL_CATEGORY_SYSTEM).Call(g_Game.ObjectDelete, this);
85 }
86
87 proto native void AddProxyPhysics(string proxySelectionName);
88
89 proto native void RemoveProxyPhysics(string proxySelectionName);
90
93
96
98 proto native bool GetLODS(notnull out array<LOD> lods);
99
101 proto native owned string GetLODName(LOD lod);
102
103 proto native vector GetBoundingCenter();
104
107 {
108 array<LOD> lods = new array<LOD>;
109 GetLODS( lods );
110
111 for ( int i = 0; i < lods.Count(); ++i )
112 {
113 string lod_name = GetLODName( lods.Get( i ) );
114 lod_name.ToLower();
115 name.ToLower();
116 if ( lod_name == name )
117 {
118 return lods.Get( i );
119 }
120 }
121
122 return NULL;
123 }
124
130
136
142
144 void Explode(int damageType, string ammoType = "")
145 {
146 if (ammoType == "")
147 ammoType = ConfigGetString("ammoType");
148
149 if (ammoType == "")
150 ammoType = "Dummy_Heavy";
151
152 if ( g_Game.IsServer() )
153 {
155 DamageSystem.ExplosionDamage(EntityAI.Cast(this), null, ammoType, GetPosition(), damageType);
156 }
157 }
158
160 {
161 if ( g_Game.IsDedicatedServer() ) // Multiplayer server
162 {
163 Param1<EntityAI> p = new Param1<EntityAI>(null);
164 g_Game.RPCSingleParam( this, ERPCs.RPC_EXPLODE_EVENT, p, true);
165 }
166 else if ( !g_Game.IsMultiplayer() ) // Singleplayer
167 {
169 }
170 }
171
174 {
175 string ammoType = ConfigGetString("ammoType");
176
177 if (ammoType == "")
178 ammoType = "Dummy_Heavy";
179
180 vector pos = GetPosition();
181
182 // Handle spawn of particle if one is configured in config
183 AmmoEffects.PlayAmmoParticle(ammoType, pos);
184
185 // Handle spawn of Effect if one is configured in config
186 AmmoEffects.PlayAmmoEffect(ammoType, pos);
187 }
188
189 void OnExplosionEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType) { }
190
192 proto native owned string GetActionComponentName(int componentIndex, string geometry = "");
193
195 proto native owned vector GetActionComponentPosition(int componentIndex, string geometry = "");
196
198 proto native owned int GetActionComponentNameList(int componentIndex, TStringArray nameList, string geometry = "");
199
201 proto native bool IsActionComponentPartOfSelection(int componentIndex, string selectionName, string geometry = "");
202
204 proto void GetActionComponentsForSelectionName(int level, string selectionName, TIntArray componentIndices);
205
207 proto vector GetActionComponentCenter(int level, int componentIndex);
208
210 proto vector GetActionComponentCenterOOB(int level, int componentIndex);
211
213 proto void GetActionComponentMinMax(int level, int componentIndex, out vector min, out vector max);
214
216 proto native bool ToDelete();
217
221 proto native bool IsPendingDeletion();
222
224 proto native int GetGeometryLevel();
225 proto native int GetFireGeometryLevel();
226 proto native int GetViewGeometryLevel();
227 proto native int GetMemoryLevel();
228
229#ifdef DEVELOPER
231 proto bool ToBonePivot(out int pivot, int level, int bone);
232 proto bool FromBonePivot(int pivot, out int level, out int bone);
233#endif
234
236 proto int GetBonePivot(int level, int component);
237
239 proto native void GetBonePivotsForAnimationSource(int level, string animationSource, out TIntArray pivots);
240
242 proto native vector GetBonePositionLS(int pivot);
243 proto native vector GetBonePositionMS(int pivot);
244 proto native vector GetBonePositionWS(int pivot);
245
247 proto native void GetBoneRotationLS(int pivot, out float quaternion[4]);
248 proto native void GetBoneRotationMS(int pivot, out float quaternion[4]);
249 proto native void GetBoneRotationWS(int pivot, out float quaternion[4]);
250
252 proto native void GetBoneTransformLS(int pivot, out vector transform[4]);
253 proto native void GetBoneTransformMS(int pivot, out vector transform[4]);
254 proto native void GetBoneTransformWS(int pivot, out vector transform[4]);
255
262 proto native void GetTightlyPackedCorners(ETransformationAxis axis, out vector corners[4]);
263
264#ifdef DIAG_DEVELOPER
265 void DebugDrawTightlyPackedCorners(ETransformationAxis axis, int color)
266 {
267#ifndef SERVER
268 vector points[2];
269 vector corners[4];
270
271 GetTightlyPackedCorners(axis, corners);
272
273 points[0] = corners[0];
274 points[1] = corners[1];
275 Shape.CreateLines(color, ShapeFlags.TRANSP | ShapeFlags.ONCE | ShapeFlags.NOOUTLINE | ShapeFlags.NOZBUFFER, points, 2);
276
277 points[0] = corners[1];
278 points[1] = corners[3];
279 Shape.CreateLines(color, ShapeFlags.TRANSP | ShapeFlags.ONCE | ShapeFlags.NOOUTLINE | ShapeFlags.NOZBUFFER, points, 2);
280
281 points[0] = corners[3];
282 points[1] = corners[2];
283 Shape.CreateLines(color, ShapeFlags.TRANSP | ShapeFlags.ONCE | ShapeFlags.NOOUTLINE | ShapeFlags.NOZBUFFER, points, 2);
284
285 points[0] = corners[2];
286 points[1] = corners[0];
287 Shape.CreateLines(color, ShapeFlags.TRANSP | ShapeFlags.ONCE | ShapeFlags.NOOUTLINE | ShapeFlags.NOZBUFFER, points, 2);
288#endif
289 }
290#endif
291
293 proto native vector GetPosition();
294
297 proto native vector GetWorldPosition();
298
300 proto native void SetPosition(vector vPos);
301
305 proto native void PlaceOnSurface();
306
311 proto native vector GetOrientation();
312
317 proto native void SetOrientation(vector vOrientation);
318
320 proto native vector GetDirection();
321
327 proto native void SetDirection(vector vPos);
328
330 proto native vector GetDirectionUp();
331
333 proto native vector GetDirectionAside();
334
336 proto native vector GetLocalPos(vector vPos);
338 proto native vector GetGlobalPos(vector vPos);
339
341 proto native vector GetSpeed();
342
344 proto native vector GetModelSpeed();
345
347 proto native bool CanAffectPathgraph();
348
350 proto native void SetAffectPathgraph(bool fromConfig, bool affect);
351
352
364 proto float ClippingInfo(out vector minMax[2]);
365
376 proto native bool GetCollisionBox(out vector minMax[2]);
377
382 proto native float GetCollisionRadius();
383
385 proto native float GetDamage();
386
387
388 proto native void GetSelectionList(out TStringArray selectionList);
389
392 {
393 vector position = GetPosition();
394 return g_Game.SurfaceGetNoiseMultiplier(NULL, position, -1);
395 }
396
399 {
400 string surface_type;
401 int liquid_type;
402
403 g_Game.SurfaceUnderObject(this, surface_type,liquid_type);
404// Print(surface_type);
405// Print(liquid_type);
406
407 return surface_type;
408 }
409
411 bool HasSelection( string selection )
412 {
413 TStringArray selections = new TStringArray;
414 GetSelectionList( selections );
415
416 for ( int i = 0; i < selections.Count(); ++i )
417 {
418 if ( selections.Get( i ) == selection )
419 {
420 return true;
421 }
422 }
423
424 return false;
425 }
426
428 bool HasAnimation( string anim_name )
429 {
430 string cfg_path_vehicles = "CfgVehicles " + GetType() + " ";
431 if ( g_Game.ConfigIsExisting (cfg_path_vehicles) && g_Game.ConfigIsExisting (cfg_path_vehicles + "AnimationSources " + anim_name) )
432 {
433 return true;
434 }
435
436 string cfg_path_weapons = "CfgWeapons " + GetType() + " ";
437 if ( g_Game.ConfigIsExisting (cfg_path_weapons) && g_Game.ConfigIsExisting (cfg_path_weapons + "AnimationSources " + anim_name) )
438 {
439 return true;
440 }
441
442 string cfg_path_magazines = "CfgMagazines " + GetType() + " ";
443 if ( g_Game.ConfigIsExisting (cfg_path_magazines) && g_Game.ConfigIsExisting (cfg_path_magazines + "AnimationSources " + anim_name) )
444 {
445 return true;
446 }
447
448 return false;
449 }
450
452 /*bool HasEnergyManager()
453 {
454 return false;
455 }*/
456
457 proto native int GetMemoryPointIndex(string memoryPointName);
458 proto native vector GetMemoryPointPos(string memoryPointName);
459 proto native vector GetMemoryPointPosByIndex(int pointIndex);
460 proto native bool MemoryPointExists(string memoryPoint);
461
462 proto native void CreateDynamicPhysics(int interactionLayers);
463 proto native void EnableDynamicCCD(bool state);
464 proto native void SetDynamicPhysicsLifeTime(float lifeTime);
465
467 void OnTreeCutDown(EntityAI cutting_entity);
468
470 proto native EntityType GetEntityType();
471
473 string GetType()
474 {
475 string ret;
476 g_Game.ObjectGetType(this, ret);
477
478 return ret;
479 }
480
483 {
484 string tmp;
485 if (NameOverride(tmp))
486 {
487 tmp = Widget.TranslateString(tmp);
488 }
489 else
490 {
491 g_Game.ObjectGetDisplayName(this, tmp);
492 }
493 return tmp;
494 }
495
496 //Used to specify this object will always display it's own name when attached to another object
498 {
499 return false;
500 }
501
504 {
505 return g_Game.GetModelName(GetType());
506 }
507
509 proto native owned string GetShapeName();
510
512 {
513 return g_Game.ObjectRelease(this);
514 }
515
517 bool IsKindOf(string type)
518 {
519 return g_Game.ObjectIsKindOf(this, type);
520 }
521
522 // Check alive state
523 bool IsAlive()
524 {
525 return !IsDamageDestroyed();
526 }
527
529 bool IsMan()
530 {
531 return false;
532 }
533
536 {
537 return false;
538 }
539
542 {
543 return false;
544 }
545
548 {
549 return false;
550 }
551
554 {
555 return false;
556 }
557
560 {
561 return false;
562 }
563
564 //Returns true for protector cases and similar items. Usually can be nested in other cargo while full, unlike clothing..
566 {
567 return false;
568 }
569
572 {
573 return false;
574 }
575
578 {
579 return false;
580 }
581
584 {
585 return false;
586 }
587
590 {
591 return false;
592 }
593
596 {
597 return false;
598 }
599
601 bool IsTree()
602 {
603 return false;
604 }
605
607 bool IsRock()
608 {
609 return false;
610 }
611
614 {
615 return false;
616 }
617
619 bool IsBush()
620 {
621 return false;
622 }
623
625 {
626 return false;
627 }
628
631 {
632 return false;
633 }
634
636 bool IsWeapon()
637 {
638 return false;
639 }
640
643 {
644 return false;
645 }
646
649 {
650 return false;
651 }
652
657
659 {
660 return LIQUID_NONE;
661 }
662
665 bool IsWell()
666 {
667 return false;
668 }
669
670 bool ShootsExplosiveAmmo()//placed on Object so that we can optimize early checks in DayZGame without casting
671 {
672 return false;
673 }
674
677 {
678 return false;
679 }
680
683 {
684 return false;
685 }
686
689 {
690 return false;
691 }
692
695 {
696 return false;
697 }
698
701 {
702 return false;
703 }
704
707 {
708 return false;
709 }
710
712 {
713 return false;
714 }
715
716 void SetBeingBackstabbed(int backstabType){}
717
719 bool IsFood()
720 {
721 return ( IsFruit() || IsMeat() || IsCorpse() || IsMushroom() );
722 }
723
724 bool IsFruit()
725 {
726 return false;
727 }
728
729 bool IsMeat()
730 {
731 return false;
732 }
733
734 bool IsCorpse()
735 {
736 return false;
737 }
738
740 {
741 return false;
742 }
743
746 {
747 return true;
748 }
749
752 {
753 return false;
754 }
755
757 {
758 return false;
759 }
760
762 {
763 return false;
764 }
765
767 {
768 return false;
769 }
770
772 {
773 return false;
774 }
775
777 {
778 return false;
779 }
780
782 {
783 return IsPlainObject() && !IsScenery();
784 }
785
787 {
788 return HasProxyParts() || CanUseConstruction();
789 }
790
793 {
794 return false;
795 }
796
798 {
799 return IsBush() || IsTree() || IsMan() || IsDayZCreature() || IsItemBase();
800 }
801
803 {
804 return true;
805 }
806
809 {
810 return false;
811 }
812
815 proto void GetNetworkID( out int lowBits, out int highBits );
816
818 {
819 int low, high;
820 GetNetworkID( low, high );
821 return high.ToString() + low.ToString();
822 }
823
824 override string GetDebugName()
825 {
826 return GetDebugNameNative();
827 }
828
829 static string GetDebugName(Object o)
830 {
831 if (o)
832 return o.GetDebugName();
833 return "null";
834 }
835
837 proto string GetDebugNameNative();
838
840 void RPC(int rpc_type, array<ref Param> params, bool guaranteed, PlayerIdentity recipient = NULL)
841 {
842 g_Game.RPC(this, rpc_type, params, guaranteed, recipient);
843 }
844
846 void RPCSingleParam(int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient = NULL)
847 {
848 g_Game.RPCSingleParam(this, rpc_type, param, guaranteed, recipient);
849 }
850
856 void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx);
857
862
868
869 proto vector ModelToWorld(vector modelPos);
870 proto vector WorldToModel(vector worldPos);
871
872 // config class API
873
874 proto string ConfigGetString(string entryName);
881 proto string ConfigGetStringRaw(string entryName);
882 proto int ConfigGetInt(string entryName);
883 bool ConfigGetBool(string entryName)
884 {
885 return (ConfigGetInt(entryName) == 1);
886 }
887
888 proto float ConfigGetFloat(string entryName);
889 proto vector ConfigGetVector(string entryName);
890 //proto ParamEntry ConfigGetEntry(string entryName);
891
897 proto native void ConfigGetTextArray(string entryName, out TStringArray values);
898
905 proto native void ConfigGetTextArrayRaw(string entryName, out TStringArray values);
906
912 proto native void ConfigGetFloatArray(string entryName, out TFloatArray values);
913
919 proto native void ConfigGetIntArray(string entryName, out TIntArray values);
920
925 proto native bool ConfigIsExisting(string entryName);
926
928 bool KindOf( string tag )
929 {
930 string item_name = this.GetType();
931 TStringArray item_tag_array = new TStringArray;
932 ConfigGetTextArray("cfgVehicles " + item_name + " itemInfo", item_tag_array);
933
934 int array_size = item_tag_array.Count();
935 for (int i = 0; i < array_size; i++)
936 {
937 if ( item_tag_array.Get(i) == tag )
938 {
939 return true;
940 }
941 }
942 return false;
943 }
944
946 {
947 int nTypenames = typenames.Count();
948 for( int i = 0; i < nTypenames; ++i )
949 {
950 if (IsInherited(typenames.Get(i)))
951 {
952 return true;
953 }
954 }
955 return false;
956 }
957
961 proto native bool IsPlainObject();
962
966 proto native bool IsScenery();
967
968 // Damage system
972 proto native bool HasDamageSystem();
973
977 proto native bool IsDamageDestroyed();
978
983 proto native void SetDestructTime(float time);
984
990 proto native float GetHealth(string zoneName, string healthType);
991
997 proto native float GetHealth01(string zoneName, string healthType);
998
1004 proto native float GetMaxHealth(string zoneName, string healthType);
1005
1011 proto native void SetHealth(string zoneName, string healthType, float value);
1012
1016 proto native void SetFullHealth();
1017
1023 proto native void AddHealth(string zoneName, string healthType, float value);
1024
1030 proto native void DecreaseHealth(string zoneName, string healthType, float value);
1031
1038 proto native bool GetAdditionalHealthTypes(string zoneName, TStringArray outHealthTypes);
1039
1045 void DecreaseHealth(string zoneName, string healthType, float value, bool auto_delete)
1046 {
1047 DecreaseHealth(zoneName, healthType, value);
1048
1049 if (auto_delete)
1050 {
1051 float result_health = GetHealth(zoneName, healthType);
1052 if (result_health <= 0)
1053 g_Game.GetCallQueue(CALL_CATEGORY_SYSTEM).Call(g_Game.ObjectDelete, this);
1054 }
1055 }
1056
1059 {
1060 return GetHealth("", "");
1061 }
1062
1064 {
1065 return GetHealth01("", "");
1066 }
1067
1069 {
1070 return GetMaxHealth("", "");
1071 }
1072
1073 void SetHealth(float health)
1074 {
1075 SetHealth("", "", health);
1076 }
1077
1078 void SetGlobalHealth(float health)
1079 {
1080 SetHealth("", "", health);
1081 }
1082
1083 void SetHealthLevel(int healthLevel, string zone = "")
1084 {
1085 SetHealth01(zone,"", GetHealthLevelValue(healthLevel, zone));
1086 }
1087
1088 void AddHealthLevel(int healthLevelDelta, string zone = "")
1089 {
1090 int maxHealthLevel = GetNumberOfHealthLevels(zone) - 1;
1091 int newHealthLevel = Math.Clamp(GetHealthLevel(zone) + healthLevelDelta,0,maxHealthLevel);
1092 SetHealthLevel(newHealthLevel,zone);
1093 }
1094
1096 void SetHealth01(string zoneName, string healthType, float coef)
1097 {
1098 SetHealth(zoneName,healthType,(GetMaxHealth(zoneName,healthType)*coef));
1099 }
1100
1101 void SetHealthMax(string zoneName = "", string healthType = "")
1102 {
1103 SetHealth(zoneName,healthType,GetMaxHealth(zoneName,healthType));
1104 }
1105
1106 void AddHealth( float add_health)
1107 {
1108 AddHealth("", "", add_health);
1109 }
1110
1111 void DecreaseHealth(float dec_health, bool auto_delete = true)
1112 {
1113 DecreaseHealth("", "", dec_health, auto_delete);
1114 }
1115
1116 void DecreaseHealthCoef(float dec_health_coef, bool auto_delete = true)
1117 {
1118 float current_health = GetHealth();
1119 float final_health_coef = GetHealth01() - dec_health_coef;
1120 float final_health = GetMaxHealth() * final_health_coef;
1121 DecreaseHealth("", "", current_health - final_health);
1122 }
1123
1134 proto native void ProcessDirectDamage(int damageType, EntityAI source, string componentName, string ammoName, vector modelPos, float damageCoef = 1.0, int flags = 0);
1135
1140 bool EEOnDamageCalculated(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
1141 {
1142 return true;
1143 }
1144
1149 proto native void GetDamageZones(out TStringArray dmgZones);
1150
1155 proto native vector GetDamageZonePos(string zoneName);
1160 proto native owned string GetDamageZoneNameByComponentIndex(int componentIndex);
1161
1167 proto native int GetHealthLevel(string zone = "");
1168
1174 proto native int GetNumberOfHealthLevels(string zone = "");
1175
1181 proto native float GetHealthLevelValue(int healthLevel, string zone = "");
1182
1183
1187 proto native bool GetAllowDamage();
1192 proto native void SetAllowDamage(bool val);
1193
1197 proto native bool GetCanBeDestroyed();
1198
1203 proto native void SetCanBeDestroyed(bool val);
1204
1216 {
1217 return IsDamageDestroyed();
1218 }
1219
1222
1225
1226 void GetActions(typename action_input_type, out array<ActionBase_Basic> actions)
1227 {
1228 }
1229
1231 SoundOnVehicle PlaySound(string sound_name, float range, bool create_local = true)
1232 {
1233 return g_Game.CreateSoundOnObject(this, sound_name, range, false, create_local);
1234 }
1235
1237 SoundOnVehicle PlaySoundLoop(string sound_name, float range, bool create_local = true)
1238 {
1239 return g_Game.CreateSoundOnObject(this, sound_name, range, true, create_local);
1240 }
1241
1243 bool PlaySoundSet( out EffectSound sound, string sound_set, float fade_in, float fade_out, bool loop = false )
1244 {
1245 if ( g_Game && !g_Game.IsDedicatedServer() )
1246 {
1247 if ( sound )
1248 {
1249 if ( loop )
1250 {
1251 return true;
1252 }
1253 else
1254 {
1255 StopSoundSet( sound ); //auto stop for non-looped sounds
1256 }
1257 }
1258
1259 sound = SEffectManager.PlaySoundOnObject( sound_set, this, fade_in, fade_out, loop );
1260 sound.SetAutodestroy( true );
1261
1262 return true;
1263 }
1264
1265 return false;
1266 }
1267
1269 bool PlaySoundSetLoop( out EffectSound sound, string sound_set, float fade_in, float fade_out )
1270 {
1271 return PlaySoundSet( sound, sound_set, fade_in, fade_out, true );
1272 }
1273
1275 bool PlaySoundSetAtMemoryPointLoopedSafe(out EffectSound sound, string soundSet, string memoryPoint,float play_fade_in = 0, float stop_fade_out = 0)
1276 {
1277 if (sound && sound.IsPlaying())
1278 {
1279 sound.SoundStop();
1280 }
1281 return PlaySoundSetAtMemoryPointLooped(sound, soundSet, memoryPoint, play_fade_in, stop_fade_out);
1282 }
1283
1284 bool PlaySoundSetAtMemoryPointLooped(out EffectSound sound, string soundSet, string memoryPoint, float play_fade_in = 0, float stop_fade_out = 0)
1285 {
1286 return PlaySoundSetAtMemoryPoint(sound, soundSet, memoryPoint, true, play_fade_in, stop_fade_out);
1287 }
1288
1289
1290 bool PlaySoundSetAtMemoryPoint(out EffectSound sound, string soundSet, string memoryPoint, bool looped = false, float play_fade_in = 0, float stop_fade_out = 0)
1291 {
1292 vector pos;
1293
1294 if (MemoryPointExists(memoryPoint))
1295 {
1296 pos = GetMemoryPointPos(memoryPoint);
1297 pos = ModelToWorld(pos);
1298 }
1299 else
1300 {
1301 ErrorEx(string.Format("Memory point %1 not found when playing soundset %2 at memory point location", memoryPoint, soundSet));
1302 return false;
1303 }
1304
1305 sound = SEffectManager.PlaySoundEnviroment(soundSet, pos, play_fade_in, stop_fade_out, looped);
1306 return true;
1307 }
1308
1310 bool StopSoundSet( out EffectSound sound )
1311 {
1312 if ( sound && g_Game && ( !g_Game.IsDedicatedServer() ) )
1313 {
1314 sound.SoundStop();
1315 sound = null;
1316
1317 return true;
1318 }
1319
1320 return false;
1321 }
1322
1325
1327 void OnReceivedHit(ImpactEffectsData hitData);
1328
1331
1333 {
1334 int lo = 0;
1335 int hi = 0;
1336 GetNetworkID(lo, hi);
1337 return lo | hi;
1338 }
1339
1340 bool NameOverride(out string output)
1341 {
1342 return false;
1343 }
1344
1345 bool DescriptionOverride(out string output)
1346 {
1347 return false;
1348 }
1349
1351
1353 {
1354 return false;
1355 }
1356
1358 {
1359 if ( MemoryPointExists("ce_center") )
1360 {
1361 //Print("CE_CENTER found");
1362 return ModelToWorld( GetMemoryPointPos("ce_center") );
1363 }
1364 else
1365 {
1366 //Print("CE_CENTER DOING A BAMBOOZLE => not found");
1367 return GetPosition() + Vector(0, 0.2, 0);
1368 }
1369 }
1370
1371 #ifdef DEVELOPER
1372 void SetDebugItem();
1373 #endif
1374
1375 void AddArrow(Object arrow, int componentIndex, vector closeBonePosWS, vector closeBoneRotWS)
1376 {
1377 int pivot = GetBonePivot(GetFireGeometryLevel(), componentIndex);
1378 vector parentTransMat[4];
1379 vector arrowTransMat[4];
1380
1381 if (pivot == -1)
1382 {
1383 GetTransform(parentTransMat);
1384 }
1385 else
1386 {
1387 GetBoneTransformWS(pivot, parentTransMat);
1388 }
1389
1390 float scale = GetScale();
1391 scale = 1 / (scale * scale);
1392
1393 arrow.GetTransform(arrowTransMat);
1394 Math3D.MatrixInvMultiply4(parentTransMat, arrowTransMat, arrowTransMat);
1395
1396 // orthogonalize matrix - parent might be skewed
1397 Math3D.MatrixOrthogonalize4(arrowTransMat);
1398
1399 arrowTransMat[3] = arrowTransMat[3] * scale;
1400
1401 arrow.SetTransform(arrowTransMat);
1402
1403 AddChild(arrow, pivot);
1404 }
1405
1407 {
1408 return !IsHologram();
1409 }
1410
1412 {
1413 return false;
1414 }
1415
1417
1419 {
1420 return !g_Game.IsMultiplayer();
1421 }
1422
1423 void Gizmo_SetWorldTransform(vector transform[4], bool finalize)
1424 {
1425 SetPosition(transform[3]);
1426 SetDirection(transform[2]);
1427
1428 SetTransform(transform);
1429
1430 // TODO: RPC or something when finalize == true to send the new transform to the server, don't forget to make 'Gizmo_IsSupported' return true
1431 }
1432
1434 {
1435 GetTransform(transform);
1436 }
1437
1439 {
1440 return true;
1441 }
1442
1444 {
1445 return true;
1446 }
1447
1448 //Debug
1449 //----------------------------------------------
1450 /*void DbgAddPxyPhy(string slot)
1451 {
1452 Print("AddProxyPhysics slot: " + slot);
1453 AddProxyPhysics(slot);
1454 }*/
1455};
eBleedingSourceType GetType()
override bool CanUseConstruction()
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
Static data holder for certain ammo config values.
Definition ammoeffects.c:6
static bool PlayAmmoEffect(string ammoType, vector pos)
Attempt to play the ammo effect at pos if found, returns true on success.
Definition ammoeffects.c:93
static bool PlayAmmoParticle(string ammoType, vector pos)
Attempt to play the ammo particle at pos if found, returns true on success.
Definition ammoeffects.c:46
Wrapper class for managing sound through SEffectManager.
Definition effectsound.c:5
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
static array< string > GetHiddenSelectionsConfig(string type)
static array< string > GetHiddenSelectionsMaterialsConfig(string type)
static array< string > GetHiddenSelectionsTexturesConfig(string type)
Internal ancestor of all Entity implementations.
Definition enentity.c:165
bool IsEntityAI()
Returns if this entity is EntityAI.
Definition object.c:541
bool IsRock()
Returns if this entity is rock.
Definition object.c:607
bool IsAmmoPile()
Returns if this entity is Ammo Pile.
Definition object.c:577
proto native int GetFireGeometryLevel()
void AddArrow(Object arrow, int componentIndex, vector closeBonePosWS, vector closeBoneRotWS)
Definition object.c:1375
void Gizmo_SetWorldTransform(vector transform[4], bool finalize)
Definition object.c:1423
proto native void SetHealth(string zoneName, string healthType, float value)
Sets current state of health.
bool IsAnyInherited(array< typename > typenames)
Definition object.c:945
proto native bool IsDamageDestroyed()
Checks if object is destroyed.
proto void GetNetworkID(out int lowBits, out int highBits)
Returns low and high bits of networkID. This id is shared between client and server for whole server-...
void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
Called after remote procedure call is recieved for this object.
proto vector GetSelectionBasePositionLS(string name)
Get the position of the selection with no animations applied.
proto native bool GetAllowDamage()
Returns if object can receive damage.
bool IsBuilding()
Returns if this entity is Building.
Definition object.c:648
float GetHealth01()
Equivalent of GetHealth01("", "");.
Definition object.c:1063
proto native void SetOrientation(vector vOrientation)
Set orientation (yaw, pitch, roll) in degrees.
proto native void SetAllowDamage(bool val)
Enable or disable object to receive damage.
proto native void ConfigGetTextArrayRaw(string entryName, out TStringArray values)
Get array of raw strings from config entry.
bool IsWeapon()
Returns if this entity is Weapon.
Definition object.c:636
bool IsHealthVisible()
Returns if the health of this entity should be displayed (widgets, inventory).
Definition object.c:745
void SetHealth01(string zoneName, string healthType, float coef)
Sets health relative to its maximum.
Definition object.c:1096
proto native vector GetBonePositionWS(int pivot)
SoundOnVehicle PlaySoundLoop(string sound_name, float range, bool create_local=true)
Plays the given sound in loop on this object's instance. Range is in meters. Created sound is only lo...
Definition object.c:1237
proto float ClippingInfo(out vector minMax[2])
Get Clipping info.
bool IsBeingBackstabbed()
Definition object.c:711
proto vector GetSelectionPositionLS(string name)
bool PlaySoundSetLoop(out EffectSound sound, string sound_set, float fade_in, float fade_out)
EffectSound - plays soundset on this object in loop and returns state of the sound (true - played,...
Definition object.c:1269
proto native void GetDamageZones(out TStringArray dmgZones)
Obtains a list of nammes of all object's damage zones.
proto vector ConfigGetVector(string entryName)
proto native void AddProxyPhysics(string proxySelectionName)
bool KindOf(string tag)
Compares config class name to given string.
Definition object.c:928
proto native bool ConfigIsExisting(string entryName)
Checks if given entry exists.
proto float ConfigGetFloat(string entryName)
EntityAI ProcessMeleeItemDamage(int mode=0)
Definition object.c:1350
bool CanBeSkinned()
Definition object.c:69
proto native vector GetOrientation()
Retrieve orientation (yaw, pitch, roll) in degrees.
string GetType()
Get config class of object.
Definition object.c:473
override string GetDebugName()
Definition object.c:824
bool IsInventoryItem()
Returns if this entity is InventoryItem.
Definition object.c:583
void SetHealthMax(string zoneName="", string healthType="")
Sets health to its maximum (zone or global).
Definition object.c:1101
bool IsBush()
Returns if this entity is bush.
Definition object.c:619
bool IsCorpse()
Definition object.c:734
proto native bool GetCollisionBox(out vector minMax[2])
Gets collision bounding box.
proto native vector GetLocalPos(vector vPos)
Calculate local position of other entity to this entity.
proto native vector GetDamageZonePos(string zoneName)
Obtains middle position of damage zone based on it's name.
proto vector GetSelectionPositionOld(string name)
proto native void SetCanBeDestroyed(bool val)
Enable or disable destruction of object (after health is depleated).
bool ConfigGetBool(string entryName)
Definition object.c:883
bool IsFuelStation()
Returns if this entity is Fuel Station (extends Building).
Definition object.c:676
proto void GetActionComponentsForSelectionName(int level, string selectionName, TIntArray componentIndices)
outputs action component index list by given selection, 'geometry' can be "fire" or "view" (default "...
bool ShootsExplosiveAmmo()
Returns if this entity is a weapon which can shoot explosive ammo.
Definition object.c:670
proto native int GetGeometryLevel()
Native functions for getting the level used for calculating the pivot.
proto native vector GetBonePositionMS(int pivot)
TStringArray GetHiddenSelectionsTextures()
Returns the hiddenSelectionsTextures array from the object's config.
Definition object.c:132
proto native owned string GetLODName(LOD lod)
Retrieve LOD name.
float GetSurfaceNoise()
Returns noise multiplier of surface under object.
Definition object.c:391
void SynchExplosion()
Definition object.c:159
proto native void GetSelectionList(out TStringArray selectionList)
proto native bool IsPlainObject()
Is this just static object without config?
proto native vector GetPosition()
Retrieve position.
proto native void ProcessDirectDamage(int damageType, EntityAI source, string componentName, string ammoName, vector modelPos, float damageCoef=1.0, int flags=0)
Applies damage on object.
proto native float GetHealth(string zoneName, string healthType)
Returns current state of health.
vector GetCenter()
Definition object.c:1357
proto native EntityType GetEntityType()
Returns shared EntityType, can be null for some internal/static types.
proto native bool GetAdditionalHealthTypes(string zoneName, TStringArray outHealthTypes)
List of additional health types in given zone.
bool IsFood()
Returns if this entity if a food item.
Definition object.c:719
void SetGlobalHealth(float health)
Equivalent of SetHealth("", "", float value);.
Definition object.c:1078
proto native float GetCollisionRadius()
Gets collision radius (bounding sphere).
bool HasProxyParts()
Definition object.c:776
proto native bool GetCanBeDestroyed()
Returns if object is destroyable.
void PostAreaDamageActions()
proto native owned int GetActionComponentNameList(int componentIndex, TStringArray nameList, string geometry="")
outputs action component name list by given component index, 'geometry' can be "fire" or "view" (defa...
proto native void ConfigGetIntArray(string entryName, out TIntArray values)
Get array of integers from config entry.
SoundOnVehicle PlaySound(string sound_name, float range, bool create_local=true)
Plays the given sound once on this object's instance. Range is in meters. Created sound is only local...
Definition object.c:1231
proto native vector GetGlobalPos(vector vPos)
Calculate global position to this entity from local position.
void Object()
proto vector GetActionComponentCenterOOB(int level, int componentIndex)
The center of the component, in model space.
bool HasAnimation(string anim_name)
Searches object's config for the given animation name. Returns true if it was found,...
Definition object.c:428
void RPC(int rpc_type, array< ref Param > params, bool guaranteed, PlayerIdentity recipient=NULL)
Remote procedure call shortcut, see CGame.RPC / CGame.RPCSingleParam.
Definition object.c:840
LOD GetLODByName(string name)
Retrieve LOD by given name.
Definition object.c:106
float GetHealth()
Equivalent of GetHealth("", "");.
Definition object.c:1058
void PreAreaDamageActions()
void OnExplosionEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
Definition object.c:189
proto native int GetHealthLevel(string zone="")
Returns global health level specified in object's config class parameter healthLevels (range is usual...
proto native void GetTightlyPackedCorners(ETransformationAxis axis, out vector corners[4])
Get corner positions in worldspace aligned to the orientation of the object (currently only TOP/BOTTO...
void SetHealth(float health)
Equivalent of SetHealth("", "", float value);.
Definition object.c:1073
void GetActions(typename action_input_type, out array< ActionBase_Basic > actions)
Definition object.c:1226
void Gizmo_GetWorldTransform(vector transform[4])
Definition object.c:1433
void SetBeingBackstabbed(int backstabType)
Definition object.c:716
bool CanObstruct()
Definition object.c:781
bool DescriptionOverride(out string output)
Definition object.c:1345
proto native void SetDynamicPhysicsLifeTime(float lifeTime)
void OnExplodeClient()
Called on clients when this object explodes.
Definition object.c:173
bool IsDayZCreature()
Checks if this instance is of type DayZCreature.
Definition object.c:535
bool Gizmo_IsSupported()
Definition object.c:1418
proto native void SetFullHealth()
Sets full health to all zones and removes fatal damage when applicable.
proto string GetDebugNameNative()
native GetDebugName which is internally overloaded where needed
proto native void AddHealth(string zoneName, string healthType, float value)
Adds health.
proto native int GetNumberOfHealthLevels(string zone="")
Returns global number of health levels specified in object's config class parameter healthLevels (ran...
bool IsMeleeWeapon()
returns if this entity is Melee Weapon
Definition object.c:642
proto native bool MemoryPointExists(string memoryPoint)
proto vector ModelToWorld(vector modelPos)
proto int GetBonePivot(int level, int component)
Get the pivot point of the bone from the component index in the LOD, level can be geometry,...
proto native void GetBoneTransformWS(int pivot, out vector transform[4])
void OnPlayerRecievedHit()
DEPRECATED.
proto native void ConfigGetTextArray(string entryName, out TStringArray values)
Get array of strings from config entry.
proto native void SetAffectPathgraph(bool fromConfig, bool affect)
Sets if object's geometry affects pathgraph generation. If first parameter is true,...
bool PlaySoundSetAtMemoryPointLooped(out EffectSound sound, string soundSet, string memoryPoint, float play_fade_in=0, float stop_fade_out=0)
Definition object.c:1284
proto native vector GetWorldPosition()
Returns world position. This function takes proxy transformation into account.
bool DisableVicinityIcon()
Disables icon in the vicinity, useful for large, immovable items, that are not buildings.
Definition object.c:808
proto native bool HasDamageSystem()
Checks if object's DamageSystem has been initialized(despite the name, does not really reliably answe...
proto void GetActionComponentMinMax(int level, int componentIndex, out vector min, out vector max)
The AABB of the component.
void OnReceivedHit(ImpactEffectsData hitData)
bool IsFireplace()
Returns if this entity is fireplacebase.
Definition object.c:595
proto native void SetPosition(vector vPos)
Set position.
proto int ConfigGetInt(string entryName)
bool IsWell()
Returns if this entity is Well (extends Building) DEPRECATED by GetWaterSourceObjectType.
Definition object.c:665
proto native float GetHealth01(string zoneName, string healthType)
Returns current state of health in range <0, 1>.
void OnLeaveTrigger(ScriptedEntity trigger)
Object left trigger.
Definition object.c:95
bool IsRuined()
Returns whether the object is ruined (0 Health).
Definition object.c:1215
bool IsClothing()
Returns if this entity is Clothing.
Definition object.c:589
void SpawnDamageDealtEffect()
bool IsWoodBase()
Returns whether object is PlanBase.
Definition object.c:613
bool StopSoundSet(out EffectSound sound)
EffectSound - stops soundset and returns state of the sound (true - stopped, false - not playing).
Definition object.c:1310
proto native float GetHealthLevelValue(int healthLevel, string zone="")
Returns cutoff value for health level specified in object's config class parameter healthLevels.
proto native owned string GetActionComponentName(int componentIndex, string geometry="")
returns action component name by given component index, 'geometry' can be "fire" or "view" (default "...
bool HasFixedActionTargetCursorPosition()
Definition object.c:1411
bool IsElectricAppliance()
Returns if this is an appliance, that can be plugged into electric circuit (== not energy source).
Definition object.c:688
proto vector GetSelectionPositionWS(string name)
proto native owned vector GetActionComponentPosition(int componentIndex, string geometry="")
returns action component position by given component index, 'geometry' can be "fire" or "view" (defau...
bool IsStaticTransmitter()
Returns if this entity is Static Transmitter.
Definition object.c:547
proto native void DecreaseHealth(string zoneName, string healthType, float value)
Decreases health.
proto native owned string GetDamageZoneNameByComponentIndex(int componentIndex)
Obtains name of damage zone based on index of specific component.
proto native vector GetSpeed()
Retrieve object's speed in global space.
void DecreaseHealth(string zoneName, string healthType, float value, bool auto_delete)
Decreases health with the option of auto-deleting the object if its ruined.
Definition object.c:1045
proto native bool IsScenery()
Is this Scenery?
bool IsTransmitter()
Returns if this entity is a non-static Transmitter.
Definition object.c:553
proto native void GetBoneRotationWS(int pivot, out float quaternion[4])
proto native bool CanAffectPathgraph()
Returns true if object's geometry can affect pathgraph generation.
proto native bool IsActionComponentPartOfSelection(int componentIndex, string selectionName, string geometry="")
return true if selection containts action component, 'geometry' can be "fire" or "view" (default "" f...
bool CanBeRepairedToPristine()
Definition object.c:1352
bool IsMagazine()
Returns if this entity is Magazine.
Definition object.c:571
proto string ConfigGetString(string entryName)
EWaterSourceObjectType GetWaterSourceObjectType()
Definition object.c:653
bool CanUseHandConstruction()
Returns if this entity can be constructed without tools.
Definition object.c:706
void OnSimulationDisabled()
Event called from C++ when simulation is disabled.
Definition object.c:1224
bool CanBeActionTarget()
Definition object.c:1406
void RPCSingleParam(int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=NULL)
Remote procedure call shortcut, see CGame.RPCSingleParam / CGame.RPC.
Definition object.c:846
bool PlaySoundSetAtMemoryPointLoopedSafe(out EffectSound sound, string soundSet, string memoryPoint, float play_fade_in=0, float stop_fade_out=0)
Same as PlaySoundSetAtMemoryPointLooped, only requests stoppage of the currently playing EffectSound ...
Definition object.c:1275
proto native vector GetBonePositionLS(int pivot)
returns local space, model space, world space position of the bone
bool IsParticle()
Definition object.c:756
proto native void EnableDynamicCCD(bool state)
bool CanProxyObstruct()
Definition object.c:786
bool CanBeAutoDeleted()
Definition object.c:802
bool Gizmo_IsAllowedTransformMode(GizmoTransformMode mode)
Definition object.c:1438
proto native owned string GetShapeName()
Return path and name of the model.
static string GetDebugName(Object o)
Definition object.c:829
proto native bool IsPendingDeletion()
Determine whether this object is in the deletion ProcessDirectDamage Is useful in the case where a pa...
proto native vector GetMemoryPointPos(string memoryPointName)
proto native vector GetModelSpeed()
Retrieve object's speed in local space.
proto native void GetBoneRotationLS(int pivot, out float quaternion[4])
returns local space, model space, world space orientation (quaternion) of a bone
string GetNetworkIDString()
Definition object.c:817
bool PlaySoundSet(out EffectSound sound, string sound_set, float fade_in, float fade_out, bool loop=false)
EffectSound - plays soundset on this object and returns state of the sound (true - played,...
Definition object.c:1243
bool IsScriptedLight()
Definition object.c:766
TStringArray GetHiddenSelectionsMaterials()
Returns the hiddenSelectionsMaterials array from the object's config.
Definition object.c:138
proto native void GetBoneTransformLS(int pivot, out vector transform[4])
returns local space, model space, world space transformations of a bone
void OnTreeCutDown(EntityAI cutting_entity)
Called when tree is chopped down. 'cutting_entity' can be tool, or player, if cutting bush with bare ...
proto native bool GetLODS(notnull out array< LOD > lods)
Retrieve all LODS.
proto native void SetDestructTime(float time)
Sets the time over which to perform DestructTent/DestructTree.
bool IsMushroom()
Definition object.c:739
bool IsFruit()
Definition object.c:724
bool CanProxyObstructSelf()
can the object's own proxy geometry obstruct it? Currently checking 'ObjIntersectView'
Definition object.c:792
proto native void GetBoneTransformMS(int pivot, out vector transform[4])
proto native int GetMemoryLevel()
proto native vector GetMemoryPointPosByIndex(int pointIndex)
bool IsContainer()
Definition object.c:565
void Delete()
Delete this object in next frame.
Definition object.c:82
string GetSurfaceType()
Returns type of surface under object.
Definition object.c:398
bool ShowZonesHealth()
Returns true if the health of damage zones should be displayed (instead of global HP of the entity) (...
Definition object.c:751
proto native void RemoveProxyPhysics(string proxySelectionName)
bool Gizmo_IsAllowedSpaceMode(GizmoSpaceMode mode)
Definition object.c:1443
bool IsItemTent()
Definition object.c:761
proto vector WorldToModel(vector worldPos)
proto native bool ToDelete()
Flag to determine this object is marked to be deleted soon.
bool IsItemBase()
Returns if this entity is ItemBase.
Definition object.c:559
proto native int GetViewGeometryLevel()
bool IsPeltBase()
Returns if this entity is Pelt_Base.
Definition object.c:630
bool IsHologram()
Definition object.c:771
string GetModelName()
Returns name of the model of this object without the '.p3d' suffix.
Definition object.c:503
bool IsKindOf(string type)
Check config class name of the object.
Definition object.c:517
bool IsCuttable()
Definition object.c:624
bool NameOverride(out string output)
Definition object.c:1340
proto native vector GetDirection()
Retrieve direction vector.
proto native int GetMemoryPointIndex(string memoryPointName)
If Returns true if this item has EnergyManager in its config. Otherwise returns false.
bool PlaySoundSetAtMemoryPoint(out EffectSound sound, string soundSet, string memoryPoint, bool looped=false, float play_fade_in=0, float stop_fade_out=0)
Definition object.c:1290
bool IsTransport()
Returns if this entity is transport.
Definition object.c:682
proto native vector GetDirectionUp()
Retrieve direction up vector.
proto vector GetSelectionPositionMS(string name)
proto native vector GetBoundingCenter()
void ~Object()
proto native void GetBonePivotsForAnimationSource(int level, string animationSource, out TIntArray pivots)
Get the pivots assigned to the animation source at the specified LOD.
void DecreaseHealth(float dec_health, bool auto_delete=true)
Equivalent of DecreaseHealth("", "", float value, bool auto_delete);.
Definition object.c:1111
proto native float GetMaxHealth(string zoneName, string healthType)
Returns maximum value of health.
bool IsMeat()
Definition object.c:729
void OnSimulationEnabled()
Event called from C++ when simulation is enabled.
Definition object.c:1221
bool IsTree()
Returns if this entity is tree.
Definition object.c:601
proto native void ConfigGetFloatArray(string entryName, out TFloatArray values)
Get array of floats from config entry.
proto string ConfigGetStringRaw(string entryName)
Get a raw strings from config entry.
void DecreaseHealthCoef(float dec_health_coef, bool auto_delete=true)
Decreases health by the given coeficient.
Definition object.c:1116
bool CanBeIgnoredByDroppedItem()
Definition object.c:797
void OnEnterTrigger(ScriptedEntity trigger)
Object entered trigger.
Definition object.c:92
bool CanUseConstruction()
Returns if this entity can be constucted,deconstructed (e.g. fence,watchtower).
Definition object.c:694
proto native float GetDamage()
Get total damage (clipped to range 0..1).
void AddHealth(float add_health)
Equivalent of AddHealth("", "", float value);.
Definition object.c:1106
bool EEOnDamageCalculated(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
Event called from C++ right before damage is applied.
Definition object.c:1140
void SetHealthLevel(int healthLevel, string zone="")
Sets specific health level. It will use the cutoff value as returned by 'GetHealthLevelValue' as the ...
Definition object.c:1083
void OnSpawnByObjectSpawner(ITEM_SpawnerObject item)
proto vector GetActionComponentCenter(int level, int componentIndex)
The center of the component, in model space.
bool IsMan()
Returns if this entity is Man.
Definition object.c:529
bool IsAlive()
Definition object.c:523
TStringArray GetHiddenSelections()
Returns the hiddenSelections array from the object's config.
Definition object.c:126
bool HasNetworkID()
Definition object.c:1332
proto native void SetDirection(vector vPos)
Set direction of object.
bool HasSelection(string selection)
Returns true if the given selection was found in the p3d file. False if otherwise.
Definition object.c:411
int Release()
Definition object.c:511
void Explode(int damageType, string ammoType="")
Creates an explosion on this object by its ammoType in config.
Definition object.c:144
bool DisplayNameRuinAttach()
Definition object.c:497
float GetMaxHealth()
Equivalent of GetMaxHealth("", "");.
Definition object.c:1068
bool CanUseConstructionBuild()
Returns if this entity can be built, specifically.
Definition object.c:700
proto native void GetBoneRotationMS(int pivot, out float quaternion[4])
void AddHealthLevel(int healthLevelDelta, string zone="")
Similar to 'SetHealthLevel', but allows to jump up/down 'healthLevelDelta' amount of health levels fr...
Definition object.c:1088
proto native void CreateDynamicPhysics(int interactionLayers)
proto native void PlaceOnSurface()
Place object on surface.
int GetLiquidSourceType()
Definition object.c:658
string GetDisplayName()
Get display name of entity.
Definition object.c:482
proto native vector GetDirectionAside()
Retrieve direction aside vector.
LOD class.
Definition gameplay.c:204
Definition enmath.c:7
Base Param Class with no parameters.
Definition param.c:12
The class that will be instanced (moddable).
Definition gameplay.c:389
Manager class for managing Effect (EffectParticle, EffectSound).
static EffectSound PlaySoundEnviroment(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound, updating environment variables.
static EffectSound PlaySoundOnObject(string sound_set, Object parent_object, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
override bool IsDayZCreature()
Definition dayzanimal.c:55
DayZGame g_Game
Definition dayzgame.c:3942
override bool IsCorpse()
override bool IsMushroom()
override bool IsFruit()
override bool IsMeat()
ERPCs
Definition erpcs.c:2
ETransformationAxis
EWaterSourceObjectType
Serializer ParamsReadContext
Definition gameplay.c:15
GizmoTransformMode
Definition gizmoapi.c:2
GizmoSpaceMode
Definition gizmoapi.c:11
enum ShapeType ErrorEx
proto native void SetPosition(vector position)
Set the world position of the Effect.
Definition effect.c:463
proto native void SetDirection(vector direction)
ShapeFlags
Definition endebug.c:126
class DiagMenu Shape
Instance of created debug visualizer.
array< float > TFloatArray
Definition enscript.c:713
array< string > TStringArray
Definition enscript.c:712
array< int > TIntArray
Definition enscript.c:714
proto native external float GetScale()
proto external void GetTransform(out vector mat[])
Returns transformation of Entity.
const int LIQUID_NONE
Definition constants.c:532
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto void MatrixOrthogonalize4(vector mat[4])
Orthogonalizes matrix.
static proto void MatrixInvMultiply4(vector mat0[4], vector mat1[4], out vector res[4])
Invert-transforms matrix.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
vector GetPosition()
Get the world position of the Effect.
Definition effect.c:473
proto int ToLower()
Changes string to lowercase.
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8
proto native void AddChild(Widget child, bool immedUpdate=true)
proto native void SetTransform(vector mat[4], bool immedUpdate=true)
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
override bool IsHologram()
Definition itembase.c:5885
override bool IsItemBase()
Definition itembase.c:7684
< h scale="0.8">< image set="dayz_gui" name="icon_pin"/> Welcome to the DayZ Stress Test Branch</h >< h scale="0.6"> This branch serves for time limited development tests that are open to the community Our goal in each of these tests is to gather performance and stability data from servers under heavy load</h ></br >< h scale="0.8">< image set="dayz_gui" name="icon_pin"/> Stress test Schedule</h >< h scale="0.6"> We ll only run the Stress Tests when our development team needs data and or specific feedback Stress Tests will be announced on our Twitter and and will usually run for a couple of hours</h ></br >< h scale="0.8">< image set="dayz_gui" name="icon_pin"/> Current Stress Test</h >< h scale="0.6"> In the first bunch of Stress we ll mostly focus on watching server performance under heavy PvP gameplay load For detailed information about an ongoing Stress please visit dayz com dev hub</h ></br >< h scale="0.8">< image set="dayz_gui" name="icon_pin"/> Important Note</h >< h scale="0.6"> Stress Tests do not represent a typical DayZ gameplay experience Spawn points
Definition news_feed.txt:26
void OnDebug(vector p0, vector p1, bool hasHit, bool found)
Debug callback for rendering on the screen.
Definition object.c:32
bool OnCollide(Object other)
Ray cast line test from owner to a tested position.
Definition object.c:58
vector m_DirectionFunc
The size of the boundig box, centered.
Definition object.c:18
enum ProcessDirectDamageFlags m_Owner
bool OnFirstContact(Object other)
Called for first layer contacts to determine if this object should be snapped around or default rv ra...
Definition object.c:40
bool OnQuery(Object other)
Initial query around the owner position to see if an object should be processed in contact testing.
Definition object.c:49
vector m_Offset
The direction of the owner in world space.
Definition object.c:15
ProcessDirectDamageFlags
Definition object.c:2
@ NO_ATTACHMENT_TRANSFER
Do not transfer damage to attachments.
Definition object.c:4
@ ALL_TRANSFER
Definition object.c:3
@ NO_GLOBAL_TRANSFER
Do not transfer damage to global.
Definition object.c:5
@ NO_TRANSFER
NO_ATTACHMENT_TRANSFER | NO_GLOBAL_TRANSFER.
Definition object.c:6
vector m_OwnerDirection
The position of the owner in world space.
Definition object.c:13
vector m_Transform[4]
If 'OnDebug' is to be called.
Definition object.c:21
bool m_DebugEnabled
How much should the direction be favoured.
Definition object.c:20
vector m_OwnerPosition
The owner performing the snap callback.
Definition object.c:12
vector m_Extents
The true center of the bounding box of the object to be dropped in model space.
Definition object.c:16
void OnSetup()
The transformation currently being debugged.
Definition object.c:26
proto string GetDebugNameNative()
Gets the debug name for the ParticleManager.