DIFF

class ObjectSource

Object IEntity Managed

Derived classes
View all 2,042 descendants

All members, including inherited

Constructors 2

private void ~Object()
private void Object()

Methods 238

void Delete()

Delete this object in next frame

Returns: void

ItemBase item = g_Game.GetPlayer().CreateInInventory("GrenadeRGD5");
item.Delete();
void OnEnterTrigger(ScriptedEntity trigger)

Object entered trigger

void OnLeaveTrigger(ScriptedEntity trigger)

Object left trigger

proto native bool GetLODS(notnull out array<LOD> lods)

Retrieve all LODS

Referenced by GetLODByName()
proto native owned string GetLODName(LOD lod)

Retrieve LOD name

Referenced by GetLODByName()
proto native vector GetBoundingCenter()
TStringArray GetHiddenSelections()

Returns the hiddenSelections array from the object's config

TStringArray GetHiddenSelectionsTextures()

Returns the hiddenSelectionsTextures array from the object's config

TStringArray GetHiddenSelectionsMaterials()

Returns the hiddenSelectionsMaterials array from the object's config

void Explode(int damageType, string ammoType = "")

Creates an explosion on this object by its ammoType in config.

void SynchExplosion()
void OnExplodeClient()

Called on clients when this object explodes

void OnExplosionEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
proto native owned string GetActionComponentName(int componentIndex, string geometry = "")

returns action component name by given component index, 'geometry' can be "fire" or "view" (default "" for mixed/legacy mode)

Referenced by ActionAttachToConstruction.ActionCondition(), ActionCreateGreenhouseGardenPlot.ActionCondition(), ActionCreateIndoorFireplace.ActionCondition()
Show 46 more, ActionCreateIndoorOven.ActionCondition(), ActionDestroyCombinationLock.ActionCondition(), ActionDestroyPart.DestroyCondition(), ActionDetachPowerSourceFromPanel.ActionCondition(), ActionDismantlePart.DismantleCondition(), ActionEnterLadder.ActionCondition(), ActionEnterLadder.Start(), ActionInsertSparkplug.ActionCondition(), ActionMountBarbedWire.GetZoneSelection(), ActionOperatePanelPowerStation.ActionCondition(), ActionOperatePanelPowerStation.OnStart(), ActionPlaceFireplaceIndoor.ActionCondition(), ActionPlaceOvenIndoor.ActionCondition(), ActionPullOutPlug.ActionCondition(), ActionPullOutPlug.GetTargetName(), ActionPullOutPlug.OnExecuteServer(), ActionRepairPart.OnFinishProgressServer(), ActionRepairPart.RepairCondition(), ActionTakeHybridAttachment.ActionCondition(), ActionTakeHybridAttachment.InventoryReservation(), ActionTakeHybridAttachment.OnExecute(), ActionTakeHybridAttachmentToHands.ActionCondition(), ActionTakeHybridAttachmentToHands.CreateAndSetupActionCallback(), ActionTakeHybridAttachmentToHands.OnExecuteImpl(), ActionTakeMaterialToHands.ActionCondition(), ActionTakeMaterialToHandsSwitch.ActionCondition(), ActionTargets.DrawSelectionPos(), ActionTargets.ShowDebugActionTargets(), ActionTargetsCursor.GetItemDesc(), ActionTargetsCursor.GetItemHealth(), ActionTargetsCursor.GetOnScreenPosition(), ActionTuneFrequencyOnGround.ActionCondition(), ActionTurnOffSpotlight.ActionCondition(), ActionTurnOffTransmitterOnGround.ActionCondition(), ActionTurnOnSpotlight.ActionCondition(), ActionTurnOnTransmitterOnGround.ActionCondition(), ActionUnlockShippingContainer.TranslateLockSelectionIntoDoorIdx(), ActionUnmountBarbedWire.GetZoneSelection(), ActionUnplugThisByCord.ActionCondition(), ActionUnplugThisByCord.GetTargetName(), ConstructionActionData.OnUpdateActions(), ConstructionActionData.OnUpdateActionsNoTool(), Hologram.CorrectForWatchtower(), Hologram.IsObjectStatic(), Hologram.SetOnGround(), and Land_Underground_WaterReservoir.GetTurnableValveIndex()
proto native owned vector GetActionComponentPosition(int componentIndex, string geometry = "")

returns action component position by given component index, 'geometry' can be "fire" or "view" (default "" for mixed/legacy mode)

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" (default "" for mixed/legacy mode). Returns -1 (not found), 0 (found default component only), or 1 (found named component)

Referenced by ActionAnimateCarSelection.ActionCondition(), ActionAnimateSeats.ActionCondition(), ActionAttachOnSelection.FindSlotIdToAttachOrCombine()
Show 43 more, ActionBase.IsInReach(), ActionBase.WriteToContext(), ActionCarDoorsOutside.ActionCondition(), ActionCarDoorsOutside.OnStartServer(), ActionCloseFence.ActionCondition(), ActionDetachFromTarget.FindSlotIdToDetach(), ActionDetachFromTarget_SpecificSlot.FindSlotIdToDetach(), ActionDetachFromTarget_SpecificSlotsCategory.FindSlotIdToDetach(), ActionDisinfectPlant.ActionCondition(), ActionFertilizeSlot.ActionCondition(), ActionFillBrakes.ActionCondition(), ActionFillCoolant.ActionCondition(), ActionFillFuel.ActionCondition(), ActionFillOil.ActionCondition(), ActionGetInTransport.ActionCondition(), ActionHarvestCrops.GetPlantSlot(), ActionOpenFence.ActionCondition(), ActionPackTent.ActionCondition(), ActionPlantSeed.ActionCondition(), ActionPlantSeed.Process(), ActionRemovePlant.ActionCondition(), ActionRemoveSeed.ActionCondition(), ActionRepairBoatChassis.ActionCondition(), ActionRepairBoatEngine.ActionCondition(), ActionRepairCarChassis.ActionCondition(), ActionRepairCarEngine.ActionCondition(), ActionRepairTent.ActionCondition(), ActionRepairTentPart.ActionCondition(), ActionTargets.ShowDebugActionTargets(), ActionTargetsCursor.GetItemDesc(), ActionTargetsCursor.GetItemHealth(), ActionTargetsCursor.GetOnScreenPosition(), ActionToggleTentOpen.ActionCondition(), ActionToggleTentOpen.OnExecuteServer(), ActionWaterGardenSlot.ActionCondition(), BleedingSourcesManagerBase.GetBitFromSelectionID(), CAContinuousDisinfectPlant.Setup(), CAContinuousFertilizeGardenSlot.Setup(), CAContinuousWaterSlot.Setup(), DayZCreature.AddArrow(), HudDebugWinHorticulture.SendRPCUpdate(), PlayerBase.AddArrow(), and ZombieBase.AddArrow()
proto native bool IsActionComponentPartOfSelection(int componentIndex, string selectionName, string geometry = "")

return true if selection containts action component, 'geometry' can be "fire" or "view" (default "" for mixed/legacy mode)

proto void GetActionComponentsForSelectionName(int level, string selectionName, TIntArray componentIndices)

outputs action component index list by given selection, 'geometry' can be "fire" or "view" (default "" for mixed/legacy mode)

proto vector GetActionComponentCenter(int level, int componentIndex)

The center of the component, in model space

proto vector GetActionComponentCenterOOB(int level, int componentIndex)

The center of the component, in model space

proto void GetActionComponentMinMax(int level, int componentIndex, out vector min, out vector max)

The AABB of the component

proto native bool IsPendingDeletion()

Determine whether this object is in the deletion ProcessDirectDamage Is useful in the case where a parent is being deleted, since the children will be deleted first So to know if something was removed or detached from it's parent, use this check to see if it is because the parent is being deleted

proto native int GetGeometryLevel()

Native functions for getting the level used for calculating the pivot

proto native int GetFireGeometryLevel()
Referenced by AddArrow()
proto native int GetViewGeometryLevel()
proto native int GetMemoryLevel()
proto bool ToBonePivot(out int pivot, int level, int bone)DEVELOPER

Conversion between enfusion and RV bone formats for hierarchy

proto bool FromBonePivot(int pivot, out int level, out int bone)DEVELOPER
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, fire, view or memory

Referenced by AddArrow()
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 vector GetBonePositionLS(int pivot)

returns local space, model space, world space position of the bone

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 GetBoneRotationMS(int pivot, out float quaternion[4])
proto native void GetBoneRotationWS(int pivot, out float quaternion[4])
proto native void GetBoneTransformLS(int pivot, out vector transform[4])

returns local space, model space, world space transformations of a bone

proto native void GetBoneTransformMS(int pivot, out vector transform[4])
proto native void GetBoneTransformWS(int pivot, out vector transform[4])
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/BOTTOM supported)

axis
The axis the object is aligned to
corners
array[4] of vector, each a corner aligned to the axis ({0,0}, {0,1}, {1,0}, {1,1})

Returns: true if collision box exists, false otherwise

void DebugDrawTightlyPackedCorners(ETransformationAxis axis, int color)DIAG_DEVELOPER
proto native vector GetPosition()

Retrieve position

proto native void SetPosition(vector vPos)

Set position

proto native vector GetOrientation()

Retrieve orientation (yaw, pitch, roll) in <b>degrees</b>

Returns: vector of yaw, pitch and roll angles (x = yaw, y = pitch, z = roll)

proto native void SetOrientation(vector vOrientation)

Set orientation (yaw, pitch, roll) in <b>degrees</b>

vOrientation
, vector of yaw, pitch and roll angles (x = yaw, y = pitch, z = roll)
proto native vector GetDirection()

Retrieve direction vector

proto native void SetDirection(vector vPos)

Set direction of object

vDirection
, direction vector
Noteobject up vector is always y-axis
proto native vector GetDirectionUp()

Retrieve direction up vector

proto native vector GetDirectionAside()

Retrieve direction aside vector

proto native vector GetLocalPos(vector vPos)

Calculate local position of other entity to this entity

proto native vector GetGlobalPos(vector vPos)

Calculate global position to this entity from local position

proto native vector GetSpeed()

Retrieve object's speed in global space

proto native vector GetModelSpeed()

Retrieve object's speed in local space

proto native bool CanAffectPathgraph()

Returns true if object's geometry can affect pathgraph generation

proto native void SetAffectPathgraph(bool fromConfig, bool affect)

Sets if object's geometry affects pathgraph generation. If first parameter is true, it ignores second parameter and sets affecting pathgraph by parameter set in object's config

proto float ClippingInfo(out vector minMax[2])

Get Clipping info

minMax
array[2] of vectors, into minMax[0] is returned min, into minMax[1] is returned max

Returns: radius of bounding box

vector minMax[2];
float radius = g_Game.GetPlayer().ClippingInfo(minMax);
Print(minMax);
Print(radius);
proto native bool GetCollisionBox(out vector minMax[2])

Gets collision bounding box

minMax
array[2] of vectors, into minMax[0] is returned min, into minMax[1] is returned max

Returns: true if collision box exists, false otherwise

vector minMax[2];
if(g_Game.GetPlayer().GetCollisionBox(minMax))
	Print("has box");
proto native float GetDamage()

Get total damage (clipped to range 0..1)

proto native void GetSelectionList(out TStringArray selectionList)
float GetSurfaceNoise()

Returns noise multiplier of surface under object

bool HasSelection(string selection)

Returns true if the given selection was found in the p3d file. False if otherwise.

bool HasAnimation(string anim_name)

Searches object's config for the given animation name. Returns true if it was found, or false if not.

proto native int GetMemoryPointIndex(string memoryPointName)

If Returns true if this item has EnergyManager in its config. Otherwise returns false.

proto native vector GetMemoryPointPos(string memoryPointName)
Referenced by AttachmentsOutOfReach.IsAttachmentReachable(), BaseBuildingBase.CalcDamageAreaRotation(), BaseBuildingBase.CreateAreaDamage()
Show 37 more, BaseBuildingBase.HandleItemFalling(), BoatScript.BoatScript(), Bonfire.EEInit(), CarScript.CanReachSeatFromDoors(), CarScript.CarScript(), CarScript.UpdateLightsClient(), Construction.DropNonUsableMaterialsServer(), Construction.GetCollisionBoxData(), Fence.GetKitSpawnPosition(), Fence.HasProperDistance(), FireworksLauncher.OnFuseIgnitedClient(), FireworksLauncherClientEvent.GetShotPos(), Hologram.GetProjectionCollisionBox(), Land_Underground_Entrance.GetLightPosition(), Land_Underground_WaterReservoir.GetMemoryPointPosition(), Land_Underground_WaterReservoir.TranslateMemoryPointsToWaterLevels(), Land_WarheadStorage_PowerStation.GetPowerGeneratorSpawnPos(), Land_WarheadStorage_PowerStation.OnVariablesSynchronized(), Misc_TirePile_Burning_DE.EEInit(), GetCenter(), PlaySoundSetAtMemoryPoint(), Raycaster.DoMeasurement(), ScriptedLightBase.AttachOnMemoryPoint(), ShelterSite.GetKitSpawnPosition(), ShelterSite.HasProperDistance(), ShelterSite.IsPlayerInside(), StaticConstructionMethods.SpawnConstructionMaterialPiles(), TerritoryFlag.GetKitSpawnPosition(), TerritoryFlag.HasProperDistance(), Transport.Transport(), TrapSpawnBase.UpdatePreyPos(), Watchtower.CheckMemoryPointVerticalDistance(), Watchtower.HasProperDistance(), Watchtower.IsFacingCamera(), Watchtower.IsFacingPlayer(), Watchtower.IsPlayerInside(), and Watchtower.PerformRoofCheckForBase()
proto native vector GetMemoryPointPosByIndex(int pointIndex)
proto native bool MemoryPointExists(string memoryPoint)
proto native void CreateDynamicPhysics(int interactionLayers)
proto native void EnableDynamicCCD(bool state)
proto native void SetDynamicPhysicsLifeTime(float lifeTime)
void OnTreeCutDown(EntityAI cutting_entity)

Called when tree is chopped down. 'cutting_entity' can be tool, or player, if cutting bush with bare hands

proto native EntityType GetEntityType()

Returns shared EntityType, can be null for some internal/static types

string GetDisplayName()

Get display name of entity

bool DisplayNameRuinAttach()
string GetModelName()

Returns name of the model of this object without the '.p3d' suffix

proto native owned string GetShapeName()

Return path and name of the model

int Release()
bool IsDayZCreature()

Checks if this instance is of type DayZCreature

bool IsEntityAI()

Returns if this entity is EntityAI

bool IsAmmoPile()

Returns if this entity is Ammo Pile

bool IsInventoryItem()

Returns if this entity is InventoryItem

bool IsWoodBase()

Returns whether object is PlanBase

bool IsBush()

Returns if this entity is bush

bool IsPeltBase()

Returns if this entity is Pelt_Base

bool IsWeapon()

Returns if this entity is Weapon

bool IsMeleeWeapon()

returns if this entity is Melee Weapon

int GetLiquidSourceType()
bool IsWell()

Returns if this entity is Well (extends Building) DEPRECATED by GetWaterSourceObjectType

bool ShootsExplosiveAmmo()

Returns if this entity is a weapon which can shoot explosive ammo

bool IsFuelStation()

Returns if this entity is Fuel Station (extends Building)

bool IsElectricAppliance()

Returns if this is an appliance, that can be plugged into electric circuit (== not energy source)

bool CanUseConstructionBuild()

Returns if this entity can be built, specifically.

bool CanUseHandConstruction()

Returns if this entity can be constructed without tools

bool IsBeingBackstabbed()
void SetBeingBackstabbed(int backstabType)
bool IsFood()

Returns if this entity if a food item

References IsCorpse(), IsFruit(), IsMeat()
Show 1 more, IsMushroom()
bool IsFruit()
Referenced by IsFood()
bool IsMeat()
Referenced by IsFood()
bool IsMushroom()
Referenced by IsFood()
bool IsHealthVisible()

Returns if the health of this entity should be displayed (widgets, inventory)

bool ShowZonesHealth()

Returns true if the health of damage zones should be displayed (instead of global HP of the entity) ( action widgets)

bool IsItemTent()
Referenced by ItemBase.EEHitBy()
bool IsHologram()
bool HasProxyParts()
Referenced by CanProxyObstruct()
bool CanProxyObstructSelf()

can the object's own proxy geometry obstruct it? Currently checking 'ObjIntersectView'

bool CanBeIgnoredByDroppedItem()
References IsBush(), IsDayZCreature(), IsItemBase()
Show 2 more, IsMan(), and IsTree()
bool CanBeAutoDeleted()
bool DisableVicinityIcon()

Disables icon in the vicinity, useful for large, immovable items, that are not buildings

proto void GetNetworkID(out int lowBits, out int highBits)

Returns low and high bits of networkID. This id is shared between client and server for whole server-client session.

string GetNetworkIDString()
References GetNetworkID(), ToString(), and int.ToString()
proto string GetDebugNameNative()

native GetDebugName which is internally overloaded where needed

void RPC(int rpc_type, array<ref Param> params, bool guaranteed, PlayerIdentity recipient = NULL)

Remote procedure call shortcut, see CGame.RPC / CGame.RPCSingleParam

References CGame.RPC()
void RPCSingleParam(int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient = NULL)

Remote procedure call shortcut, see CGame.RPCSingleParam / CGame.RPC

void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)

Called after remote procedure call is recieved for this object

rpc_type
user defined identification of RPC
ctx
read context for params
proto vector GetSelectionPositionOld(string name)
proto vector GetSelectionPositionWS(string name)
proto vector GetSelectionBasePositionLS(string name)

Get the position of the selection with no animations applied

name
selection name of the selection (component, proxy)
proto string ConfigGetString(string entryName)
Referenced by ActionCraftBoltsFeather.OnFinishProgressServer(), ActionDeCraftDrysackBag.OnFinishProgressServer(), ActionDeCraftWitchHoodCoif.OnFinishProgressServer()
Show 42 more, ActionSwapItemToHands.Start(), AttachmentCategoriesContainer.InitGhostSlots(), BaitBase.EEItemLocationChanged(), BookMenu.ReadBook(), CarScript.BrakeLightsShineOff(), CarScript.BrakeLightsShineOn(), CarScript.DashboardShineOff(), CarScript.DashboardShineOn(), CarScript.LeftFrontLightShineOff(), CarScript.LeftFrontLightShineOn(), CarScript.ReverseLightsShineOff(), CarScript.ReverseLightsShineOn(), CarScript.RightFrontLightShineOff(), CarScript.RightFrontLightShineOn(), CarScript.TailLightsShineOff(), CarScript.TailLightsShineOn(), DayZPlayerImplement.ProcessVoiceEvent(), EmoteSuicide.DetermineOverride(), InspectMenuNew.UpdateItemInfoQuantity(), InventoryItem.GetTooltip(), InventoryItem.InitImpactSoundData(), ItemBase.ChangeIntoOnAttach(), ItemBase.ChangeIntoOnDetach(), ItemBase.InitItemVariables(), ItemBase.PreLoadSoundAttachmentType(), LandMineTrap.Explode(), MiscGameplayFunctions.ObtainRestrainItemTargetClassname(), MiscGameplayFunctions.TransformRestrainItem(), NoteMenu.InitNoteWrite(), Explode(), OnExplodeClient(), PaintItem.CanPaintItem(), PaintItem.Paint(), PlayerBase.Init(), RecipeBase.SpawnItems(), SawoffMosinPainted.Do(), TurnItemIntoItemLambda.VerifyItemTypeBySlotType(), WeaponDebug.GetEyePointPosition(), WoodBase.GetBarkType(), WoodBase.GetPrimaryOutput(), WoodBase.GetSecondaryOutput(), and ZombieContainer.InitGhostSlots()
proto string ConfigGetStringRaw(string entryName)

Get a raw strings from config entry.

entryName

Returns: value output string

Noteuse 'FormatRawConfigStringKeys' method to change localization keys to script-friendly
proto vector ConfigGetVector(string entryName)
proto native void ConfigGetTextArrayRaw(string entryName, out TStringArray values)

Get array of raw strings from config entry.

entryName
value
output in raw format (localization keys '$STR_' are not translated).
Noteuse 'FormatRawConfigStringKeys' method to change localization keys to script-friendly
proto native void ConfigGetFloatArray(string entryName, out TFloatArray values)

Get array of floats from config entry.

entryName
value
output
proto native void ConfigGetIntArray(string entryName, out TIntArray values)

Get array of integers from config entry.

entryName
value
output
proto native bool ConfigIsExisting(string entryName)

Checks if given entry exists.

entryName
Referenced by ActionFoldEntityToSlot.OnExecuteServer(), ActionRestrainSelfCB.CreateActionComponent(), ActionRestrainTargetCB.CreateActionComponent()
Show 37 more, ActionTakeHybridAttachmentToHands.CreateAndSetupActionCallback(), ActionTakeMaterialToHands.CreateAndSetupActionCallback(), ActionUnfoldEntity.OnExecuteServer(), ActionUnrestrainSelfCB.CreateActionComponent(), ActionUnrestrainTargetHandsCB.CreateActionComponent(), ActionViewBinoculars.EnterOptics(), ActionViewBinoculars.ExitOptics(), ActionWritePaper.ActionCondition(), ActionWritePaper.OnStartClient(), ActionWritePaper.OnStartServer(), ActionWritePaperCB.OnStateChange(), Attachments.GetItemSlots(), BaseBuildingBase.BaseBuildingBase(), EmoteManager.CommitSuicide(), EmoteSuicide.DetermineOverride(), EntityAI.InitItemVariables(), FishingActionData.InitBait(), Head_Default.Init(), HuntingOptic.ParentUsesWinchesterTypeMount(), InventoryItem.InitImpactSoundData(), InventoryItem.InventoryItem(), ItemBase.GetItemAttachOffset(), ItemBase.GetItemModelLength(), ItemBase.InitItemVariables(), ItemBase.ItemBase(), ItemBase.PlayAttachSound(), ItemBase.PreLoadSoundAttachmentType(), OpenItem.OpenAndSwitch(), PropertyModifiers.GetModifierRaw(), SelectionTranslation.InitTranslatedSelections(), TurnItemIntoItemLambda.VerifyItemTypeBySlotType(), UniversalLight.CanPutAsAttachment(), Weapon_Base.InitObstructionDistance(), Weapon_Base.InitShoulderDistance(), Weapon_Base.InitWeaponLength(), Weapon_Base.InitWeaponLiftCheckVerticalOffset(), and Weapon_Base.Weapon_Base()
bool KindOf(string tag)

Compares config class name to given string

References ConfigGetTextArray(), array.Count(), array.Get()
Show 1 more, GetType()
proto native bool IsPlainObject()

Is this just static object without config? So we can avoid calling unnecessary methods

proto native bool IsScenery()

Is this Scenery? (handy for excluding terain when it is not needed)

proto native bool HasDamageSystem()

Checks if object's DamageSystem has been initialized(despite the name, does not really reliably answer the question whether the object is configured to have damage system or not)

proto native bool IsDamageDestroyed()

Checks if object is destroyed.

proto native void SetDestructTime(float time)

Sets the time over which to perform DestructTent/DestructTree

time
time over which to perform DestructTent/DestructTree
proto native float GetHealth(string zoneName, string healthType)

Returns current state of health.

zoneName
if empty string, returns state of global health
healthType
if empty string, returns state of main health
proto native float GetMaxHealth(string zoneName, string healthType)

Returns maximum value of health.

zoneName
if empty string, returns state of global health
healthType
if empty string, returns state of main health
proto native void SetHealth(string zoneName, string healthType, float value)

Sets current state of health.

zoneName
if empty string, sets state of global health
healthType
if empty string, sets state of main health
proto native void SetFullHealth()

Sets full health to all zones and removes fatal damage when applicable

Referenced by EntityAI.FixEntity()
proto native void AddHealth(string zoneName, string healthType, float value)

Adds health.

zoneName
if empty string, sets state of global health
healthType
if empty string, sets state of main health
proto native void DecreaseHealth(string zoneName, string healthType, float value)

Decreases health.

zoneName
if empty string, sets state of global health
healthType
if empty string, sets state of main health
proto native bool GetAdditionalHealthTypes(string zoneName, TStringArray outHealthTypes)

List of additional health types in given zone

zoneName
if empty string, global will be used
outHealthType
List of the types found (does not clear the existing content)

Returns: false on any error (uninitialized system, bad zone name)

void DecreaseHealth(string zoneName, string healthType, float value, bool auto_delete)

Decreases health with the option of auto-deleting the object if its ruined.

zoneName
if empty string, sets state of global health
healthType
if empty string, sets state of main health
float GetHealth()

Equivalent of GetHealth("", "");

void SetHealth(float health)

Equivalent of SetHealth("", "", float value);

void SetGlobalHealth(float health)

Equivalent of SetHealth("", "", float value);

References SetHealth()
void SetHealthLevel(int healthLevel, string zone = "")

Sets specific health level. It will use the cutoff value as returned by 'GetHealthLevelValue' as the health value for the given health level, which means it will always be set to the max health as allowed by the given health level.

void AddHealthLevel(int healthLevelDelta, string zone = "")

Similar to 'SetHealthLevel', but allows to jump up/down 'healthLevelDelta' amount of health levels from the current one. Positive values cause health level increase, therefore damage the item, and vice-versa.

Referenced by PunchedCard.OnUse()
void SetHealthMax(string zoneName = "", string healthType = "")

Sets health to its maximum (zone or global)

References GetMaxHealth(), and SetHealth()
void AddHealth(float add_health)

Equivalent of AddHealth("", "", float value);

void DecreaseHealth(float dec_health, bool auto_delete = true)

Equivalent of DecreaseHealth("", "", float value, bool auto_delete);

void DecreaseHealthCoef(float dec_health_coef, bool auto_delete = true)

Decreases health by the given coeficient.

References DecreaseHealth(), GetHealth(), GetHealth01()
Show 1 more, GetMaxHealth()
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.

damageType
DT_CLOSE_COMBAT/DT_FIRE_ARM/DT_EXPLOSION/DT_CUSTOM
source
source of damage
componentName
which 'DamageZone' was hit (NOT a component name, actually!)
ammoName
ammoType, which defines how much damage should be applied
directHitModelPos
local position of hit
damageCoef
multiplier of applied damage
flags
enables/disables special behaviour depending on the flags used (ProcessDirectDamageFlags type)
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

Returns: whether to apply the damage or not

proto native void GetDamageZones(out TStringArray dmgZones)

Obtains a list of nammes of all object's damage zones

list
of names
proto native vector GetDamageZonePos(string zoneName)

Obtains middle position of damage zone based on it's name

name
of the damage zone
proto native owned string GetDamageZoneNameByComponentIndex(int componentIndex)

Obtains name of damage zone based on index of specific component

index
of the component
proto native int GetHealthLevel(string zone = "")

Returns global health level specified in object's config class parameter healthLevels (range is usually 0..4, 0 = pristine, 1 = worn, 2 = damaged, 3 = badly damaged, 4 = ruined but can be changed).

zoneName
if empty string, returns state of global health level
proto native int GetNumberOfHealthLevels(string zone = "")

Returns global number of health levels specified in object's config class parameter healthLevels (range is usually 0..4, 0 = pristine, 1 = worn, 2 = damaged, 3 = badly damaged, 4 = ruined but can be changed).

zoneName
if empty string, returns number of global health levels
proto native float GetHealthLevelValue(int healthLevel, string zone = "")

Returns cutoff value for health level specified in object's config class parameter healthLevels

zoneName
if empty string, returns number of global health levels
healthLevel
the health level to get the value from
proto native bool GetAllowDamage()

Returns if object can receive damage

proto native bool GetCanBeDestroyed()

Returns if object is destroyable

proto native void SetCanBeDestroyed(bool val)

Enable or disable destruction of object (after health is depleated)

enable
or disable
bool IsRuined()

Returns whether the object is ruined (0 Health).

Returns: bool true = item has 0 Health or less

if ( item.IsRuined() )
{
	Print("Object is ruined!");
}
Referenced by ActionDigInStash.ActionCondition(), ActionDisarmExplosiveWithRemoteDetonator.ActionCondition(), ActionDisarmExplosiveWithRemoteDetonatorUnpaired.ActionCondition()
Show 47 more, ActionFillCoolant.ActionCondition(), ActionFishingNew.ActionCondition(), ActionMountBarbedWire.ActionCondition(), ActionSwitchLights.ActionCondition(), ActionTriggerRemotely.ActionCondition(), ActionTriggerRemotely.OnExecuteServer(), BoatScript.CheckOperationalRequirements(), BoatScript.CheckOperationalState(), CarScript.CheckOperationalRequirements(), CarScript.CheckVitalItem(), CarScript.OnBeforeLightOn(), CarScript.UpdateHeadlightState(), CarWheel_Ruined.CanPutAsAttachment(), CatchingContextFishingRodAction.InitItemValues(), CatchingContextTrapsBase.InitItemValues(), ComponentEnergyManager.CanWork(), ComponentEnergyManager.DeviceUpdate(), ComponentEnergyManager.FindAndConsumeEnergy(), Construction.MaterialIsRuined(), ContainerWithElectricManager.ElectricityIcon(), Cooking.CookWithEquipment(), DayZCreature.IsIgnoredByConstruction(), DayZPlayerImplementMeleeCombat.TrySelectFinisherType(), DayZPlayerMeleeFightLogic_LightHeavy.WeaponDestroyedCheck(), EntityAI.IsRefresherSignalingViable(), ExplosivesBase.OnCEUpdate(), FireworksBase.StandUp(), FlammableBase.StandUp(), HandsContainer.ElectricityIcon(), ItemBase.CanPutAsAttachment(), ItemBase.CanPutInCargo(), ItemCompass.OnInventoryEnter(), ItemCompass.OnInventoryExit(), ItemCompass.OnWasAttached(), ItemCompass.OnWasDetached(), Land_FuelStation_Feed.HasFuelToGive(), MaskBase.HasValidFilter(), PlayerBase.CheckMeleeItemDamage(), PlayerBase.IsIgnoredByConstruction(), PowerGeneratorBase.HasSparkplug(), PowerGeneratorStatic.HasSparkplug(), RemoteDetonatorTrigger.OnActivatedByItem(), RemoteDetonatorTrigger.OnCEUpdate(), Trap_RabbitSnare.SetupTrap(), TrapBase.IsActivable(), WeaponManager.GetPreparedMagazine(), and WeaponParticlesBase.OnActivate()
void OnSimulationEnabled()

Event called from C++ when simulation is enabled

void OnSimulationDisabled()

Event called from C++ when simulation is disabled

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, unless create_local is set to false. Returns the sound itself.

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 local, unless create_local is set to false. Returns the sound itself.

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, false - not played)

Referenced by BarbedWire.OnVariablesSynchronized(), BaseBuildingBase.SoundBuildStart(), BaseBuildingBase.SoundDestroyStart()
Show 40 more, BaseBuildingBase.SoundDismantleStart(), CarDoor.EEHealthLevelChanged(), CarScript.HandleCarHornSound(), ClockBase.EEHitByRemote(), ClockBase.OnDamageDestroyed(), ClockBase.OnVariablesSynchronized(), CombinationLock.SoundLockChangeDial(), CombinationLock.SoundLockChangeNumber(), CombinationLock.SoundLockClose(), CombinationLock.SoundLockOpen(), ComponentEnergyManager.OnOwnSocketReleased(), ComponentEnergyManager.OnOwnSocketTaken(), DestructionEffectBase.OnHealthLevelChanged(), EasterEgg.PlaySFX(), Fence.SoundGateCloseEnd(), Fence.SoundGateCloseStart(), Fence.SoundGateOpenStart(), FireplaceBase.SoundFireExtinguishedStart(), FireplaceBase.SoundFireWetNoIgniteStart(), FireplaceBase.SoundFireWindyNoIgniteStart(), FireworksLauncher.OnFuseIgnitedClient(), FireworksLauncherClientEvent.OnFired(), FireworksLauncherClientEvent.PlayExplosionSound(), Grenade_ChemGas.OnDamageDestroyed(), KitchenTimer.OnRingingStopClient(), Land_Radio_PanelPAS.SoundTurnOff(), Land_Radio_PanelPAS.SoundTurnOn(), Land_Underground_Panel.OnPanelUsedSynchronized(), Land_Underground_Stairs_Exit.HandleAudioPlayback(), PlaySoundSetLoop(), PlayerBase.BreakLegSound(), PortableGasLamp.SoundTurnOff(), PortableGasLamp.SoundTurnOn(), PortableGasStove.SoundTurnOff(), PortableGasStove.SoundTurnOn(), PowerGeneratorBase.OnWorkStart(), PowerGeneratorBase.OnWorkStop(), Roadflare.OnWorkStart(), Spotlight.SoundTurnOff(), and Spotlight.SoundTurnOn()
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 if it already exists and playing, before playing the new sound

void PostAreaDamageActions()
void PreAreaDamageActions()
void SpawnDamageDealtEffect()
void OnReceivedHit(ImpactEffectsData hitData)
void OnPlayerRecievedHit()

DEPRECATED

bool HasNetworkID()
References GetNetworkID()
bool NameOverride(out string output)
Referenced by GetDisplayName()
bool DescriptionOverride(out string output)
EntityAI ProcessMeleeItemDamage(int mode = 0)
bool CanBeRepairedToPristine()
void SetDebugItem()DEVELOPER
bool HasFixedActionTargetCursorPosition()
void Gizmo_SetWorldTransform(vector transform[4], bool finalize)
void Gizmo_GetWorldTransform(vector transform[4])
bool Gizmo_IsAllowedTransformMode(GizmoTransformMode mode)
bool Gizmo_IsAllowedSpaceMode(GizmoSpaceMode mode)