DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
Object.c
См. документацию.
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()
Определения BaseBuildingBase.c:2220
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
override bool IsDayZCreature()
Определения DayZAnimal.c:55
DayZGame g_Game
Определения DayZGame.c:3942
ERPCs
Определения ERPCs.c:2
ETransformationAxis
Определения ETransformationAxis.c:2
EWaterSourceObjectType
Определения EWaterSourceObjectType.c:2
override bool IsCorpse()
Определения Edible_Base.c:1480
override bool IsMeat()
Определения Edible_Base.c:1475
override bool IsFruit()
Определения Edible_Base.c:1485
override bool IsMushroom()
Определения Edible_Base.c:1490
GizmoTransformMode
Определения GizmoApi.c:2
GizmoSpaceMode
Определения GizmoApi.c:11
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
override bool IsHologram()
Определения ItemBase.c:5885
override bool IsItemBase()
Определения ItemBase.c:7684
void OnDebug(vector p0, vector p1, bool hasHit, bool found)
Debug callback for rendering on the screen.
Определения Object.c:32
bool OnCollide(Object other)
Ray cast line test from owner to a tested position.
Определения Object.c:58
vector m_DirectionFunc
The size of the boundig box, centered.
Определения 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...
Определения Object.c:40
bool OnQuery(Object other)
Initial query around the owner position to see if an object should be processed in contact testing.
Определения Object.c:49
vector m_Offset
The direction of the owner in world space.
Определения Object.c:15
ProcessDirectDamageFlags
Определения Object.c:2
@ NO_ATTACHMENT_TRANSFER
Do not transfer damage to attachments.
Определения Object.c:4
@ ALL_TRANSFER
Определения Object.c:3
@ NO_GLOBAL_TRANSFER
Do not transfer damage to global.
Определения Object.c:5
@ NO_TRANSFER
NO_ATTACHMENT_TRANSFER | NO_GLOBAL_TRANSFER.
Определения Object.c:6
vector m_OwnerDirection
The position of the owner in world space.
Определения Object.c:13
vector m_Transform[4]
If 'OnDebug' is to be called.
Определения Object.c:21
bool m_DebugEnabled
How much should the direction be favoured.
Определения Object.c:20
vector m_OwnerPosition
The owner performing the snap callback.
Определения Object.c:12
vector m_Extents
The true center of the bounding box of the object to be dropped in model space.
Определения Object.c:16
void OnSetup()
The transformation currently being debugged.
Определения Object.c:26
proto string GetDebugNameNative()
Gets the debug name for the ParticleManager.
static bool PlayAmmoEffect(string ammoType, vector pos)
Attempt to play the ammo effect at pos if found, returns true on success.
Определения AmmoEffects.c:93
static bool PlayAmmoParticle(string ammoType, vector pos)
Attempt to play the ammo particle at pos if found, returns true on success.
Определения AmmoEffects.c:46
Static data holder for certain ammo config values.
Определения AmmoEffects.c:6
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
Определения EffectSound.c:603
Wrapper class for managing sound through SEffectManager.
Определения EffectSound.c:5
Определения EntityType.c:2
static array< string > GetHiddenSelectionsTexturesConfig(string type)
Определения HiddenSelectionsData.c:45
static array< string > GetHiddenSelectionsMaterialsConfig(string type)
Определения HiddenSelectionsData.c:52
static array< string > GetHiddenSelectionsConfig(string type)
Определения HiddenSelectionsData.c:38
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...
proto native void GetBoneRotationWS(int pivot, out float quaternion[4])
proto native bool GetCollisionBox(out vector minMax[2])
Gets collision bounding box.
bool IsBeingBackstabbed()
Определения Object.c:711
bool IsFireplace()
Returns if this entity is fireplacebase.
Определения Object.c:595
bool DisplayNameRuinAttach()
Определения Object.c:497
void OnSimulationDisabled()
Event called from C++ when simulation is disabled.
Определения Object.c:1224
proto native void GetBoneRotationMS(int pivot, out float quaternion[4])
proto native void SetDestructTime(float time)
Sets the time over which to perform DestructTent/DestructTree.
proto native bool IsDamageDestroyed()
Checks if object is destroyed.
EWaterSourceObjectType GetWaterSourceObjectType()
Определения Object.c:653
proto native owned string GetShapeName()
Return path and name of the model.
proto native bool GetAdditionalHealthTypes(string zoneName, TStringArray outHealthTypes)
List of additional health types in given zone.
bool ShootsExplosiveAmmo()
Returns if this entity is a weapon which can shoot explosive ammo.
Определения Object.c:670
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 float GetHealth(string zoneName, string healthType)
Returns current state of health.
proto native float GetHealth01(string zoneName, string healthType)
Returns current state of health in range <0, 1>.
bool StopSoundSet(out EffectSound sound)
EffectSound - stops soundset and returns state of the sound (true - stopped, false - not playing)
Определения Object.c:1310
bool IsWell()
Определения Object.c:665
proto float ConfigGetFloat(string entryName)
bool IsEntityAI()
Returns if this entity is EntityAI.
Определения Object.c:541
proto native int GetMemoryLevel()
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 ...
Определения Object.c:1275
float GetHealth01()
Equivalent of GetHealth01("", "");.
Определения Object.c:1063
proto vector GetSelectionPositionOld(string name)
bool IsTransport()
Returns if this entity is transport.
Определения Object.c:682
bool IsMagazine()
Returns if this entity is Magazine.
Определения Object.c:571
LOD GetLODByName(string name)
Retrieve LOD by given name.
Определения Object.c:106
proto native void EnableDynamicCCD(bool state)
void RPCSingleParam(int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=NULL)
Remote procedure call shortcut, see CGame.RPCSingleParam / CGame.RPC.
Определения Object.c:846
proto native vector GetWorldPosition()
proto vector GetSelectionPositionMS(string name)
proto string ConfigGetStringRaw(string entryName)
Get a raw 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,...
proto native bool IsPlainObject()
Is this just static object without config? So we can avoid calling unnecessary methods.
proto float ClippingInfo(out vector minMax[2])
Get Clipping info.
proto native owned vector GetActionComponentPosition(int componentIndex, string geometry="")
returns action component position by given component index, 'geometry' can be "fire" or "view" (defau...
proto native void RemoveProxyPhysics(string proxySelectionName)
proto native void ConfigGetTextArrayRaw(string entryName, out TStringArray values)
Get array of raw strings from config entry.
bool IsAmmoPile()
Returns if this entity is Ammo Pile.
Определения Object.c:577
void PreAreaDamageActions()
void OnExplosionEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
Определения Object.c:189
bool IsInventoryItem()
Returns if this entity is InventoryItem.
Определения Object.c:583
proto native void SetFullHealth()
Sets full health to all zones and removes fatal damage when applicable.
proto native void PlaceOnSurface()
Place object on surface.
bool IsContainer()
Определения Object.c:565
proto vector ModelToWorld(vector modelPos)
proto native void GetBonePivotsForAnimationSource(int level, string animationSource, out TIntArray pivots)
Get the pivots assigned to the animation source at the specified LOD.
proto native bool ConfigIsExisting(string entryName)
Checks if given entry exists.
bool IsFruit()
Определения Object.c:724
proto native void SetDirection(vector vPos)
Set direction of object.
vector GetCenter()
Определения Object.c:1357
bool IsCorpse()
Определения Object.c:734
bool HasNetworkID()
Определения Object.c:1332
void OnReceivedHit(ImpactEffectsData hitData)
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 int GetFireGeometryLevel()
proto native float GetHealthLevelValue(int healthLevel, string zone="")
Returns cutoff value for health level specified in object's config class parameter healthLevels.
int Release()
Определения Object.c:511
proto native float GetDamage()
Get total damage (clipped to range 0..1)
proto native vector GetSpeed()
Retrieve object's speed in global space.
bool CanUseConstructionBuild()
Returns if this entity can be built, specifically.
Определения Object.c:700
proto native vector GetDamageZonePos(string zoneName)
Obtains middle position of damage zone based on it's name.
proto vector ConfigGetVector(string entryName)
void OnSpawnByObjectSpawner(ITEM_SpawnerObject item)
void SetHealth(float health)
Equivalent of SetHealth("", "", float value);.
Определения Object.c:1073
proto native float GetMaxHealth(string zoneName, string healthType)
Returns maximum value of health.
void SpawnDamageDealtEffect()
void Object()
void GetActions(typename action_input_type, out array< ActionBase_Basic > actions)
Определения Object.c:1226
string GetModelName()
Returns name of the model of this object without the '.p3d' suffix.
Определения Object.c:503
proto native bool ToDelete()
Flag to determine this object is marked to be deleted soon.
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.
string GetDisplayName()
Get display name of entity.
Определения Object.c:482
void SynchExplosion()
Определения Object.c:159
string GetNetworkIDString()
Определения Object.c:817
bool IsWoodBase()
Returns whether object is PlanBase.
Определения Object.c:613
proto native void SetPosition(vector vPos)
Set position.
bool DisableVicinityIcon()
Disables icon in the vicinity, useful for large, immovable items, that are not buildings.
Определения Object.c:808
bool Gizmo_IsSupported()
Определения Object.c:1418
bool IsKindOf(string type)
Check config class name of the object.
Определения Object.c:517
proto native void GetBoneRotationLS(int pivot, out float quaternion[4])
returns local space, model space, world space orientation (quaternion) of a bone
proto native void ConfigGetTextArray(string entryName, out TStringArray values)
Get array of strings from config entry.
TStringArray GetHiddenSelections()
Returns the hiddenSelections array from the object's config.
Определения Object.c:126
override string GetDebugName()
Определения Object.c:824
void DecreaseHealth(float dec_health, bool auto_delete=true)
Equivalent of DecreaseHealth("", "", float value, bool auto_delete);.
Определения Object.c:1111
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,...
Определения Object.c:1269
proto native void AddProxyPhysics(string proxySelectionName)
proto native vector GetPosition()
Retrieve position.
proto native bool GetCanBeDestroyed()
Returns if object is destroyable.
bool Gizmo_IsAllowedSpaceMode(GizmoSpaceMode mode)
Определения Object.c:1443
void SetGlobalHealth(float health)
Equivalent of SetHealth("", "", float value);.
Определения Object.c:1078
proto native int GetHealthLevel(string zone="")
Returns global health level specified in object's config class parameter healthLevels (range is usual...
proto native void GetBoneTransformWS(int pivot, out vector transform[4])
bool IsCuttable()
Определения Object.c:624
bool CanUseConstruction()
Returns if this entity can be constucted,deconstructed (e.g. fence,watchtower)
Определения Object.c:694
bool KindOf(string tag)
Compares config class name to given string.
Определения Object.c:928
bool IsMan()
Returns if this entity is Man.
Определения Object.c:529
bool IsTree()
Returns if this entity is tree.
Определения Object.c:601
proto native void SetAllowDamage(bool val)
Enable or disable object to receive damage.
void AddHealth(float add_health)
Equivalent of AddHealth("", "", float value);.
Определения Object.c:1106
proto vector GetActionComponentCenterOOB(int level, int componentIndex)
The center of the component, in model space.
proto native void GetSelectionList(out TStringArray selectionList)
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,...
Определения Object.c:1243
bool IsFuelStation()
Returns if this entity is Fuel Station (extends Building)
Определения Object.c:676
proto native void SetCanBeDestroyed(bool val)
Enable or disable destruction of object (after health is depleated)
proto native bool IsPendingDeletion()
proto string ConfigGetString(string entryName)
bool HasProxyParts()
Определения Object.c:776
bool IsItemBase()
Returns if this entity is ItemBase.
Определения Object.c:559
proto native vector GetOrientation()
Retrieve orientation (yaw, pitch, roll) in degrees
bool NameOverride(out string output)
Определения Object.c:1340
string GetSurfaceType()
Returns type of surface under object.
Определения Object.c:398
TStringArray GetHiddenSelectionsTextures()
Returns the hiddenSelectionsTextures array from the object's config.
Определения Object.c:132
bool CanBeIgnoredByDroppedItem()
Определения Object.c:797
bool ConfigGetBool(string entryName)
Определения Object.c:883
void OnEnterTrigger(ScriptedEntity trigger)
Object entered trigger.
Определения Object.c:92
bool IsFood()
Returns if this entity if a food item.
Определения Object.c:719
bool IsAnyInherited(array< typename > typenames)
Определения Object.c:945
float GetHealth()
Equivalent of GetHealth("", "");.
Определения Object.c:1058
proto vector GetSelectionBasePositionLS(string name)
Get the position of the selection with no animations applied.
proto native void GetDamageZones(out TStringArray dmgZones)
Obtains a list of nammes of all object's damage zones.
proto native vector GetMemoryPointPosByIndex(int pointIndex)
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.
Определения Object.c:1140
bool PlaySoundSetAtMemoryPoint(out EffectSound sound, string soundSet, string memoryPoint, bool looped=false, float play_fade_in=0, float stop_fade_out=0)
Определения Object.c:1290
bool ShowZonesHealth()
Returns true if the health of damage zones should be displayed (instead of global HP of the entity) (...
Определения Object.c:751
bool HasAnimation(string anim_name)
Searches object's config for the given animation name. Returns true if it was found,...
Определения Object.c:428
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...
Определения Object.c:1231
proto native bool GetAllowDamage()
Returns if object can receive damage.
bool IsScriptedLight()
Определения Object.c:766
void PostAreaDamageActions()
void Delete()
Delete this object in next frame.
Определения Object.c:82
bool HasFixedActionTargetCursorPosition()
Определения Object.c:1411
bool CanObstruct()
Определения Object.c:781
proto native vector GetLocalPos(vector vPos)
Calculate local position of other entity to this entity.
bool IsBush()
Returns if this entity is bush.
Определения Object.c:619
bool IsWeapon()
Returns if this entity is Weapon.
Определения Object.c:636
bool CanProxyObstructSelf()
can the object's own proxy geometry obstruct it? Currently checking 'ObjIntersectView'
Определения Object.c:792
float GetMaxHealth()
Equivalent of GetMaxHealth("", "");.
Определения Object.c:1068
proto native void AddHealth(string zoneName, string healthType, float value)
Adds health.
void AddHealthLevel(int healthLevelDelta, string zone="")
Similar to 'SetHealthLevel', but allows to jump up/down 'healthLevelDelta' amount of health levels fr...
Определения Object.c:1088
bool IsItemTent()
Определения Object.c:761
static string GetDebugName(Object o)
Определения Object.c:829
proto native vector GetDirectionAside()
Retrieve direction aside vector.
proto native bool GetLODS(notnull out array< LOD > lods)
Retrieve all LODS.
proto native int GetGeometryLevel()
Native functions for getting the level used for calculating the pivot.
bool IsPeltBase()
Returns if this entity is Pelt_Base.
Определения Object.c:630
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...
proto native void SetOrientation(vector vOrientation)
Set orientation (yaw, pitch, roll) in degrees
void DecreaseHealthCoef(float dec_health_coef, bool auto_delete=true)
Decreases health by the given coeficient.
Определения Object.c:1116
proto native void GetBoneTransformMS(int pivot, out vector transform[4])
float GetSurfaceNoise()
Returns noise multiplier of surface under object.
Определения Object.c:391
bool IsRuined()
Returns whether the object is ruined (0 Health).
Определения Object.c:1215
proto native bool CanAffectPathgraph()
Returns true if object's geometry can affect pathgraph generation.
proto int ConfigGetInt(string entryName)
proto vector GetActionComponentCenter(int level, int componentIndex)
The center of the component, in model space.
void Gizmo_SetWorldTransform(vector transform[4], bool finalize)
Определения Object.c:1423
proto void GetActionComponentsForSelectionName(int level, string selectionName, TIntArray componentIndices)
outputs action component index list by given selection, 'geometry' can be "fire" or "view" (default "...
proto native vector GetBonePositionWS(int pivot)
TStringArray GetHiddenSelectionsMaterials()
Returns the hiddenSelectionsMaterials array from the object's config.
Определения Object.c:138
bool IsClothing()
Returns if this entity is Clothing.
Определения Object.c:589
proto native bool MemoryPointExists(string memoryPoint)
proto void GetActionComponentMinMax(int level, int componentIndex, out vector min, out vector max)
The AABB of the component.
proto native owned string GetActionComponentName(int componentIndex, string geometry="")
returns action component name by given component index, 'geometry' can be "fire" or "view" (default "...
void SetHealthMax(string zoneName="", string healthType="")
Sets health to its maximum (zone or global)
Определения Object.c:1101
bool IsBuilding()
Returns if this entity is Building.
Определения Object.c:648
void AddArrow(Object arrow, int componentIndex, vector closeBonePosWS, vector closeBoneRotWS)
Определения Object.c:1375
void OnSimulationEnabled()
Event called from C++ when simulation is enabled.
Определения Object.c:1221
proto native void ConfigGetIntArray(string entryName, out TIntArray values)
Get array of integers from config entry.
void DecreaseHealth(string zoneName, string healthType, float value, bool auto_delete)
Decreases health with the option of auto-deleting the object if its ruined.
Определения Object.c:1045
bool IsHealthVisible()
Returns if the health of this entity should be displayed (widgets, inventory)
Определения Object.c:745
bool IsRock()
Returns if this entity is rock.
Определения Object.c:607
proto native vector GetDirection()
Retrieve direction vector.
bool IsDayZCreature()
Checks if this instance is of type DayZCreature.
Определения Object.c:535
proto native int GetMemoryPointIndex(string memoryPointName)
If Returns true if this item has EnergyManager in its config. Otherwise returns false.
void OnPlayerRecievedHit()
DEPRECATED.
string GetType()
Get config class of object.
Определения Object.c:473
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...
Определения Object.c:1237
bool HasSelection(string selection)
Returns true if the given selection was found in the p3d file. False if otherwise.
Определения Object.c:411
bool IsTransmitter()
Returns if this entity is a non-static Transmitter.
Определения Object.c:553
void Explode(int damageType, string ammoType="")
Creates an explosion on this object by its ammoType in config.
Определения Object.c:144
proto native void SetDynamicPhysicsLifeTime(float lifeTime)
void SetHealthLevel(int healthLevel, string zone="")
Sets specific health level. It will use the cutoff value as returned by 'GetHealthLevelValue' as the ...
Определения Object.c:1083
proto vector WorldToModel(vector worldPos)
bool IsMeat()
Определения Object.c:729
proto native bool HasDamageSystem()
Checks if object's DamageSystem has been initialized(despite the name, does not really reliably answe...
proto vector GetSelectionPositionWS(string name)
bool CanProxyObstruct()
Определения Object.c:786
void SetHealth01(string zoneName, string healthType, float coef)
Sets health relative to its maximum.
Определения Object.c:1096
proto native void ConfigGetFloatArray(string entryName, out TFloatArray values)
Get array of floats from config entry.
void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
Called after remote procedure call is recieved for this object.
bool CanUseHandConstruction()
Returns if this entity can be constructed without tools.
Определения Object.c:706
proto native owned string GetLODName(LOD lod)
Retrieve LOD name.
void OnExplodeClient()
Called on clients when this object explodes.
Определения Object.c:173
void ~Object()
bool IsMushroom()
Определения Object.c:739
bool Gizmo_IsAllowedTransformMode(GizmoTransformMode mode)
Определения Object.c:1438
void Gizmo_GetWorldTransform(vector transform[4])
Определения Object.c:1433
bool DescriptionOverride(out string output)
Определения Object.c:1345
proto native void SetHealth(string zoneName, string healthType, float value)
Sets current state of health.
bool CanBeAutoDeleted()
Определения Object.c:802
proto native bool IsScenery()
Is this Scenery? (handy for excluding terain when it is not needed)
void OnLeaveTrigger(ScriptedEntity trigger)
Object left trigger.
Определения Object.c:95
int GetLiquidSourceType()
Определения Object.c:658
bool IsAlive()
Определения Object.c:523
bool CanBeSkinned()
Определения Object.c:69
bool IsHologram()
Определения Object.c:771
proto vector GetSelectionPositionLS(string name)
proto native EntityType GetEntityType()
Returns shared EntityType, can be null for some internal/static types.
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 owned string GetDamageZoneNameByComponentIndex(int componentIndex)
Obtains name of damage zone based on index of specific component.
bool IsMeleeWeapon()
returns if this entity is Melee Weapon
Определения Object.c:642
proto string GetDebugNameNative()
native GetDebugName which is internally overloaded where needed
proto native vector GetBonePositionLS(int pivot)
returns local space, model space, world space position of the bone
proto native int GetViewGeometryLevel()
proto void GetNetworkID(out int lowBits, out int highBits)
bool IsParticle()
Определения Object.c:756
void SetBeingBackstabbed(int backstabType)
Определения Object.c:716
proto native vector GetBonePositionMS(int pivot)
bool IsStaticTransmitter()
Returns if this entity is Static Transmitter.
Определения Object.c:547
proto native vector GetDirectionUp()
Retrieve direction up vector.
proto native int GetNumberOfHealthLevels(string zone="")
Returns global number of health levels specified in object's config class parameter healthLevels (ran...
proto native void CreateDynamicPhysics(int interactionLayers)
bool PlaySoundSetAtMemoryPointLooped(out EffectSound sound, string soundSet, string memoryPoint, float play_fade_in=0, float stop_fade_out=0)
Определения Object.c:1284
void RPC(int rpc_type, array< ref Param > params, bool guaranteed, PlayerIdentity recipient=NULL)
Remote procedure call shortcut, see CGame.RPC / CGame.RPCSingleParam.
Определения Object.c:840
bool CanBeActionTarget()
Определения Object.c:1406
proto native void GetBoneTransformLS(int pivot, out vector transform[4])
returns local space, model space, world space transformations of a bone
proto native vector GetBoundingCenter()
proto native vector GetMemoryPointPos(string memoryPointName)
proto native void DecreaseHealth(string zoneName, string healthType, float value)
Decreases health.
bool CanBeRepairedToPristine()
Определения Object.c:1352
proto native float GetCollisionRadius()
Gets collision radius (bounding sphere)
EntityAI ProcessMeleeItemDamage(int mode=0)
Определения Object.c:1350
bool IsElectricAppliance()
Returns if this is an appliance, that can be plugged into electric circuit (== not energy source)
Определения Object.c:688
proto native vector GetModelSpeed()
Retrieve object's speed in local space.
proto native vector GetGlobalPos(vector vPos)
Calculate global position to this entity from local position.
Определения EnEntity.c:165
LOD class.
Определения gameplay.c:204
Определения EnMath3D.c:28
Определения EnMath.c:7
Определения ObjectTyped.c:2
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Определения param.c:12
The class that will be instanced (moddable)
Определения gameplay.c:389
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.
Определения EffectManager.c:228
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.
Определения EffectManager.c:247
Manager class for managing Effect (EffectParticle, EffectSound)
Определения EffectManager.c:6
Определения ScriptedEntity.c:13
Определения DamageSystem.c:2
Определения EnWidgets.c:190
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Определения EnConvert.c:119
Serializer ParamsReadContext
Определения gameplay.c:15
enum ShapeType ErrorEx
proto native void SetPosition(vector position)
Set the world position of the Effect.
Определения Effect.c:463
proto native void SetDirection(vector direction)
ShapeFlags
Определения EnDebug.c:126
class DiagMenu Shape
don't call destructor directly. Use Destroy() instead
array< float > TFloatArray
Определения EnScript.c:713
array< string > TStringArray
Определения EnScript.c:712
array< int > TIntArray
Определения EnScript.c:714
proto external void GetTransform(out vector mat[])
Returns transformation of Entity. It returns only so much vectors as array is big.
proto native external float GetScale()
const int LIQUID_NONE
Определения 3_Game/DayZ/constants.c:532
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto void MatrixInvMultiply4(vector mat0[4], vector mat1[4], out vector res[4])
Invert-transforms matrix.
static proto void MatrixOrthogonalize4(vector mat[4])
Orthogonalizes 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.
Определения Effect.c:473
proto int ToLower()
Changes string to lowercase. Returns length.
const int CALL_CATEGORY_SYSTEM
Определения 3_Game/DayZ/tools/tools.c:8
proto native void AddChild(Widget child, bool immedUpdate=true)
proto native void SetTransform(vector mat[4], bool immedUpdate=true)