9class ObjectSnapCallback
66 private void ~Object();
87 proto native
void AddProxyPhysics(
string proxySelectionName);
89 proto native
void RemoveProxyPhysics(
string proxySelectionName);
92 void OnEnterTrigger(ScriptedEntity trigger) {}
95 void OnLeaveTrigger(ScriptedEntity trigger) {}
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 )
108 array<LOD> lods =
new array<LOD>;
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 );
128 return HiddenSelectionsData.GetHiddenSelectionsConfig(
GetType());
134 return HiddenSelectionsData.GetHiddenSelectionsTexturesConfig(
GetType());
140 return HiddenSelectionsData.GetHiddenSelectionsMaterialsConfig(
GetType());
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 (
g_Game.IsDedicatedServer() )
163 Param1<EntityAI> p =
new Param1<EntityAI>(null);
164 g_Game.RPCSingleParam(
this,
ERPCs.RPC_EXPLODE_EVENT, p,
true);
166 else if ( !
g_Game.IsMultiplayer() )
173 void OnExplodeClient()
175 string ammoType = ConfigGetString(
"ammoType");
178 ammoType =
"Dummy_Heavy";
183 AmmoEffects.PlayAmmoParticle(ammoType, pos);
186 AmmoEffects.PlayAmmoEffect(ammoType, pos);
189 void OnExplosionEffects(
Object source,
Object directHit,
int componentIndex,
string surface, vector pos, vector surfNormal,
float energyFactor,
float explosionFactor,
bool isWater,
string ammoType) { }
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]);
262 proto native
void GetTightlyPackedCorners(
ETransformationAxis axis, out vector corners[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();
336 proto native vector GetLocalPos(vector vPos);
338 proto native vector GetGlobalPos(vector vPos);
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()
394 return g_Game.SurfaceGetNoiseMultiplier(NULL, position, -1);
398 string GetSurfaceType()
403 g_Game.SurfaceUnderObject(
this, surface_type,liquid_type);
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 (
g_Game.ConfigIsExisting (cfg_path_vehicles) &&
g_Game.ConfigIsExisting (cfg_path_vehicles +
"AnimationSources " + anim_name) )
436 string cfg_path_weapons =
"CfgWeapons " +
GetType() +
" ";
437 if (
g_Game.ConfigIsExisting (cfg_path_weapons) &&
g_Game.ConfigIsExisting (cfg_path_weapons +
"AnimationSources " + anim_name) )
442 string cfg_path_magazines =
"CfgMagazines " +
GetType() +
" ";
443 if (
g_Game.ConfigIsExisting (cfg_path_magazines) &&
g_Game.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);
470 proto native EntityType GetEntityType();
476 g_Game.ObjectGetType(
this, ret);
482 string GetDisplayName()
485 if (NameOverride(tmp))
487 tmp = Widget.TranslateString(tmp);
491 g_Game.ObjectGetDisplayName(
this, tmp);
497 bool DisplayNameRuinAttach()
503 string GetModelName()
509 proto native owned
string GetShapeName();
513 return g_Game.ObjectRelease(
this);
517 bool IsKindOf(
string type)
519 return g_Game.ObjectIsKindOf(
this, type);
525 return !IsDamageDestroyed();
547 bool IsStaticTransmitter()
583 bool IsInventoryItem()
658 int GetLiquidSourceType()
688 bool IsElectricAppliance()
706 bool CanUseHandConstruction()
711 bool IsBeingBackstabbed()
716 void SetBeingBackstabbed(
int backstabType){}
745 bool IsHealthVisible()
766 bool IsScriptedLight()
783 return IsPlainObject() && !IsScenery();
786 bool CanProxyObstruct()
792 bool CanProxyObstructSelf()
797 bool CanBeIgnoredByDroppedItem()
802 bool CanBeAutoDeleted()
815 proto
void GetNetworkID( out
int lowBits, out
int highBits );
817 string GetNetworkIDString()
820 GetNetworkID( low, high );
821 return high.ToString() + low.ToString();
832 return o.GetDebugName();
840 void RPC(
int rpc_type, array<ref Param> params,
bool guaranteed, PlayerIdentity recipient = NULL)
842 g_Game.RPC(
this, rpc_type, params, guaranteed, recipient);
846 void RPCSingleParam(
int rpc_type, Param param,
bool guaranteed, PlayerIdentity recipient = NULL)
848 g_Game.RPCSingleParam(
this, rpc_type, param, guaranteed, recipient);
858 proto vector GetSelectionPositionOld(
string name);
859 proto vector GetSelectionPositionLS(
string name);
860 proto vector GetSelectionPositionMS(
string name);
861 proto vector GetSelectionPositionWS(
string name);
867 proto vector GetSelectionBasePositionLS(
string name);
869 proto vector ModelToWorld(vector modelPos);
870 proto vector WorldToModel(vector worldPos);
874 proto
string ConfigGetString(
string entryName);
881 proto
string ConfigGetStringRaw(
string entryName);
882 proto
int ConfigGetInt(
string entryName);
883 bool ConfigGetBool(
string entryName)
885 return (ConfigGetInt(entryName) == 1);
888 proto
float ConfigGetFloat(
string entryName);
889 proto vector ConfigGetVector(
string entryName);
897 proto native
void ConfigGetTextArray(
string entryName, out
TStringArray values);
905 proto native
void ConfigGetTextArrayRaw(
string entryName, out
TStringArray values);
912 proto native
void ConfigGetFloatArray(
string entryName, out
TFloatArray values);
919 proto native
void ConfigGetIntArray(
string entryName, out
TIntArray values);
925 proto native
bool ConfigIsExisting(
string entryName);
930 string item_name = this.
GetType();
932 ConfigGetTextArray(
"cfgVehicles " + item_name +
" itemInfo", item_tag_array);
934 int array_size = item_tag_array.Count();
935 for (
int i = 0; i < array_size; i++)
937 if ( item_tag_array.Get(i) == tag )
945 bool IsAnyInherited( array<typename> typenames )
947 int nTypenames = typenames.Count();
948 for(
int i = 0; i < nTypenames; ++i )
950 if (IsInherited(typenames.Get(i)))
961 proto native
bool IsPlainObject();
966 proto native
bool IsScenery();
972 proto native
bool HasDamageSystem();
977 proto native
bool IsDamageDestroyed();
983 proto native
void SetDestructTime(
float time);
990 proto native
float GetHealth(
string zoneName,
string healthType);
997 proto native
float GetHealth01(
string zoneName,
string healthType);
1004 proto native
float GetMaxHealth(
string zoneName,
string healthType);
1011 proto native
void SetHealth(
string zoneName,
string healthType,
float value);
1016 proto native
void SetFullHealth();
1023 proto native
void AddHealth(
string zoneName,
string healthType,
float value);
1030 proto native
void DecreaseHealth(
string zoneName,
string healthType,
float value);
1038 proto native
bool GetAdditionalHealthTypes(
string zoneName,
TStringArray outHealthTypes);
1045 void DecreaseHealth(
string zoneName,
string healthType,
float value,
bool auto_delete)
1047 DecreaseHealth(zoneName, healthType, value);
1051 float result_health = GetHealth(zoneName, healthType);
1052 if (result_health <= 0)
1060 return GetHealth(
"",
"");
1065 return GetHealth01(
"",
"");
1068 float GetMaxHealth()
1070 return GetMaxHealth(
"",
"");
1073 void SetHealth(
float health)
1075 SetHealth(
"",
"", health);
1078 void SetGlobalHealth(
float health)
1080 SetHealth(
"",
"", health);
1083 void SetHealthLevel(
int healthLevel,
string zone =
"")
1085 SetHealth01(zone,
"", GetHealthLevelValue(healthLevel, zone));
1088 void AddHealthLevel(
int healthLevelDelta,
string zone =
"")
1090 int maxHealthLevel = GetNumberOfHealthLevels(zone) - 1;
1091 int newHealthLevel = Math.Clamp(GetHealthLevel(zone) + healthLevelDelta,0,maxHealthLevel);
1092 SetHealthLevel(newHealthLevel,zone);
1096 void SetHealth01(
string zoneName,
string healthType,
float coef)
1098 SetHealth(zoneName,healthType,(GetMaxHealth(zoneName,healthType)*coef));
1101 void SetHealthMax(
string zoneName =
"",
string healthType =
"")
1103 SetHealth(zoneName,healthType,GetMaxHealth(zoneName,healthType));
1106 void AddHealth(
float add_health)
1108 AddHealth(
"",
"", add_health);
1111 void DecreaseHealth(
float dec_health,
bool auto_delete =
true)
1113 DecreaseHealth(
"",
"", dec_health, auto_delete);
1116 void DecreaseHealthCoef(
float dec_health_coef,
bool auto_delete =
true)
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);
1134 proto native
void ProcessDirectDamage(
int damageType,
EntityAI source,
string componentName,
string ammoName, vector modelPos,
float damageCoef = 1.0,
int flags = 0);
1140 bool EEOnDamageCalculated(TotalDamageResult damageResult,
int damageType,
EntityAI source,
int component,
string dmgZone,
string ammo, vector modelPos,
float speedCoef)
1149 proto native
void GetDamageZones(out
TStringArray dmgZones);
1155 proto native vector GetDamageZonePos(
string zoneName);
1160 proto native owned
string GetDamageZoneNameByComponentIndex(
int componentIndex);
1167 proto native
int GetHealthLevel(
string zone =
"");
1174 proto native
int GetNumberOfHealthLevels(
string zone =
"");
1181 proto native
float GetHealthLevelValue(
int healthLevel,
string zone =
"");
1187 proto native
bool GetAllowDamage();
1192 proto native
void SetAllowDamage(
bool val);
1197 proto native
bool GetCanBeDestroyed();
1203 proto native
void SetCanBeDestroyed(
bool val);
1217 return IsDamageDestroyed();
1221 void OnSimulationEnabled() {}
1224 void OnSimulationDisabled() {}
1226 void GetActions(
typename action_input_type, out array<ActionBase_Basic> actions)
1231 SoundOnVehicle
PlaySound(
string sound_name,
float range,
bool create_local =
true)
1233 return g_Game.CreateSoundOnObject(
this, sound_name, range,
false, create_local);
1237 SoundOnVehicle PlaySoundLoop(
string sound_name,
float range,
bool create_local =
true)
1239 return g_Game.CreateSoundOnObject(
this, sound_name, range,
true, create_local);
1243 bool PlaySoundSet( out EffectSound sound,
string sound_set,
float fade_in,
float fade_out,
bool loop =
false )
1255 StopSoundSet( sound );
1259 sound = SEffectManager.PlaySoundOnObject( sound_set,
this, fade_in, fade_out, loop );
1260 sound.SetAutodestroy(
true );
1269 bool PlaySoundSetLoop( out EffectSound sound,
string sound_set,
float fade_in,
float fade_out )
1271 return PlaySoundSet( sound, sound_set, fade_in, fade_out,
true );
1275 bool PlaySoundSetAtMemoryPointLoopedSafe(out EffectSound sound,
string soundSet,
string memoryPoint,
float play_fade_in = 0,
float stop_fade_out = 0)
1277 if (sound && sound.IsPlaying())
1281 return PlaySoundSetAtMemoryPointLooped(sound, soundSet, memoryPoint, play_fade_in, stop_fade_out);
1284 bool PlaySoundSetAtMemoryPointLooped(out EffectSound sound,
string soundSet,
string memoryPoint,
float play_fade_in = 0,
float stop_fade_out = 0)
1286 return PlaySoundSetAtMemoryPoint(sound, soundSet, memoryPoint,
true, play_fade_in, stop_fade_out);
1290 bool PlaySoundSetAtMemoryPoint(out EffectSound sound,
string soundSet,
string memoryPoint,
bool looped =
false,
float play_fade_in = 0,
float stop_fade_out = 0)
1294 if (MemoryPointExists(memoryPoint))
1296 pos = GetMemoryPointPos(memoryPoint);
1297 pos = ModelToWorld(pos);
1301 ErrorEx(
string.Format(
"Memory point %1 not found when playing soundset %2 at memory point location", memoryPoint, soundSet));
1305 sound = SEffectManager.PlaySoundEnviroment(soundSet, pos, play_fade_in, stop_fade_out, looped);
1310 bool StopSoundSet( out EffectSound sound )
1312 if ( sound &&
g_Game && ( !
g_Game.IsDedicatedServer() ) )
1323 void PostAreaDamageActions();
1324 void PreAreaDamageActions();
1326 void SpawnDamageDealtEffect();
1327 void OnReceivedHit(ImpactEffectsData hitData);
1330 void OnPlayerRecievedHit();
1336 GetNetworkID(lo, hi);
1340 bool NameOverride(out
string output)
1345 bool DescriptionOverride(out
string output)
1350 EntityAI ProcessMeleeItemDamage(
int mode = 0) {}
1352 bool CanBeRepairedToPristine()
1359 if ( MemoryPointExists(
"ce_center") )
1362 return ModelToWorld( GetMemoryPointPos(
"ce_center") );
1372 void SetDebugItem();
1375 void AddArrow(
Object arrow,
int componentIndex, vector closeBonePosWS, vector closeBoneRotWS)
1377 int pivot = GetBonePivot(GetFireGeometryLevel(), componentIndex);
1378 vector parentTransMat[4];
1379 vector arrowTransMat[4];
1383 GetTransform(parentTransMat);
1387 GetBoneTransformWS(pivot, parentTransMat);
1390 float scale = GetScale();
1391 scale = 1 / (scale * scale);
1393 arrow.GetTransform(arrowTransMat);
1394 Math3D.MatrixInvMultiply4(parentTransMat, arrowTransMat, arrowTransMat);
1397 Math3D.MatrixOrthogonalize4(arrowTransMat);
1399 arrowTransMat[3] = arrowTransMat[3] * scale;
1401 arrow.SetTransform(arrowTransMat);
1403 AddChild(arrow, pivot);
1408 return !IsHologram();
1416 void OnSpawnByObjectSpawner(ITEM_SpawnerObject item);
1418 bool Gizmo_IsSupported()
1420 return !
g_Game.IsMultiplayer();
1423 void Gizmo_SetWorldTransform(vector transform[4],
bool finalize)
1428 SetTransform(transform);
1433 void Gizmo_GetWorldTransform(vector transform[4])
1435 GetTransform(transform);
eBleedingSourceType GetType()
override void GetActions(typename action_input_type, out array< ActionBase_Basic > actions)
override bool ShootsExplosiveAmmo()
override bool CanObstruct()
override bool CanUseConstruction()
override bool ShowZonesHealth()
override bool CanUseConstructionBuild()
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
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()
Serializer ParamsReadContext
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< float > TFloatArray
array< string > TStringArray
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
proto native vector GetSpeed()
vector GetPosition()
Get the world position of the Effect.
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()