DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
Object.c
Go to the documentation of this file.
2{
7}
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 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).Call(GetGame().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
127 {
129 }
130
133 {
135 }
136
139 {
141 }
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 ( GetGame().IsServer() )
153 {
154 SynchExplosion();
155 DamageSystem.ExplosionDamage(EntityAI.Cast(this), null, ammoType, GetPosition(), damageType);
156 }
157 }
158
160 {
161 if ( GetGame().IsDedicatedServer() ) // Multiplayer server
162 {
163 Param1<EntityAI> p = new Param1<EntityAI>(null);
164 GetGame().RPCSingleParam( this, ERPCs.RPC_EXPLODE_EVENT, p, true);
165 }
166 else if ( !GetGame().IsMultiplayer() ) // Singleplayer
167 {
168 OnExplodeClient();
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 native bool ToDelete();
205
209 proto native bool IsPendingDeletion();
210
212 proto native int GetGeometryLevel();
213 proto native int GetFireGeometryLevel();
214 proto native int GetViewGeometryLevel();
215
216#ifdef DEVELOPER
218 proto bool ToBonePivot(out int pivot, int level, int bone);
219 proto bool FromBonePivot(int pivot, out int level, out int bone);
220#endif
221
223 proto int GetBonePivot(int level, int component);
224
226 proto native vector GetBonePositionLS(int pivot);
227 proto native vector GetBonePositionMS(int pivot);
228 proto native vector GetBonePositionWS(int pivot);
229
231 proto native void GetBoneRotationLS(int pivot, out float quaternion[4]);
232 proto native void GetBoneRotationMS(int pivot, out float quaternion[4]);
233 proto native void GetBoneRotationWS(int pivot, out float quaternion[4]);
234
236 proto native void GetBoneTransformLS(int pivot, out vector transform[4]);
237 proto native void GetBoneTransformMS(int pivot, out vector transform[4]);
238 proto native void GetBoneTransformWS(int pivot, out vector transform[4]);
239
246 proto native void GetTightlyPackedCorners(ETransformationAxis axis, out vector corners[4]);
247
248#ifdef DIAG_DEVELOPER
249 void DebugDrawTightlyPackedCorners(ETransformationAxis axis, int color)
250 {
251#ifndef SERVER
252 vector points[2];
253 vector corners[4];
254
255 GetTightlyPackedCorners(axis, corners);
256
257 points[0] = corners[0];
258 points[1] = corners[1];
259 Shape.CreateLines(color, ShapeFlags.TRANSP | ShapeFlags.ONCE | ShapeFlags.NOOUTLINE | ShapeFlags.NOZBUFFER, points, 2);
260
261 points[0] = corners[1];
262 points[1] = corners[3];
263 Shape.CreateLines(color, ShapeFlags.TRANSP | ShapeFlags.ONCE | ShapeFlags.NOOUTLINE | ShapeFlags.NOZBUFFER, points, 2);
264
265 points[0] = corners[3];
266 points[1] = corners[2];
267 Shape.CreateLines(color, ShapeFlags.TRANSP | ShapeFlags.ONCE | ShapeFlags.NOOUTLINE | ShapeFlags.NOZBUFFER, points, 2);
268
269 points[0] = corners[2];
270 points[1] = corners[0];
271 Shape.CreateLines(color, ShapeFlags.TRANSP | ShapeFlags.ONCE | ShapeFlags.NOOUTLINE | ShapeFlags.NOZBUFFER, points, 2);
272#endif
273 }
274#endif
275
277 proto native vector GetPosition();
278
281 proto native vector GetWorldPosition();
282
284 proto native void SetPosition(vector vPos);
285
289 proto native void PlaceOnSurface();
290
295 proto native vector GetOrientation();
296
301 proto native void SetOrientation(vector vOrientation);
302
304 proto native vector GetDirection();
305
311 proto native void SetDirection(vector vPos);
312
314 proto native vector GetDirectionUp();
315
317 proto native vector GetDirectionAside();
318
320 proto native vector GetLocalPos(vector vPos);
322 proto native vector GetGlobalPos(vector vPos);
323
325 proto native vector GetSpeed();
326
328 proto native vector GetModelSpeed();
329
331 proto native bool CanAffectPathgraph();
332
334 proto native void SetAffectPathgraph(bool fromConfig, bool affect);
335
336
348 proto float ClippingInfo(out vector minMax[2]);
349
360 proto native bool GetCollisionBox(out vector minMax[2]);
361
366 proto native float GetCollisionRadius();
367
369 proto native float GetDamage();
370
371
372 proto native void GetSelectionList(out TStringArray selectionList);
373
376 {
377 vector position = GetPosition();
378 return GetGame().SurfaceGetNoiseMultiplier(NULL, position, -1);
379 }
380
383 {
384 string surface_type;
385 int liquid_type;
386
387 GetGame().SurfaceUnderObject(this, surface_type,liquid_type);
388// Print(surface_type);
389// Print(liquid_type);
390
391 return surface_type;
392 }
393
395 bool HasSelection( string selection )
396 {
397 TStringArray selections = new TStringArray;
398 GetSelectionList( selections );
399
400 for ( int i = 0; i < selections.Count(); ++i )
401 {
402 if ( selections.Get( i ) == selection )
403 {
404 return true;
405 }
406 }
407
408 return false;
409 }
410
412 bool HasAnimation( string anim_name )
413 {
414 string cfg_path_vehicles = "CfgVehicles " + GetType() + " ";
415 if ( GetGame().ConfigIsExisting (cfg_path_vehicles) && GetGame().ConfigIsExisting (cfg_path_vehicles + "AnimationSources " + anim_name) )
416 {
417 return true;
418 }
419
420 string cfg_path_weapons = "CfgWeapons " + GetType() + " ";
421 if ( GetGame().ConfigIsExisting (cfg_path_weapons) && GetGame().ConfigIsExisting (cfg_path_weapons + "AnimationSources " + anim_name) )
422 {
423 return true;
424 }
425
426 string cfg_path_magazines = "CfgMagazines " + GetType() + " ";
427 if ( GetGame().ConfigIsExisting (cfg_path_magazines) && GetGame().ConfigIsExisting (cfg_path_magazines + "AnimationSources " + anim_name) )
428 {
429 return true;
430 }
431
432 return false;
433 }
434
436 /*bool HasEnergyManager()
437 {
438 return false;
439 }*/
440
441 proto native int GetMemoryPointIndex(string memoryPointName);
442 proto native vector GetMemoryPointPos(string memoryPointName);
443 proto native vector GetMemoryPointPosByIndex(int pointIndex);
444 proto native bool MemoryPointExists(string memoryPoint);
445
446 proto native void CreateDynamicPhysics(int interactionLayers);
447 proto native void EnableDynamicCCD(bool state);
448 proto native void SetDynamicPhysicsLifeTime(float lifeTime);
449
451 void OnTreeCutDown( EntityAI cutting_entity )
452 {
453
454 }
455
457 string GetType()
458 {
459 string ret;
460 GetGame().ObjectGetType(this, ret);
461
462 return ret;
463 }
464
467// string GetName()
468 {
469 string tmp;
470 if (NameOverride(tmp))
471 {
472 tmp = Widget.TranslateString(tmp);
473 //tmp.ToUpper();
474 }
475 else
476 {
477 GetGame().ObjectGetDisplayName(this, tmp);
478 }
479 return tmp;
480 }
481
482 //Used to specify this object will always display it's own name when attached to another object
484 {
485 return false;
486 }
487
490 {
491 return GetGame().GetModelName(GetType());
492 }
493
494 proto native owned string GetShapeName();
495
497 {
498 return GetGame().ObjectRelease(this);
499 }
500
502 bool IsKindOf(string type)
503 {
504 return GetGame().ObjectIsKindOf(this, type);
505 }
506
507 // Check alive state
508 bool IsAlive()
509 {
510 return !IsDamageDestroyed();
511 }
512
514 bool IsMan()
515 {
516 return false;
517 }
518
521 {
522 return false;
523 }
524
527 {
528 return false;
529 }
530
533 {
534 return false;
535 }
536
539 {
540 return false;
541 }
542
545 {
546 return false;
547 }
548
549 //Returns true for protector cases and similar items. Usually can be nested in other cargo while full, unlike clothing..
551 {
552 return false;
553 }
554
557 {
558 return false;
559 }
560
563 {
564 return false;
565 }
566
569 {
570 return false;
571 }
572
575 {
576 return false;
577 }
578
581 {
582 return false;
583 }
584
586 bool IsTree()
587 {
588 return false;
589 }
590
592 bool IsRock()
593 {
594 return false;
595 }
596
599 {
600 return false;
601 }
602
604 bool IsBush()
605 {
606 return false;
607 }
608
610 {
611 return false;
612 }
613
616 {
617 return false;
618 }
619
621 bool IsWeapon()
622 {
623 return false;
624 }
625
628 {
629 return false;
630 }
631
634 {
635 return false;
636 }
637
639 {
640 return EWaterSourceObjectType.NONE;
641 }
642
645 bool IsWell()
646 {
647 return false;
648 }
650 bool ShootsExplosiveAmmo()//placed on Object so that we can optimize early checks in DayZGame without casting
651 {
652 return false;
653 }
654
657 {
658 return false;
659 }
660
663 {
664 return false;
665 }
666
669 {
670 return false;
671 }
672
675 {
676 return false;
677 }
678
681 {
682 return false;
683 }
684
687 {
688 return false;
689 }
690
692 {
693 return false;
694 }
695
696 void SetBeingBackstabbed(int backstabType){}
697
699 bool IsFood()
700 {
701 return ( IsFruit() || IsMeat() || IsCorpse() || IsMushroom() );
702 }
703
704 bool IsFruit()
705 {
706 return false;
707 }
708
709 bool IsMeat()
710 {
711 return false;
712 }
713
714 bool IsCorpse()
715 {
716 return false;
717 }
718
720 {
721 return false;
722 }
723
726 {
727 return true;
728 }
729
732 {
733 return false;
734 }
735
737 {
738 return false;
739 }
740
742 {
743 return false;
744 }
745
747 {
748 return false;
749 }
750
752 {
753 return false;
754 }
755
757 {
758 return false;
759 }
760
762 {
763 return IsPlainObject() && !IsScenery();
764 }
765
767 {
768 return HasProxyParts() || CanUseConstruction();
769 }
770
772 {
773 return IsBush() || IsTree() || IsMan() || IsDayZCreature() || IsItemBase();
774 }
775
777 {
778 return true;
779 }
780
783 {
784 return false;
785 }
786
789 proto void GetNetworkID( out int lowBits, out int highBits );
790
792 {
793 int low, high;
794 GetNetworkID( low, high );
795 return high.ToString() + low.ToString();
796 }
797
798 static string GetDebugName(Object o)
799 {
800 if (o)
801 return o.GetType() + ":" + o.GetNetworkIDString();
802 return "null";
803 }
804
806 proto string GetDebugNameNative();
807
809 void RPC(int rpc_type, array<ref Param> params, bool guaranteed, PlayerIdentity recipient = NULL)
810 {
811 GetGame().RPC(this, rpc_type, params, guaranteed, recipient);
812 }
813
815 void RPCSingleParam(int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient = NULL)
816 {
817 GetGame().RPCSingleParam(this, rpc_type, param, guaranteed, recipient);
818 }
819
825 void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx);
826
828 {
830 }
831
833 {
835 }
836
838 {
840 }
841
843 {
845 }
846
847
849 {
850 return GetGame().ObjectModelToWorld(this, modelPos);
851 }
852
854 {
855 return GetGame().ObjectWorldToModel(this, worldPos);
856 }
857
858 // config class API
859
860 proto string ConfigGetString(string entryName);
867 proto string ConfigGetStringRaw(string entryName);
868 proto int ConfigGetInt(string entryName);
869 bool ConfigGetBool(string entryName)
870 {
871 return (ConfigGetInt(entryName) == 1);
872 }
873
874 proto float ConfigGetFloat(string entryName);
875 proto vector ConfigGetVector(string entryName);
876 //proto ParamEntry ConfigGetEntry(string entryName);
877
883 proto native void ConfigGetTextArray(string entryName, out TStringArray values);
884
891 proto native void ConfigGetTextArrayRaw(string entryName, out TStringArray values);
892
898 proto native void ConfigGetFloatArray(string entryName, out TFloatArray values);
899
905 proto native void ConfigGetIntArray(string entryName, out TIntArray values);
906
911 proto native bool ConfigIsExisting(string entryName);
912
914 bool KindOf( string tag )
915 {
916 bool found = false;
917 string item_name = this.GetType();
918 TStringArray item_tag_array = new TStringArray;
919 ConfigGetTextArray("cfgVehicles " + item_name + " itemInfo", item_tag_array);
920
921 int array_size = item_tag_array.Count();
922 for (int i = 0; i < array_size; i++)
923 {
924 if ( item_tag_array.Get(i) == tag )
925 {
926 found = true;
927 break;
928 }
929 }
930 return found;
931 }
932
934 {
935 bool ret;
936 for( int i = 0; i < typenames.Count(); i++ )
937 {
938 ret = ret || this.IsInherited( typenames.Get(i) );
939 }
940 return ret;
941 }
942
946 proto native bool IsPlainObject();
947
951 proto native bool IsScenery();
952
953 // Damage system
957 proto native bool HasDamageSystem();
958
962 proto native bool IsDamageDestroyed();
963
968 proto native void SetDestructTime(float time);
969
975 proto native float GetHealth(string zoneName, string healthType);
976
982 proto native float GetHealth01(string zoneName, string healthType);
983
989 proto native float GetMaxHealth(string zoneName, string healthType);
990
996 proto native void SetHealth(string zoneName, string healthType, float value);
997
1001 proto native void SetFullHealth();
1002
1008 proto native void AddHealth(string zoneName, string healthType, float value);
1009
1015 proto native void DecreaseHealth(string zoneName, string healthType, float value);
1016
1022 void DecreaseHealth(string zoneName, string healthType, float value, bool auto_delete)
1023 {
1024 DecreaseHealth( zoneName, healthType, value);
1025
1026 float result_health = GetHealth(zoneName, healthType);
1027
1028 if ( auto_delete && result_health <= 0 )
1029 {
1030 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).Call(GetGame().ObjectDelete, this);
1031 }
1032 }
1033
1036 {
1037 return GetHealth("", "");
1038 }
1041 {
1042 return GetHealth01("", "");
1043 }
1046 {
1047 return GetMaxHealth("", "");
1048 }
1050 void SetHealth(float health)
1051 {
1052 SetHealth("", "", health);
1053 }
1055 void SetGlobalHealth(float health)
1056 {
1057 SetHealth("", "", health);
1058 }
1060 void SetHealthLevel(int healthLevel, string zone = "")
1061 {
1062 SetHealth01(zone,"", GetHealthLevelValue(healthLevel, zone));
1063 }
1065 void AddHealthLevel(int healthLevelDelta, string zone = "")
1066 {
1067 int maxHealthLevel = GetNumberOfHealthLevels(zone) - 1;
1068 int newHealthLevel = Math.Clamp(GetHealthLevel(zone) + healthLevelDelta,0,maxHealthLevel);
1069 SetHealthLevel(newHealthLevel,zone);
1070 }
1071
1073 void SetHealth01(string zoneName, string healthType, float coef)
1074 {
1075 SetHealth(zoneName,healthType,(GetMaxHealth(zoneName,healthType)*coef));
1076 }
1078 void SetHealthMax(string zoneName = "", string healthType = "")
1079 {
1080 SetHealth(zoneName,healthType,GetMaxHealth(zoneName,healthType));
1081 }
1083 void AddHealth( float add_health)
1084 {
1085 AddHealth("", "", add_health);
1086 }
1088 void DecreaseHealth(float dec_health, bool auto_delete = true)
1089 {
1090 DecreaseHealth("", "", dec_health, auto_delete);
1091 }
1093 void DecreaseHealthCoef(float dec_health_coef, bool auto_delete = true)
1094 {
1095 float current_health = GetHealth();
1096 float final_health_coef = GetHealth01() - dec_health_coef;
1097 float final_health = GetMaxHealth() * final_health_coef;
1098 DecreaseHealth("", "", current_health - final_health);
1099 }
1100
1111 proto native void ProcessDirectDamage(int damageType, EntityAI source, string componentName, string ammoName, vector modelPos, float damageCoef = 1.0, int flags = 0);
1112
1117 bool EEOnDamageCalculated(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
1118 {
1119 return true;
1120 }
1121
1126 proto native void GetDamageZones(out TStringArray dmgZones);
1127
1132 proto native vector GetDamageZonePos(string zoneName);
1137 proto native owned string GetDamageZoneNameByComponentIndex(int componentIndex);
1138
1144 proto native int GetHealthLevel(string zone = "");
1145
1151 proto native int GetNumberOfHealthLevels(string zone = "");
1152
1158 proto native float GetHealthLevelValue(int healthLevel, string zone = "");
1159
1160
1164 proto native bool GetAllowDamage();
1169 proto native void SetAllowDamage(bool val);
1170
1174 proto native bool GetCanBeDestroyed();
1175
1180 proto native void SetCanBeDestroyed(bool val);
1181
1193 {
1194 return IsDamageDestroyed();
1195 }
1196
1199
1202
1203 void GetActions(typename action_input_type, out array<ActionBase_Basic> actions)
1204 {
1205 }
1206
1208 SoundOnVehicle PlaySound(string sound_name, float range, bool create_local = true)
1209 {
1210 return GetGame().CreateSoundOnObject(this, sound_name, range, false, create_local);
1211 }
1212
1214 SoundOnVehicle PlaySoundLoop(string sound_name, float range, bool create_local = true)
1215 {
1216 return GetGame().CreateSoundOnObject(this, sound_name, range, true, create_local);
1217 }
1218
1220 bool PlaySoundSet( out EffectSound sound, string sound_set, float fade_in, float fade_out, bool loop = false )
1221 {
1222 if ( GetGame() && !GetGame().IsDedicatedServer() )
1223 {
1224 if ( sound )
1225 {
1226 if ( loop )
1227 {
1228 return true;
1229 }
1230 else
1231 {
1232 StopSoundSet( sound ); //auto stop for non-looped sounds
1233 }
1234 }
1235
1236 sound = SEffectManager.PlaySoundOnObject( sound_set, this, fade_in, fade_out, loop );
1237 sound.SetAutodestroy( true );
1238
1239 return true;
1240 }
1241
1242 return false;
1243 }
1244
1246 bool PlaySoundSetLoop( out EffectSound sound, string sound_set, float fade_in, float fade_out )
1247 {
1248 return PlaySoundSet( sound, sound_set, fade_in, fade_out, true );
1249 }
1250
1252 bool PlaySoundSetAtMemoryPointLoopedSafe(out EffectSound sound, string soundSet, string memoryPoint,float play_fade_in = 0, float stop_fade_out = 0)
1253 {
1254 if (sound && sound.IsPlaying())
1255 {
1256 sound.SoundStop();
1257 }
1258 return PlaySoundSetAtMemoryPointLooped(sound, soundSet, memoryPoint, play_fade_in, stop_fade_out);
1259 }
1260
1261 bool PlaySoundSetAtMemoryPointLooped(out EffectSound sound, string soundSet, string memoryPoint, float play_fade_in = 0, float stop_fade_out = 0)
1262 {
1263 return PlaySoundSetAtMemoryPoint(sound, soundSet, memoryPoint, true, play_fade_in, stop_fade_out);
1264 }
1265
1266
1267 bool PlaySoundSetAtMemoryPoint(out EffectSound sound, string soundSet, string memoryPoint, bool looped = false, float play_fade_in = 0, float stop_fade_out = 0)
1268 {
1269 vector pos;
1270
1271 if (MemoryPointExists(memoryPoint))
1272 {
1273 pos = GetMemoryPointPos(memoryPoint);
1274 pos = ModelToWorld(pos);
1275 }
1276 else
1277 {
1278 ErrorEx(string.Format("Memory point %1 not found when playing soundset %2 at memory point location", memoryPoint, soundSet));
1279 return false;
1280 }
1281
1282 sound = SEffectManager.PlaySoundEnviroment(soundSet, pos, play_fade_in, stop_fade_out, looped);
1283 return true;
1284 }
1285
1287 bool StopSoundSet( out EffectSound sound )
1288 {
1289 if ( sound && GetGame() && ( !GetGame().IsDedicatedServer() ) )
1290 {
1291 sound.SoundStop();
1292 sound = null;
1293
1294 return true;
1295 }
1296
1297 return false;
1298 }
1299
1302
1305
1307 {
1308 int lo = 0;
1309 int hi = 0;
1310 GetNetworkID(lo, hi);
1311 return lo | hi;
1312 }
1313
1314 bool NameOverride(out string output)
1315 {
1316 return false;
1317 }
1318
1319 bool DescriptionOverride(out string output)
1320 {
1321 return false;
1322 }
1323
1325
1327 {
1328 return false;
1329 }
1330
1332 {
1333 if ( MemoryPointExists("ce_center") )
1334 {
1335 //Print("CE_CENTER found");
1336 return ModelToWorld( GetMemoryPointPos("ce_center") );
1337 }
1338 else
1339 {
1340 //Print("CE_CENTER DOING A BAMBOOZLE => not found");
1341 return GetPosition() + Vector(0, 0.2, 0);
1342 }
1343 }
1344
1345 #ifdef DEVELOPER
1346 void SetDebugItem();
1347 #endif
1348
1349 void AddArrow(Object arrow, int componentIndex, vector closeBonePosWS, vector closeBoneRotWS)
1350 {
1351 int pivot = GetBonePivot(GetFireGeometryLevel(), componentIndex);
1352 vector parentTransMat[4];
1353 vector arrowTransMat[4];
1354
1355 if (pivot == -1)
1356 {
1357 GetTransform(parentTransMat);
1358 }
1359 else
1360 {
1361 GetBoneTransformWS(pivot, parentTransMat);
1362 }
1363
1364 float scale = GetScale();
1365 scale = 1 / (scale * scale);
1366
1367 arrow.GetTransform(arrowTransMat);
1368 Math3D.MatrixInvMultiply4(parentTransMat, arrowTransMat, arrowTransMat);
1369
1370 // orthogonalize matrix - parent might be skewed
1371 Math3D.MatrixOrthogonalize4(arrowTransMat);
1372
1373 arrowTransMat[3] = arrowTransMat[3] * scale;
1374
1375 arrow.SetTransform(arrowTransMat);
1376
1377 AddChild(arrow, pivot);
1378 }
1379
1381 {
1382 return !IsHologram();
1383 }
1384 //Debug
1385 //----------------------------------------------
1386 /*void DbgAddPxyPhy(string slot)
1387 {
1388 Print("AddProxyPhysics slot: " + slot);
1389 AddProxyPhysics(slot);
1390 }*/
1391};
eBleedingSourceType GetType()
protected bool IsDamageDestroyed(ActionTarget target)
Definition ActionBase.c:912
override bool CanUseConstruction()
override bool IsDayZCreature()
Definition DayZAnimal.c:55
ERPCs
Definition ERPCs.c:2
ETransformationAxis
EWaterSourceObjectType
override bool IsCorpse()
override bool IsMushroom()
override bool IsFruit()
override bool IsMeat()
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
override bool IsHologram()
Definition ItemBase.c:5556
override bool IsItemBase()
Definition ItemBase.c:7150
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
string name
class JsonUndergroundAreaTriggerData GetPosition
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
proto void SurfaceUnderObject(notnull Object object, out string type, out int liquidType)
proto native vector ObjectGetSelectionPosition(Object obj, string name)
proto native vector ObjectGetSelectionPositionWS(Object obj, string name)
proto native vector ObjectWorldToModel(Object obj, vector worldPos)
proto native void RPC(Object target, int rpcType, notnull array< ref Param > params, bool guaranteed, PlayerIdentity recipient=null)
Initiate remote procedure call. When called on client, RPC is evaluated on server; When called on ser...
proto native vector ObjectGetSelectionPositionMS(Object obj, string name)
string GetModelName(string class_name)
Get name of the p3d file of the given class name.
Definition Game.c:464
proto native SoundOnVehicle CreateSoundOnObject(Object source, string sound_name, float distance, bool looped, bool create_local=false)
override ScriptCallQueue GetCallQueue(int call_category)
Definition DayZGame.c:1153
proto native float SurfaceGetNoiseMultiplier(Object directHit, vector pos, int componentIndex)
proto native vector ObjectGetSelectionPositionLS(Object obj, string name)
void RPCSingleParam(Object target, int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=null)
see CGame.RPC
Definition Game.c:882
bool ObjectIsKindOf(Object object, string cfg_parent_name)
Returns is object inherited from parent class name.
Definition Game.c:1290
proto native int ObjectRelease(Object obj)
RemoteObjectTreeCreate - postponed registration of network object tree (and creation of remote object...
proto void ObjectGetType(Object obj, out string type)
proto native vector ObjectModelToWorld(Object obj, vector modelPos)
proto void ObjectGetDisplayName(Object obj, out string name)
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)
bool IsEntityAI()
Returns if this entity is EntityAI.
Definition Object.c:526
bool IsRock()
Returns if this entity is rock.
Definition Object.c:592
bool IsAmmoPile()
Returns if this entity is Ammo Pile.
Definition Object.c:562
proto native int GetFireGeometryLevel()
void AddArrow(Object arrow, int componentIndex, vector closeBonePosWS, vector closeBoneRotWS)
Definition Object.c:1349
proto native void SetHealth(string zoneName, string healthType, float value)
Sets current state of health.
bool IsAnyInherited(array< typename > typenames)
Definition Object.c:933
proto native bool IsDamageDestroyed()
Checks if object is destroyed.
proto void GetNetworkID(out int lowBits, out int highBits)
void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
Called after remote procedure call is recieved for this object.
proto native bool GetAllowDamage()
Returns if object can receive damage.
bool IsBuilding()
Returns if this entity is Building.
Definition Object.c:633
float GetHealth01()
Equivalent of GetHealth01("", "");.
Definition Object.c:1040
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:621
bool IsHealthVisible()
Returns if the health of this entity should be displayed (widgets, inventory)
Definition Object.c:725
void SetHealth01(string zoneName, string healthType, float coef)
Sets health relative to its maximum.
Definition Object.c:1073
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:1214
proto float ClippingInfo(out vector minMax[2])
Get Clipping info.
bool IsBeingBackstabbed()
Definition Object.c:691
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:1246
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:914
proto native bool ConfigIsExisting(string entryName)
Checks if given entry exists.
proto float ConfigGetFloat(string entryName)
EntityAI ProcessMeleeItemDamage(int mode=0)
Definition Object.c:1324
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:457
bool IsInventoryItem()
Returns if this entity is InventoryItem.
Definition Object.c:568
vector GetSelectionPositionMS(string name)
Definition Object.c:837
void SetHealthMax(string zoneName="", string healthType="")
Sets health to its maximum (zone or global)
Definition Object.c:1078
bool IsBush()
Returns if this entity is bush.
Definition Object.c:604
bool IsCorpse()
Definition Object.c:714
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 native void SetCanBeDestroyed(bool val)
Enable or disable destruction of object (after health is depleated)
bool ConfigGetBool(string entryName)
Definition Object.c:869
bool IsFuelStation()
Returns if this entity is Fuel Station (extends Building)
Definition Object.c:656
bool ShootsExplosiveAmmo()
Returns if this entity is a weapon which can shoot explosive ammo.
Definition Object.c:650
vector WorldToModel(vector worldPos)
Definition Object.c:853
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:375
void SynchExplosion()
Definition Object.c:159
proto native void GetSelectionList(out TStringArray selectionList)
proto native bool IsPlainObject()
Is this just static object without config? So we can avoid calling unnecessary methods.
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:1331
bool IsFood()
Returns if this entity if a food item.
Definition Object.c:699
void SetGlobalHealth(float health)
Equivalent of SetHealth("", "", float value);.
Definition Object.c:1055
proto native float GetCollisionRadius()
Gets collision radius (bounding sphere)
bool HasProxyParts()
Definition Object.c:756
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:1208
proto native vector GetGlobalPos(vector vPos)
Calculate global position to this entity from local position.
bool HasAnimation(string anim_name)
Searches object's config for the given animation name. Returns true if it was found,...
Definition Object.c:412
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:809
LOD GetLODByName(string name)
Retrieve LOD by given name.
Definition Object.c:106
float GetHealth()
Equivalent of GetHealth("", "");.
Definition Object.c:1035
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:1050
void GetActions(typename action_input_type, out array< ActionBase_Basic > actions)
Definition Object.c:1203
void SetBeingBackstabbed(int backstabType)
Definition Object.c:696
bool CanObstruct()
Definition Object.c:761
bool DescriptionOverride(out string output)
Definition Object.c:1319
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:520
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:627
proto native bool MemoryPointExists(string memoryPoint)
proto int GetBonePivot(int level, int component)
Get the pivot point of the bone from the component index in the LOD, lvel can be geometry,...
proto native void GetBoneTransformWS(int pivot, out vector transform[4])
void OnPlayerRecievedHit()
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:1261
proto native vector GetWorldPosition()
bool DisableVicinityIcon()
Disables icon in the vicinity, useful for large, immovable items, that are not buildings.
Definition Object.c:782
proto native bool HasDamageSystem()
Checks if object's DamageSystem has been initialized(despite the name, does not really reliably answe...
bool IsFireplace()
Returns if this entity is fireplacebase.
Definition Object.c:580
proto native void SetPosition(vector vPos)
Set position.
proto int ConfigGetInt(string entryName)
bool IsWell()
Definition Object.c:645
vector GetSelectionPositionLS(string name)
Definition Object.c:832
vector ModelToWorld(vector modelPos)
Definition Object.c:848
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:1192
bool IsClothing()
Returns if this entity is Clothing.
Definition Object.c:574
void SpawnDamageDealtEffect()
bool IsWoodBase()
Returns whether object is PlanBase.
Definition Object.c:598
bool StopSoundSet(out EffectSound sound)
EffectSound - stops soundset and returns state of the sound (true - stopped, false - not playing)
Definition Object.c:1287
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 IsElectricAppliance()
Returns if this is an appliance, that can be plugged into electric circuit (== not energy source)
Definition Object.c:668
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:532
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:1022
proto native bool IsScenery()
Is this Scenery? (handy for excluding terain when it is not needed)
bool IsTransmitter()
Returns if this entity is a non-static Transmitter.
Definition Object.c:538
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:1326
bool IsMagazine()
Returns if this entity is Magazine.
Definition Object.c:556
proto string ConfigGetString(string entryName)
EWaterSourceObjectType GetWaterSourceObjectType()
Definition Object.c:638
private void Object()
bool CanUseHandConstruction()
Returns if this entity can be constructed without tools.
Definition Object.c:686
void OnSimulationDisabled()
Event called from C++ when simulation is disabled.
Definition Object.c:1201
bool CanBeActionTarget()
Definition Object.c:1380
void RPCSingleParam(int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=NULL)
Remote procedure call shortcut, see CGame.RPCSingleParam / CGame.RPC.
Definition Object.c:815
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:1252
proto native vector GetBonePositionLS(int pivot)
returns local space, model space, world space position of the bone
bool IsParticle()
Definition Object.c:736
proto native void EnableDynamicCCD(bool state)
bool CanProxyObstruct()
Definition Object.c:766
bool CanBeAutoDeleted()
Definition Object.c:776
proto native owned string GetShapeName()
static string GetDebugName(Object o)
Definition Object.c:798
vector GetSelectionPositionOld(string name)
Definition Object.c:827
proto native bool IsPendingDeletion()
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:791
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:1220
bool IsScriptedLight()
Definition Object.c:746
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 ...
Definition Object.c:451
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:719
bool IsFruit()
Definition Object.c:704
proto native void GetBoneTransformMS(int pivot, out vector transform[4])
proto native vector GetMemoryPointPosByIndex(int pointIndex)
bool IsContainer()
Definition Object.c:550
void Delete()
Delete this object in next frame.
Definition Object.c:82
string GetSurfaceType()
Returns type of surface under object.
Definition Object.c:382
bool ShowZonesHealth()
Returns true if the health of damage zones should be displayed (instead of global HP of the entity) (...
Definition Object.c:731
proto native void RemoveProxyPhysics(string proxySelectionName)
bool IsItemTent()
Definition Object.c:741
private void ~Object()
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:544
proto native int GetViewGeometryLevel()
bool IsPeltBase()
Returns if this entity is Pelt_Base.
Definition Object.c:615
bool IsHologram()
Definition Object.c:751
string GetModelName()
Returns name of the model of this object without the '.p3d' suffix.
Definition Object.c:489
bool IsKindOf(string type)
Check config class name of the object.
Definition Object.c:502
bool IsCuttable()
Definition Object.c:609
bool NameOverride(out string output)
Definition Object.c:1314
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:1267
bool IsTransport()
Returns if this entity is transport.
Definition Object.c:662
proto native vector GetDirectionUp()
Retrieve direction up vector.
proto native vector GetBoundingCenter()
void DecreaseHealth(float dec_health, bool auto_delete=true)
Equivalent of DecreaseHealth("", "", float value, bool auto_delete);.
Definition Object.c:1088
proto native float GetMaxHealth(string zoneName, string healthType)
Returns maximum value of health.
vector GetSelectionPositionWS(string name)
Definition Object.c:842
bool IsMeat()
Definition Object.c:709
void OnSimulationEnabled()
Event called from C++ when simulation is enabled.
Definition Object.c:1198
bool IsTree()
Returns if this entity is tree.
Definition Object.c:586
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:1093
bool CanBeIgnoredByDroppedItem()
Definition Object.c:771
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:674
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:1083
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:1117
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:1060
bool IsMan()
Returns if this entity is Man.
Definition Object.c:514
bool IsAlive()
Definition Object.c:508
TStringArray GetHiddenSelections()
Returns the hiddenSelections array from the object's config.
Definition Object.c:126
bool HasNetworkID()
Definition Object.c:1306
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:395
int Release()
Definition Object.c:496
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:483
float GetMaxHealth()
Equivalent of GetMaxHealth("", "");.
Definition Object.c:1045
bool CanUseConstructionBuild()
Returns if this entity can be built, specifically.
Definition Object.c:680
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:1065
proto native void CreateDynamicPhysics(int interactionLayers)
proto native void PlaceOnSurface()
Place object on surface.
string GetDisplayName()
Get display name of entity.
Definition Object.c:466
proto native vector GetDirectionAside()
Retrieve direction aside vector.
LOD class.
Definition gameplay.c:203
Definition EnMath.c:7
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
The class that will be instanced (moddable)
Definition gameplay.c:378
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.
proto void Call(func fn, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
Serialization general interface. Serializer API works with:
Definition Serializer.c:56
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
enum ShapeType ErrorEx
ShapeFlags
Definition EnDebug.c:126
class DiagMenu Shape
don't call destructor directly. Use Destroy() instead
array< string > TStringArray
Definition EnScript.c:685
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'.
proto int ToLower()
Changes string to lowercase. Returns length.
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8
proto native void AddChild(Widget child, bool immedUpdate=true)