9class ObjectSnapCallback
87 proto native
void AddProxyPhysics(
string proxySelectionName);
89 proto native
void RemoveProxyPhysics(
string proxySelectionName);
98 proto native
bool GetLODS(notnull out
array<LOD> lods);
101 proto native owned
string GetLODName(
LOD lod);
103 proto native
vector GetBoundingCenter();
106 LOD GetLODByName(
string name )
111 for (
int i = 0; i < lods.Count(); ++i )
113 string lod_name = GetLODName( lods.Get( i ) );
116 if ( lod_name ==
name )
118 return lods.Get( i );
144 void Explode(
int damageType,
string ammoType =
"")
147 ammoType = ConfigGetString(
"ammoType");
150 ammoType =
"Dummy_Heavy";
155 DamageSystem.ExplosionDamage(
EntityAI.Cast(
this), null, ammoType,
GetPosition(), damageType);
159 void SynchExplosion()
161 if (
GetGame().IsDedicatedServer() )
163 Param1<EntityAI> p =
new Param1<EntityAI>(null);
164 GetGame().RPCSingleParam(
this,
ERPCs.RPC_EXPLODE_EVENT, p,
true);
166 else if ( !
GetGame().IsMultiplayer() )
173 void OnExplodeClient()
175 string ammoType = ConfigGetString(
"ammoType");
178 ammoType =
"Dummy_Heavy";
192 proto native owned
string GetActionComponentName(
int componentIndex,
string geometry =
"");
195 proto native owned
vector GetActionComponentPosition(
int componentIndex,
string geometry =
"");
198 proto native owned
int GetActionComponentNameList(
int componentIndex,
TStringArray nameList,
string geometry =
"");
201 proto native
bool IsActionComponentPartOfSelection(
int componentIndex,
string selectionName,
string geometry =
"");
204 proto
void GetActionComponentsForSelectionName(
int level,
string selectionName,
TIntArray componentIndices);
207 proto
vector GetActionComponentCenter(
int level,
int componentIndex);
210 proto
vector GetActionComponentCenterOOB(
int level,
int componentIndex);
213 proto
void GetActionComponentMinMax(
int level,
int componentIndex, out
vector min, out
vector max);
216 proto native
bool ToDelete();
224 proto native
int GetGeometryLevel();
225 proto native
int GetFireGeometryLevel();
226 proto native
int GetViewGeometryLevel();
227 proto native
int GetMemoryLevel();
231 proto
bool ToBonePivot(out
int pivot,
int level,
int bone);
232 proto
bool FromBonePivot(
int pivot, out
int level, out
int bone);
236 proto
int GetBonePivot(
int level,
int component);
239 proto native
void GetBonePivotsForAnimationSource(
int level,
string animationSource, out
TIntArray pivots);
242 proto native
vector GetBonePositionLS(
int pivot);
243 proto native
vector GetBonePositionMS(
int pivot);
244 proto native
vector GetBonePositionWS(
int pivot);
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]);
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]);
271 GetTightlyPackedCorners(axis, corners);
273 points[0] = corners[0];
274 points[1] = corners[1];
277 points[0] = corners[1];
278 points[1] = corners[3];
281 points[0] = corners[3];
282 points[1] = corners[2];
285 points[0] = corners[2];
286 points[1] = corners[0];
297 proto native
vector GetWorldPosition();
305 proto native
void PlaceOnSurface();
317 proto native
void SetOrientation(
vector vOrientation);
320 proto native
vector GetDirection();
330 proto native
vector GetDirectionUp();
333 proto native
vector GetDirectionAside();
344 proto native
vector GetModelSpeed();
347 proto native
bool CanAffectPathgraph();
350 proto native
void SetAffectPathgraph(
bool fromConfig,
bool affect);
364 proto
float ClippingInfo(out
vector minMax[2]);
376 proto native
bool GetCollisionBox(out
vector minMax[2]);
382 proto native
float GetCollisionRadius();
385 proto native
float GetDamage();
388 proto native
void GetSelectionList(out
TStringArray selectionList);
391 float GetSurfaceNoise()
398 string GetSurfaceType()
411 bool HasSelection(
string selection )
414 GetSelectionList( selections );
416 for (
int i = 0; i < selections.Count(); ++i )
418 if ( selections.Get( i ) == selection )
428 bool HasAnimation(
string anim_name )
430 string cfg_path_vehicles =
"CfgVehicles " +
GetType() +
" ";
431 if (
GetGame().ConfigIsExisting (cfg_path_vehicles) &&
GetGame().ConfigIsExisting (cfg_path_vehicles +
"AnimationSources " + anim_name) )
436 string cfg_path_weapons =
"CfgWeapons " +
GetType() +
" ";
437 if (
GetGame().ConfigIsExisting (cfg_path_weapons) &&
GetGame().ConfigIsExisting (cfg_path_weapons +
"AnimationSources " + anim_name) )
442 string cfg_path_magazines =
"CfgMagazines " +
GetType() +
" ";
443 if (
GetGame().ConfigIsExisting (cfg_path_magazines) &&
GetGame().ConfigIsExisting (cfg_path_magazines +
"AnimationSources " + anim_name) )
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);
462 proto native
void CreateDynamicPhysics(
int interactionLayers);
463 proto native
void EnableDynamicCCD(
bool state);
464 proto native
void SetDynamicPhysicsLifeTime(
float lifeTime);
467 void OnTreeCutDown(
EntityAI cutting_entity);
473 GetGame().ObjectGetType(
this, ret);
479 string GetDisplayName()
482 if (NameOverride(tmp))
484 tmp = Widget.TranslateString(tmp);
488 GetGame().ObjectGetDisplayName(
this, tmp);
494 bool DisplayNameRuinAttach()
500 string GetModelName()
506 proto native owned
string GetShapeName();
510 return GetGame().ObjectRelease(
this);
514 bool IsKindOf(
string type)
522 return !IsDamageDestroyed();
544 bool IsStaticTransmitter()
580 bool IsInventoryItem()
655 int GetLiquidSourceType()
685 bool IsElectricAppliance()
703 bool CanUseHandConstruction()
708 bool IsBeingBackstabbed()
713 void SetBeingBackstabbed(
int backstabType){}
742 bool IsHealthVisible()
763 bool IsScriptedLight()
780 return IsPlainObject() && !IsScenery();
783 bool CanProxyObstruct()
789 bool CanProxyObstructSelf()
794 bool CanBeIgnoredByDroppedItem()
799 bool CanBeAutoDeleted()
812 proto
void GetNetworkID( out
int lowBits, out
int highBits );
814 string GetNetworkIDString()
817 GetNetworkID( low, high );
818 return high.ToString() + low.ToString();
829 return o.GetDebugName();
839 GetGame().RPC(
this, rpc_type, params, guaranteed, recipient);
843 void RPCSingleParam(
int rpc_type,
Param param,
bool guaranteed,
PlayerIdentity recipient = NULL)
845 GetGame().RPCSingleParam(
this, rpc_type, param, guaranteed, recipient);
855 proto
vector GetSelectionPositionOld(
string name);
856 proto
vector GetSelectionPositionLS(
string name);
857 proto
vector GetSelectionPositionMS(
string name);
858 proto
vector GetSelectionPositionWS(
string name);
864 proto
vector GetSelectionBasePositionLS(
string name);
871 proto
string ConfigGetString(
string entryName);
878 proto
string ConfigGetStringRaw(
string entryName);
879 proto
int ConfigGetInt(
string entryName);
880 bool ConfigGetBool(
string entryName)
882 return (ConfigGetInt(entryName) == 1);
885 proto
float ConfigGetFloat(
string entryName);
886 proto
vector ConfigGetVector(
string entryName);
894 proto native
void ConfigGetTextArray(
string entryName, out
TStringArray values);
902 proto native
void ConfigGetTextArrayRaw(
string entryName, out
TStringArray values);
909 proto native
void ConfigGetFloatArray(
string entryName, out
TFloatArray values);
916 proto native
void ConfigGetIntArray(
string entryName, out
TIntArray values);
922 proto native
bool ConfigIsExisting(
string entryName);
928 string item_name = this.
GetType();
930 ConfigGetTextArray(
"cfgVehicles " + item_name +
" itemInfo", item_tag_array);
932 int array_size = item_tag_array.Count();
933 for (
int i = 0; i < array_size; i++)
935 if ( item_tag_array.Get(i) == tag )
947 for(
int i = 0; i < typenames.Count(); i++ )
949 ret = ret || this.IsInherited( typenames.Get(i) );
957 proto native
bool IsPlainObject();
962 proto native
bool IsScenery();
968 proto native
bool HasDamageSystem();
973 proto native
bool IsDamageDestroyed();
979 proto native
void SetDestructTime(
float time);
986 proto native
float GetHealth(
string zoneName,
string healthType);
993 proto native
float GetHealth01(
string zoneName,
string healthType);
1000 proto native
float GetMaxHealth(
string zoneName,
string healthType);
1007 proto native
void SetHealth(
string zoneName,
string healthType,
float value);
1012 proto native
void SetFullHealth();
1019 proto native
void AddHealth(
string zoneName,
string healthType,
float value);
1026 proto native
void DecreaseHealth(
string zoneName,
string healthType,
float value);
1034 proto native
bool GetAdditionalHealthTypes(
string zoneName,
TStringArray outHealthTypes);
1041 void DecreaseHealth(
string zoneName,
string healthType,
float value,
bool auto_delete)
1043 DecreaseHealth(zoneName, healthType, value);
1047 float result_health = GetHealth(zoneName, healthType);
1048 if (result_health <= 0)
1056 return GetHealth(
"",
"");
1061 return GetHealth01(
"",
"");
1064 float GetMaxHealth()
1066 return GetMaxHealth(
"",
"");
1069 void SetHealth(
float health)
1071 SetHealth(
"",
"", health);
1074 void SetGlobalHealth(
float health)
1076 SetHealth(
"",
"", health);
1079 void SetHealthLevel(
int healthLevel,
string zone =
"")
1081 SetHealth01(zone,
"", GetHealthLevelValue(healthLevel, zone));
1084 void AddHealthLevel(
int healthLevelDelta,
string zone =
"")
1086 int maxHealthLevel = GetNumberOfHealthLevels(zone) - 1;
1087 int newHealthLevel =
Math.Clamp(GetHealthLevel(zone) + healthLevelDelta,0,maxHealthLevel);
1088 SetHealthLevel(newHealthLevel,zone);
1092 void SetHealth01(
string zoneName,
string healthType,
float coef)
1094 SetHealth(zoneName,healthType,(GetMaxHealth(zoneName,healthType)*coef));
1097 void SetHealthMax(
string zoneName =
"",
string healthType =
"")
1099 SetHealth(zoneName,healthType,GetMaxHealth(zoneName,healthType));
1102 void AddHealth(
float add_health)
1104 AddHealth(
"",
"", add_health);
1107 void DecreaseHealth(
float dec_health,
bool auto_delete =
true)
1109 DecreaseHealth(
"",
"", dec_health, auto_delete);
1112 void DecreaseHealthCoef(
float dec_health_coef,
bool auto_delete =
true)
1114 float current_health = GetHealth();
1115 float final_health_coef = GetHealth01() - dec_health_coef;
1116 float final_health = GetMaxHealth() * final_health_coef;
1117 DecreaseHealth(
"",
"", current_health - final_health);
1130 proto native
void ProcessDirectDamage(
int damageType,
EntityAI source,
string componentName,
string ammoName,
vector modelPos,
float damageCoef = 1.0,
int flags = 0);
1145 proto native
void GetDamageZones(out
TStringArray dmgZones);
1151 proto native
vector GetDamageZonePos(
string zoneName);
1156 proto native owned
string GetDamageZoneNameByComponentIndex(
int componentIndex);
1163 proto native
int GetHealthLevel(
string zone =
"");
1170 proto native
int GetNumberOfHealthLevels(
string zone =
"");
1177 proto native
float GetHealthLevelValue(
int healthLevel,
string zone =
"");
1183 proto native
bool GetAllowDamage();
1188 proto native
void SetAllowDamage(
bool val);
1193 proto native
bool GetCanBeDestroyed();
1199 proto native
void SetCanBeDestroyed(
bool val);
1213 return IsDamageDestroyed();
1217 void OnSimulationEnabled() {}
1220 void OnSimulationDisabled() {}
1227 SoundOnVehicle
PlaySound(
string sound_name,
float range,
bool create_local =
true)
1229 return GetGame().CreateSoundOnObject(
this, sound_name, range,
false, create_local);
1233 SoundOnVehicle PlaySoundLoop(
string sound_name,
float range,
bool create_local =
true)
1235 return GetGame().CreateSoundOnObject(
this, sound_name, range,
true, create_local);
1239 bool PlaySoundSet( out
EffectSound sound,
string sound_set,
float fade_in,
float fade_out,
bool loop =
false )
1251 StopSoundSet( sound );
1265 bool PlaySoundSetLoop( out
EffectSound sound,
string sound_set,
float fade_in,
float fade_out )
1267 return PlaySoundSet( sound, sound_set, fade_in, fade_out,
true );
1271 bool PlaySoundSetAtMemoryPointLoopedSafe(out
EffectSound sound,
string soundSet,
string memoryPoint,
float play_fade_in = 0,
float stop_fade_out = 0)
1273 if (sound && sound.IsPlaying())
1277 return PlaySoundSetAtMemoryPointLooped(sound, soundSet, memoryPoint, play_fade_in, stop_fade_out);
1280 bool PlaySoundSetAtMemoryPointLooped(out
EffectSound sound,
string soundSet,
string memoryPoint,
float play_fade_in = 0,
float stop_fade_out = 0)
1282 return PlaySoundSetAtMemoryPoint(sound, soundSet, memoryPoint,
true, play_fade_in, stop_fade_out);
1286 bool PlaySoundSetAtMemoryPoint(out
EffectSound sound,
string soundSet,
string memoryPoint,
bool looped =
false,
float play_fade_in = 0,
float stop_fade_out = 0)
1290 if (MemoryPointExists(memoryPoint))
1292 pos = GetMemoryPointPos(memoryPoint);
1293 pos = ModelToWorld(pos);
1297 ErrorEx(
string.Format(
"Memory point %1 not found when playing soundset %2 at memory point location", memoryPoint, soundSet));
1319 void PostAreaDamageActions();
1320 void PreAreaDamageActions();
1322 void SpawnDamageDealtEffect();
1323 void OnReceivedHit(ImpactEffectsData hitData);
1326 void OnPlayerRecievedHit();
1332 GetNetworkID(lo, hi);
1336 bool NameOverride(out
string output)
1341 bool DescriptionOverride(out
string output)
1346 EntityAI ProcessMeleeItemDamage(
int mode = 0) {}
1348 bool CanBeRepairedToPristine()
1355 if ( MemoryPointExists(
"ce_center") )
1358 return ModelToWorld( GetMemoryPointPos(
"ce_center") );
1368 void SetDebugItem();
1373 int pivot = GetBonePivot(GetFireGeometryLevel(), componentIndex);
1374 vector parentTransMat[4];
1379 GetTransform(parentTransMat);
1383 GetBoneTransformWS(pivot, parentTransMat);
1386 float scale = GetScale();
1387 scale = 1 / (scale * scale);
1389 arrow.GetTransform(arrowTransMat);
1390 Math3D.MatrixInvMultiply4(parentTransMat, arrowTransMat, arrowTransMat);
1393 Math3D.MatrixOrthogonalize4(arrowTransMat);
1395 arrowTransMat[3] = arrowTransMat[3] * scale;
1397 arrow.SetTransform(arrowTransMat);
1399 AddChild(arrow, pivot);
1404 return !IsHologram();
1415 bool Gizmo_IsSupported()
1420 void Gizmo_SetWorldTransform(
vector transform[4],
bool finalize)
1425 SetTransform(transform);
1430 void Gizmo_GetWorldTransform(
vector transform[4])
1432 GetTransform(transform);
eBleedingSourceType GetType()
override void GetActions(typename action_input_type, out array< ActionBase_Basic > actions)
override bool ShootsExplosiveAmmo()
override bool CanUseConstruction()
override bool ShowZonesHealth()
override bool CanUseConstructionBuild()
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
Static data holder for certain ammo config values.
proto native bool IsMultiplayer()
bool ObjectIsKindOf(Object object, string cfg_parent_name)
Returns is object inherited from parent class name.
proto void SurfaceUnderObject(notnull Object object, out string type, out int liquidType)
proto native float SurfaceGetNoiseMultiplier(Object directHit, vector pos, int componentIndex)
Wrapper class for managing sound through SEffectManager.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
The class that will be instanced (moddable)
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.
Serialization general interface. Serializer API works with:
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
override bool DisableVicinityIcon()
override bool HasFixedActionTargetCursorPosition()
override void AddArrow(Object arrow, int componentIndex, vector closeBonePosWS, vector closeBoneRotWS)
override bool CanBeSkinned()
override bool IsDayZCreature()
override string GetDebugName()
override void OnExplosionEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
override bool IsMushroom()
bool IsParticle()
Check whether the Effect is EffectParticle without casting.
override bool IsFireplace()
proto native CGame GetGame()
proto native void SetPosition(vector position)
Set the world position of the Effect.
proto native void SetDirection(vector direction)
bool IsPendingDeletion()
Get whether the Effect is queued up for being cleaned up.
array< string > TStringArray
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
proto native vector GetSpeed()
class JsonUndergroundAreaTriggerData GetPosition
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
override bool IsItemBase()
override bool KindOf(string tag)
void OnDebug(vector p0, vector p1, bool hasHit, bool found)
Debug callback for rendering on the screen.
bool OnCollide(Object other)
Ray cast line test from owner to a tested position.
vector m_DirectionFunc
The size of the boundig box, centered.
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...
bool OnQuery(Object other)
Initial query around the owner position to see if an object should be processed in contact testing.
vector m_Offset
The direction of the owner in world space.
@ NO_ATTACHMENT_TRANSFER
Do not transfer damage to attachments.
@ NO_GLOBAL_TRANSFER
Do not transfer damage to global.
@ NO_TRANSFER
NO_ATTACHMENT_TRANSFER | NO_GLOBAL_TRANSFER.
vector m_OwnerDirection
The position of the owner in world space.
vector m_Transform[4]
If 'OnDebug' is to be called.
bool m_DebugEnabled
How much should the direction be favoured.
vector m_OwnerPosition
The owner performing the snap callback.
vector m_Extents
The true center of the bounding box of the object to be dropped in model space.
void OnSetup()
The transformation currently being debugged.
proto string GetDebugNameNative()
Gets the debug name for the ParticleManager.
override void OnRPC(ParamsReadContext ctx)
override void Explode(int damageType, string ammoType="")
override bool IsCuttable()
override bool IsWoodBase()
override bool CanBeActionTarget()