DayZ 1.24
Loading...
Searching...
No Matches
Inheritance diagram for IEntity:
[legend]
Collaboration diagram for IEntity:
[legend]

Protected Member Functions

Event methods

Event method stubs. Reimplement these in inherited entities to receive event calls

void EOnTouch (IEntity other, int extra)
 EntityEvent.TOUCH.
 
void EOnInit (IEntity other, int extra)
 EntityEvent.INIT.
 
void EOnExtra (IEntity other, int extra)
 EntityEvent.EXTRA.
 
void EOnNotVisible (IEntity other, int extra)
 EntityEvent.NOTVISIBLE.
 
void EOnFrame (IEntity other, float timeSlice)
 EntityEvent.FRAME.
 
int EOnVisible (IEntity other, int extra)
 EntityEvent.VISIBLE.
 
void EOnPostFrame (IEntity other, int extra)
 EntityEvent.POSTFRAME.
 
void EOnWorldProcess (IEntity other, int extra)
 EntityEvent.WORLDPROCESS.
 
void EOnAnimEvent (IEntity other, AnimEvent extra)
 EntityEvent.ANIMEVENT.
 
void EOnSoundEvent (IEntity other, SoundEvent extra)
 EntityEvent.SOUNDEVENT.
 
void EOnSimulate (IEntity other, float dt)
 EntityEvent.SIMULATE.
 
void EOnPostSimulate (IEntity other, float timeSlice)
 EntityEvent.POSTSIMULATE.
 
void EOnJointBreak (IEntity other, int extra)
 EntityEvent.JOINTBREAK.
 
void EOnPhysicsMove (IEntity other, int extra)
 EntityEvent.PHYSICSMOVE.
 
void EOnContact (IEntity other, Contact extra)
 EntityEvent.CONTACT.
 
void EOnUser0 (IEntity other, int extra)
 EntityEvent.EV_USER+0.
 
void EOnUser1 (IEntity other, int extra)
 EntityEvent.EV_USER+1.
 
void EOnEnter (IEntity other, int extra)
 EntityEvent.ENTER.
 
void EOnLeave (IEntity other, int extra)
 EntityEvent.LEAVE.
 
void EOnUser4 (IEntity other, int extra)
 EntityEvent.EV_USER+4.
 
void EOnDummy020 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy021 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy022 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy023 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy024 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy025 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy026 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy027 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy028 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy029 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy030 (IEntity other, int extra)
 Placeholder.
 
void EOnDummy031 (IEntity other, int extra)
 Placeholder.
 
Transformation methods

Setting and getting of entity transformation

proto external void GetTransform (out vector mat[])
 Returns transformation of Entity. It returns only so much vectors as array is big.
 
proto external void GetRenderTransform (out vector mat[])
 Returns render transformation of Entity. Must pass in vector array size of 4.
 
proto external void GetLocalTransform (out vector mat[])
 Returns local transformation of Entity. It returns only so much vectors as array is big.
 
proto native external vector GetTransformAxis (int axis)
 Returns one row of Entity transformation matrix.
 
proto native external void SetTransform (vector mat[4])
 Sets entity transformation.
 
proto native external vector GetOrigin ()
 Returns origin of Entity.
 
proto external vector GetLocalPosition ()
 Returns local position of Entity.
 
proto native external vector GetYawPitchRoll ()
 Returns orientation of Entity in world space (Yaw, Pitch, Roll)
 
proto native external vector GetAngles ()
 Same as GetYawPitchRoll, but returns rotation vector around X, Y and Z axis.
 
proto native external vector GetLocalYawPitchRoll ()
 Returns local orientation when it's in hierarchy (Yaw, Pitch, Roll)
 
proto native external vector GetLocalAngles ()
 Same as GetLocalYawPitchRoll, but returns rotation vector around X, Y and Z axis.
 
proto native external void SetYawPitchRoll (vector angles)
 Sets angles for entity (Yaw, Pitch, Roll)
 
proto native external void SetAngles (vector angles)
 Same as SetYawPitchRoll, but sets rotation around X, Y and Z axis.
 
proto native external void SetOrigin (vector orig)
 Sets origin for entity.
 
proto native external float GetScale ()
 
proto native external void SetScale (float scale)
 
proto native external vector VectorToParent (vector vec)
 Transforms local vector to world space.
 
proto native external vector CoordToParent (vector coord)
 Transforms local position to world space.
 
proto native external vector VectorToLocal (vector vec)
 Transforms world space vector to local space.
 
proto native external vector CoordToLocal (vector coord)
 Transforms world space position to local space.
 
Name/ID methods
proto native int GetID ()
 Return unique entity ID.
 
proto native void SetID (int id)
 Set unique entity ID.
 
proto native void SetName (string name)
 
proto native external owned string GetName ()
 
Hierarchy methods

Scene hierarchy management

proto native external bool AddChild (notnull IEntity child, int pivot, bool positionOnly=false)
 Adds child entity to this entity.
 
proto native external bool RemoveChild (notnull IEntity child, bool keepTransform=false)
 Removes child entity from hierarchy.
 
proto native bool IsHierarchyPositionOnly ()
 Returns if the hierarchy component was created with positionOnly.
 
proto native int GetHierarchyPivot ()
 Returns the hierarchy component pivot.
 
proto native IEntity GetParent ()
 Returns pointer to parent Entity in hierarchy.
 
proto native IEntity GetChildren ()
 Returns pointer to first child Entity in hierarchy.
 
proto native IEntity GetSibling ()
 Returns pointer to next child Entity on the same hierarchy.
 
proto external void GetBounds (out vector mins, out vector maxs)
 Returns local bounding box of model on Entity.
 
proto external void GetWorldBounds (out vector mins, out vector maxs)
 Returns quantized world-bound-box of Entity.
 
Simulation/handling properties

Flags that affects simulation and entity handling behavior

proto native external EntityFlags GetFlags ()
 Returns Entity flags.
 
proto native external bool IsFlagSet (EntityFlags flags)
 Test if one or more of specified flags are set.
 
proto native external EntityFlags SetFlags (EntityFlags flags, bool recursively)
 Sets Entity flags. It's OR operation, not rewrite. Returns previous flags.
 
proto native external EntityFlags ClearFlags (EntityFlags flags, bool recursively)
 Clear Entity flags. Returns cleared flags.
 
proto native external EntityEvent GetEventMask ()
 Returns current event mask.
 
proto native external EntityEvent SetEventMask (EntityEvent e)
 Sets event mask.
 
proto native external EntityEvent ClearEventMask (EntityEvent e)
 Clears event mask.
 
proto external volatile void SendEvent (notnull IEntity actor, EntityEvent e, void extra)
 Dynamic event invokation. Parameters are the same as in IEntity::EOnXXXX() methods.
 
Visual component methods

Manipulation with visual component - model, particle effect etc

proto native external void SetObject (vobject object, string options)
 
proto native vobject GetVObject ()
 Returns visual object set to this Entity. No reference is added.
 
proto native external int Animate (float speed, int loop)
 Updates animation (either xob, or particle, whatever)
 
proto native external int AnimateEx (float speed, int loop, out vector lin, out vector ang)
 Updates animation (either xob, or particle, whatever)
 
proto native external int SetCameraMask (int mask)
 Sets visibility mask for cameras, where Entity will be rendered.
 
proto native external void FilterNextTrace ()
 When called, the Entity is excluded from consequent TraceMove/TraceLine.
 
proto native external int Update ()
 

Private Member Functions

void ~Object ()
 
void Object ()
 
bool CanBeSkinned ()
 
void Delete ()
 Delete this object in next frame.
 
proto native void AddProxyPhysics (string proxySelectionName)
 
proto native void RemoveProxyPhysics (string proxySelectionName)
 
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.
 
proto native owned string GetLODName (LOD lod)
 Retrieve LOD name.
 
proto native vector GetBoundingCenter ()
 
LOD GetLODByName (string name)
 Retrieve LOD by given name.
 
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)
 
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)
 
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 ToDelete ()
 Flag to determine this object is marked to be deleted soon.
 
proto native bool IsPendingDeletion ()
 
proto native int GetGeometryLevel ()
 Native functions for getting the level used for calculating the pivot.
 
proto native int GetFireGeometryLevel ()
 
proto native int GetViewGeometryLevel ()
 
proto native int GetMemoryLevel ()
 
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.
 
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 vector GetBonePositionMS (int pivot)
 
proto native vector GetBonePositionWS (int pivot)
 
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)
 
proto native vector GetPosition ()
 Retrieve position.
 
proto native vector GetWorldPosition ()
 
proto native void SetPosition (vector vPos)
 Set position.
 
proto native void PlaceOnSurface ()
 Place object on surface.
 
proto native vector GetOrientation ()
 Retrieve orientation (yaw, pitch, roll) in degrees
 
proto native void SetOrientation (vector vOrientation)
 Set orientation (yaw, pitch, roll) in degrees
 
proto native vector GetDirection ()
 Retrieve direction vector.
 
proto native void SetDirection (vector vPos)
 Set direction of object.
 
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.
 
proto native bool GetCollisionBox (out vector minMax[2])
 Gets collision bounding box.
 
proto native float GetCollisionRadius ()
 Gets collision radius (bounding sphere)
 
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.
 
string GetSurfaceType ()
 Returns type 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)
 
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.
 
string GetType ()
 Get config class of object.
 
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 IsKindOf (string type)
 Check config class name of the object.
 
bool IsAlive ()
 
bool IsMan ()
 Returns if this entity is Man.
 
bool IsDayZCreature ()
 Checks if this instance is of type DayZCreature.
 
bool IsEntityAI ()
 Returns if this entity is EntityAI.
 
bool IsStaticTransmitter ()
 Returns if this entity is Static Transmitter.
 
bool IsTransmitter ()
 Returns if this entity is a non-static Transmitter.
 
bool IsItemBase ()
 Returns if this entity is ItemBase.
 
bool IsContainer ()
 
bool IsMagazine ()
 Returns if this entity is Magazine.
 
bool IsAmmoPile ()
 Returns if this entity is Ammo Pile.
 
bool IsInventoryItem ()
 Returns if this entity is InventoryItem.
 
bool IsClothing ()
 Returns if this entity is Clothing.
 
bool IsFireplace ()
 Returns if this entity is fireplacebase.
 
bool IsTree ()
 Returns if this entity is tree.
 
bool IsRock ()
 Returns if this entity is rock.
 
bool IsWoodBase ()
 Returns whether object is PlanBase.
 
bool IsBush ()
 Returns if this entity is bush.
 
bool IsCuttable ()
 
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
 
bool IsBuilding ()
 Returns if this entity is Building.
 
EWaterSourceObjectType GetWaterSourceObjectType ()
 
bool IsWell ()
 
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 IsTransport ()
 Returns if this entity is transport.
 
bool IsElectricAppliance ()
 Returns if this is an appliance, that can be plugged into electric circuit (== not energy source)
 
bool CanUseConstruction ()
 Returns if this entity can be constucted,deconstructed (e.g. fence,watchtower)
 
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.
 
bool IsFruit ()
 
bool IsMeat ()
 
bool IsCorpse ()
 
bool IsMushroom ()
 
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 IsParticle ()
 
bool IsItemTent ()
 
bool IsScriptedLight ()
 
bool IsHologram ()
 
bool HasProxyParts ()
 
bool CanObstruct ()
 
bool CanProxyObstruct ()
 
bool CanProxyObstructSelf ()
 can the object's own proxy geometry obstruct it? Currently checking 'ObjIntersectView'
 
bool CanBeIgnoredByDroppedItem ()
 
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)
 
string GetNetworkIDString ()
 
override string GetDebugName ()
 
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.
 
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.
 
vector GetSelectionPositionOld (string name)
 
vector GetSelectionPositionLS (string name)
 
vector GetSelectionPositionMS (string name)
 
vector GetSelectionPositionWS (string name)
 
vector ModelToWorld (vector modelPos)
 
vector WorldToModel (vector worldPos)
 
proto string ConfigGetString (string entryName)
 
proto string ConfigGetStringRaw (string entryName)
 Get a raw strings from config entry.
 
proto int ConfigGetInt (string entryName)
 
bool ConfigGetBool (string entryName)
 
proto float ConfigGetFloat (string entryName)
 
proto vector ConfigGetVector (string entryName)
 
proto native void ConfigGetTextArray (string entryName, out TStringArray values)
 Get array of strings from config entry.
 
proto native void ConfigGetTextArrayRaw (string entryName, out TStringArray values)
 Get array of raw strings from config entry.
 
proto native void ConfigGetFloatArray (string entryName, out TFloatArray values)
 Get array of floats from config entry.
 
proto native void ConfigGetIntArray (string entryName, out TIntArray values)
 Get array of integers from config entry.
 
proto native bool ConfigIsExisting (string entryName)
 Checks if given entry exists.
 
bool KindOf (string tag)
 Compares config class name to given string.
 
bool IsAnyInherited (array< typename > typenames)
 
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.
 
proto native float GetHealth (string zoneName, string healthType)
 Returns current state of health.
 
proto native float GetHealth01 (string zoneName, string healthType)
 Returns current state of health in range <0, 1>.
 
proto native float GetMaxHealth (string zoneName, string healthType)
 Returns maximum value of health.
 
proto native void SetHealth (string zoneName, string healthType, float value)
 Sets current state of health.
 
proto native void SetFullHealth ()
 Sets full health to all zones and removes fatal damage when applicable.
 
proto native void AddHealth (string zoneName, string healthType, float value)
 Adds health.
 
proto native void DecreaseHealth (string zoneName, string healthType, float value)
 Decreases health.
 
void DecreaseHealth (string zoneName, string healthType, float value, bool auto_delete)
 Decreases health with the option of auto-deleting the object if its ruined.
 
float GetHealth ()
 Equivalent of GetHealth("", "");.
 
float GetHealth01 ()
 Equivalent of GetHealth01("", "");.
 
float GetMaxHealth ()
 Equivalent of GetMaxHealth("", "");.
 
void SetHealth (float health)
 Equivalent of SetHealth("", "", float value);.
 
void SetGlobalHealth (float health)
 Equivalent of SetHealth("", "", float value);.
 
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.
 
void SetHealth01 (string zoneName, string healthType, float coef)
 Sets health relative to its maximum.
 
void SetHealthMax (string zoneName="", string healthType="")
 Sets health to its maximum (zone or global)
 
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.
 
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.
 
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.
 
proto native void GetDamageZones (out TStringArray dmgZones)
 Obtains a list of nammes of all object's damage zones.
 
proto native vector GetDamageZonePos (string zoneName)
 Obtains middle position of damage zone based on it's name.
 
proto native owned string GetDamageZoneNameByComponentIndex (int componentIndex)
 Obtains name of damage zone based on index of specific 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).
 
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).
 
proto native float GetHealthLevelValue (int healthLevel, string zone="")
 Returns cutoff value for health level specified in object's config class parameter healthLevels.
 
proto native bool GetAllowDamage ()
 Returns if object can receive damage.
 
proto native void SetAllowDamage (bool val)
 Enable or disable object to 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)
 
bool IsRuined ()
 Returns whether the object is ruined (0 Health).
 
void OnSimulationEnabled ()
 Event called from C++ when simulation is enabled.
 
void OnSimulationDisabled ()
 Event called from C++ when simulation is disabled.
 
void GetActions (typename action_input_type, out array< ActionBase_Basic > actions)
 
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)
 
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, false - not played)
 
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.
 
bool PlaySoundSetAtMemoryPointLooped (out EffectSound sound, string soundSet, string memoryPoint, float play_fade_in=0, float stop_fade_out=0)
 
bool PlaySoundSetAtMemoryPoint (out EffectSound sound, string soundSet, string memoryPoint, bool looped=false, float play_fade_in=0, float stop_fade_out=0)
 
bool StopSoundSet (out EffectSound sound)
 EffectSound - stops soundset and returns state of the sound (true - stopped, false - not playing)
 
void PostAreaDamageActions ()
 
void PreAreaDamageActions ()
 
void SpawnDamageDealtEffect ()
 
void OnReceivedHit (ImpactEffectsData hitData)
 
void OnPlayerRecievedHit ()
 DEPRECATED.
 
bool HasNetworkID ()
 
bool NameOverride (out string output)
 
bool DescriptionOverride (out string output)
 
EntityAI ProcessMeleeItemDamage (int mode=0)
 
bool CanBeRepairedToPristine ()
 
vector GetCenter ()
 
void AddArrow (Object arrow, int componentIndex, vector closeBonePosWS, vector closeBoneRotWS)
 
bool CanBeActionTarget ()
 
bool HasFixedActionTargetCursorPosition ()
 
- Private Member Functions inherited from Managed
void IntroSceneCharacter ()
 
void ~IntroSceneCharacter ()
 
bool IsDefaultCharacter ()
 
void SetToDefaultCharacter ()
 
void SetCharacterID (int char_id)
 
int GetCharacterID ()
 
PlayerBase GetCharacterObj ()
 
TStringArray GetCharGenderList ()
 
TStringArray GetCharList (ECharGender gender)
 
TStringArray GetCharShirtsList ()
 
TStringArray GetCharPantsList ()
 
TStringArray GetCharShoesList ()
 
void SetCharacterGender (ECharGender gender)
 
bool IsCharacterFemale ()
 
ECharGender GetCharacterGender ()
 
vector GetPosition ()
 
int GetNextCharacterID ()
 
int GetPrevCharacterID ()
 
void CreateNewCharacterRandom ()
 
void CreateNewCharacterById (int character_id)
 
void CreateNewCharacterByName (string character_name, bool randomize_equip=true)
 
void CreateDefaultCharacter ()
 
void GetLastPlayedServer (int characterID, out string address, out string name, out int port)
 
void CreateNewCharacter ()
 
void LoadCharacterData (vector char_pos, vector char_rot, bool default_char=false)
 Generates random equip for the new IntroSceneCharacter, whatever is defined in 'cfgCharacterCreation'.
 
void CharacterUnload ()
 
void CharacterLoad (int character_id, vector char_pos, vector char_rot)
 
void SetupPlayerName (bool new_name)
 
void SetAttachment (string type, int slot)
 
string GetCharacterNameById (int char_id)
 
string GetCharacterName ()
 
void SaveCharName (string name)
 
void SaveDefaultCharacter ()
 
void TransferValues (PlayerBase player)
 
void Init ()
 
void OnScheduledTick (float deltatime)
 
void CheckValues ()
 
float GetBlood ()
 
float GetHealth ()
 
void CheckHealth ()
 
void CheckBlood ()
 
void SendInitValues ()
 Sends values on object creation.
 
void SendValue (int value_type, float value)
 
void ReceiveValue (int value_type, float value)
 
void OnRPC (ParamsReadContext ctx)
 
void ShowDebugValues (bool show)
 
void BleedingIndicator (int source_ID, int severity, GameplayEffectsDataBleeding parent)
 
void InitIndicator (vector position)
 
void StopIndicator (bool instant=false)
 
void StartRunningDrops ()
 
bool IsRunningDrops ()
 Are any drops currently being animated?
 
void TrySpawnNextDrop ()
 
void ResetSequence ()
 
void ResetIndicator ()
 
void Update (float timeSlice)
 
bool GetEndNow ()
 
int GetSeverity ()
 
void GameplayEffectsData (array< ref Widget > input, int type, int user_override=-1)
 
void Init (array< ref Widget > input, int type, Widget layout_root, int user_override=-1)
 
array< ref WidgetGetWidgetSet ()
 
int GetWidgetSetType ()
 
int GetWidgetSetID ()
 
bool HasDefinedHandle ()
 Returns 'true' if this class contains update info.
 
bool DataInitialized ()
 
void UpdateVisibility (bool state)
 
void RegisterData (Param p)
 
void Update (float timeSlice=0, Param p=null, int handle=-1)
 
void ForceStop ()
 

Static Private Member Functions

static string GetDebugName (Object o)
 

Additional Inherited Members

- Private Attributes inherited from Managed
int m_CharacterId
 
string m_CharacterType
 
MenuData m_CharacterDta
 
PlayerBase m_CharacterObj
 
vector m_CharacterPos
 
vector m_CharacterRot
 
ref TStringArray m_CharGenderList = new TStringArray
 
ref TStringArray m_CharShirtList = new TStringArray
 
ref TStringArray m_CharPantsList = new TStringArray
 
ref TStringArray m_CharShoesList = new TStringArray
 
ref map< ECharGender, ref array< string > > m_Characters = new map<ECharGender, ref array<string>>
 
ECharGender m_CharGender
 
bool m_InitialSyncSent
 
bool m_Initialized
 
bool m_Terminating = false
 
bool m_EndNow = false
 
bool m_IsRunning = false
 
int m_DropSpawnsQueued
 
int m_ActiveDropsCount
 
int m_Severity
 
int m_SourceID
 
GameplayEffectsDataBleeding m_ParentMetaData
 
array< floatm_DropProbabilityArray
 
float m_AverageFrequency
 
float m_SequenceTick
 
float m_SequenceDuration
 
float m_TimeElapsedTotal
 
float m_TimeElapsedSequence
 
float m_LastDropSpawnTime
 
float m_DropSpawnMinDelay
 
float m_DropSpawnMaxDelay
 
int m_CurrentDropProbabilityStep
 
int m_DropProbabilityRollsCount
 
vector m_BasePosition
 
ref set< ref BleedingIndicatorDropDatam_ActiveDrops
 
ref set< intm_CleanupQueue
 
ref array< ref Widgetm_WidgetArray
 
int m_Type
 
int m_WidgetSetIdentifier
 
Widget m_LayoutRoot
 

Detailed Description

Internal ancestor of all Entity implementations.

Definition at line 163 of file EnEntity.c.

Constructor & Destructor Documentation

◆ ~Object()

void IEntity::~Object ( )
private

Member Function Documentation

◆ AddArrow()

void IEntity::AddArrow ( Object arrow,
int componentIndex,
vector closeBonePosWS,
vector closeBoneRotWS )
inlineprivate

Definition at line 1351 of file Object.c.

1352 {
1356
1357 if (pivot == -1)
1359 else
1361
1362 float scale = GetScale();
1363 scale = 1 / (scale * scale);
1364
1365 arrow.GetTransform(arrowTransMat);
1367
1368 // orthogonalize matrix - parent might be skewed
1370
1371 arrowTransMat[3] = arrowTransMat[3] * scale;
1372
1373 arrow.SetTransform(arrowTransMat);
1374
1376 }
proto int GetBonePivot(int level, int component)
Get the pivot point of the bone from the component index in the LOD, level can be geometry,...
proto native int GetFireGeometryLevel()
proto native void GetBoneTransformWS(int pivot, out vector transform[4])
proto native external bool AddChild(notnull IEntity child, int pivot, bool positionOnly=false)
Adds child entity to this entity.
proto external void GetTransform(out vector mat[])
Returns transformation of Entity. It returns only so much vectors as array is big.
proto native external float GetScale()
static proto void MatrixInvMultiply4(vector mat0[4], vector mat1[4], out vector res[4])
Invert-transforms matrix.
static proto void MatrixOrthogonalize4(vector mat[4])
Orthogonalizes matrix.

References AddChild(), Math3D::MatrixInvMultiply4(), and Math3D::MatrixOrthogonalize4().

◆ AddHealth() [1/2]

void IEntity::AddHealth ( float add_health)
inlineprivate

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

Definition at line 1086 of file Object.c.

1087 {
1088 AddHealth("", "", add_health);
1089 }
proto native void AddHealth(string zoneName, string healthType, float value)
Adds health.

◆ AddHealth() [2/2]

proto native void IEntity::AddHealth ( string zoneName,
string healthType,
float value )
private

Adds health.

Parameters
zoneNameif empty string, sets state of global health
healthTypeif empty string, sets state of main health

◆ AddHealthLevel()

void IEntity::AddHealthLevel ( int healthLevelDelta,
string zone = "" )
inlineprivate

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.

Definition at line 1068 of file Object.c.

1069 {
1073 }
proto native int GetHealthLevel(string zone="")
Returns global health level specified in object's config class parameter healthLevels (range is usual...
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:1063
proto native int GetNumberOfHealthLevels(string zone="")
Returns global number of health levels specified in object's config class parameter healthLevels (ran...
Definition EnMath.c:7
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'.

References Math::Clamp().

◆ AddProxyPhysics()

proto native void IEntity::AddProxyPhysics ( string proxySelectionName)
private

◆ CanAffectPathgraph()

proto native bool IEntity::CanAffectPathgraph ( )
private

Returns true if object's geometry can affect pathgraph generation.

◆ CanBeActionTarget()

bool IEntity::CanBeActionTarget ( )
inlineprivate

Definition at line 1378 of file Object.c.

1379 {
1380 return !IsHologram();
1381 }
bool IsHologram()
Definition Object.c:747

References IsHologram().

◆ CanBeAutoDeleted()

bool IEntity::CanBeAutoDeleted ( )
inlineprivate

Definition at line 778 of file Object.c.

779 {
780 return true;
781 }

◆ CanBeIgnoredByDroppedItem()

bool IEntity::CanBeIgnoredByDroppedItem ( )
inlineprivate

Definition at line 773 of file Object.c.

774 {
775 return IsBush() || IsTree() || IsMan() || IsDayZCreature() || IsItemBase();
776 }
bool IsMan()
Returns if this entity is Man.
Definition Object.c:510
bool IsTree()
Returns if this entity is tree.
Definition Object.c:582
bool IsItemBase()
Returns if this entity is ItemBase.
Definition Object.c:540
bool IsBush()
Returns if this entity is bush.
Definition Object.c:600
bool IsDayZCreature()
Checks if this instance is of type DayZCreature.
Definition Object.c:516

References IsDayZCreature(), and IsItemBase().

◆ CanBeRepairedToPristine()

bool IEntity::CanBeRepairedToPristine ( )
inlineprivate

Definition at line 1328 of file Object.c.

1329 {
1330 return false;
1331 }

◆ CanBeSkinned()

bool IEntity::CanBeSkinned ( )
inlineprivate

Definition at line 69 of file Object.c.

70 {
71 return false;
72 }

◆ CanObstruct()

bool IEntity::CanObstruct ( )
inlineprivate

Definition at line 757 of file Object.c.

758 {
759 return IsPlainObject() && !IsScenery();
760 }
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)

◆ CanProxyObstruct()

bool IEntity::CanProxyObstruct ( )
inlineprivate

Definition at line 762 of file Object.c.

763 {
764 return HasProxyParts() || CanUseConstruction();
765 }
bool CanUseConstruction()
Returns if this entity can be constucted,deconstructed (e.g. fence,watchtower)
Definition Object.c:670
bool HasProxyParts()
Definition Object.c:752

References CanUseConstruction().

◆ CanProxyObstructSelf()

bool IEntity::CanProxyObstructSelf ( )
inlineprivate

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

Definition at line 768 of file Object.c.

769 {
770 return false;
771 }

◆ CanUseConstruction()

bool IEntity::CanUseConstruction ( )
inlineprivate

Returns if this entity can be constucted,deconstructed (e.g. fence,watchtower)

Definition at line 670 of file Object.c.

671 {
672 return false;
673 }

◆ CanUseConstructionBuild()

bool IEntity::CanUseConstructionBuild ( )
inlineprivate

Returns if this entity can be built, specifically.

Definition at line 676 of file Object.c.

677 {
678 return false;
679 }

◆ CanUseHandConstruction()

bool IEntity::CanUseHandConstruction ( )
inlineprivate

Returns if this entity can be constructed without tools.

Definition at line 682 of file Object.c.

683 {
684 return false;
685 }

◆ ClippingInfo()

proto float IEntity::ClippingInfo ( out vector minMax[2])
private

Get Clipping info.

Parameters
minMaxarray[2] of vectors, into minMax[0] is returned min, into minMax[1] is returned max
Returns
radius of bounding box
float radius = GetGame().GetPlayer().ClippingInfo(minMax);
Print(radius);
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.

◆ ConfigGetBool()

bool IEntity::ConfigGetBool ( string entryName)
inlineprivate

Definition at line 876 of file Object.c.

877 {
878 return (ConfigGetInt(entryName) == 1);
879 }
proto int ConfigGetInt(string entryName)

◆ ConfigGetFloat()

proto float IEntity::ConfigGetFloat ( string entryName)
private

◆ ConfigGetFloatArray()

proto native void IEntity::ConfigGetFloatArray ( string entryName,
out TFloatArray values )
private

Get array of floats from config entry.

Parameters
entryName
valueoutput

◆ ConfigGetInt()

proto int IEntity::ConfigGetInt ( string entryName)
private

◆ ConfigGetIntArray()

proto native void IEntity::ConfigGetIntArray ( string entryName,
out TIntArray values )
private

Get array of integers from config entry.

Parameters
entryName
valueoutput

◆ ConfigGetString()

proto string IEntity::ConfigGetString ( string entryName)
private

◆ ConfigGetStringRaw()

proto string IEntity::ConfigGetStringRaw ( string entryName)
private

Get a raw strings from config entry.

Parameters
entryName
Returns
value output string
Note
use 'FormatRawConfigStringKeys' method to change localization keys to script-friendly

◆ ConfigGetTextArray()

proto native void IEntity::ConfigGetTextArray ( string entryName,
out TStringArray values )
private

Get array of strings from config entry.

Parameters
entryName
valueoutput

◆ ConfigGetTextArrayRaw()

proto native void IEntity::ConfigGetTextArrayRaw ( string entryName,
out TStringArray values )
private

Get array of raw strings from config entry.

Parameters
entryName
valueoutput in raw format (localization keys '$STR_' are not translated).
Note
use 'FormatRawConfigStringKeys' method to change localization keys to script-friendly

◆ ConfigGetVector()

proto vector IEntity::ConfigGetVector ( string entryName)
private

◆ ConfigIsExisting()

proto native bool IEntity::ConfigIsExisting ( string entryName)
private

Checks if given entry exists.

Parameters
entryName

◆ CreateDynamicPhysics()

proto native void IEntity::CreateDynamicPhysics ( int interactionLayers)
private

◆ DecreaseHealth() [1/3]

void IEntity::DecreaseHealth ( float dec_health,
bool auto_delete = true )
inlineprivate

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

Definition at line 1091 of file Object.c.

1092 {
1094 }
proto native void DecreaseHealth(string zoneName, string healthType, float value)
Decreases health.

◆ DecreaseHealth() [2/3]

proto native void IEntity::DecreaseHealth ( string zoneName,
string healthType,
float value )
private

Decreases health.

Parameters
zoneNameif empty string, sets state of global health
healthTypeif empty string, sets state of main health

◆ DecreaseHealth() [3/3]

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

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

Parameters
zoneNameif empty string, sets state of global health
healthTypeif empty string, sets state of main health

Definition at line 1027 of file Object.c.

1028 {
1030
1032
1033 if (auto_delete && result_health <= 0)
1034 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).Call(GetGame().ObjectDelete, this);
1035 }
float GetHealth()
Equivalent of GetHealth("", "");.
Definition Object.c:1038
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8

References CALL_CATEGORY_SYSTEM, and GetGame().

◆ DecreaseHealthCoef()

void IEntity::DecreaseHealthCoef ( float dec_health_coef,
bool auto_delete = true )
inlineprivate

Decreases health by the given coeficient.

Definition at line 1096 of file Object.c.

1097 {
1098 float current_health = GetHealth();
1102 }
float GetHealth01()
Equivalent of GetHealth01("", "");.
Definition Object.c:1043
float GetMaxHealth()
Equivalent of GetMaxHealth("", "");.
Definition Object.c:1048

◆ Delete()

void IEntity::Delete ( )
inlineprivate

Delete this object in next frame.

Returns
void
ItemBase item = GetGame().GetPlayer().CreateInInventory("GrenadeRGD5");
item.Delete();

Definition at line 82 of file Object.c.

83 {
84 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).Call(GetGame().ObjectDelete, this);
85 }

References CALL_CATEGORY_SYSTEM, and GetGame().

◆ DescriptionOverride()

bool IEntity::DescriptionOverride ( out string output)
inlineprivate

Definition at line 1321 of file Object.c.

1322 {
1323 return false;
1324 }

◆ DisableVicinityIcon()

bool IEntity::DisableVicinityIcon ( )
inlineprivate

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

Definition at line 784 of file Object.c.

785 {
786 return false;
787 }

◆ DisplayNameRuinAttach()

bool IEntity::DisplayNameRuinAttach ( )
inlineprivate

Definition at line 478 of file Object.c.

479 {
480 return false;
481 }

◆ EEOnDamageCalculated()

bool IEntity::EEOnDamageCalculated ( TotalDamageResult damageResult,
int damageType,
EntityAI source,
int component,
string dmgZone,
string ammo,
vector modelPos,
float speedCoef )
inlineprivate

Event called from C++ right before damage is applied.

Returns
whether to apply the damage or not

Definition at line 1120 of file Object.c.

1121 {
1122 return true;
1123 }

◆ EnableDynamicCCD()

proto native void IEntity::EnableDynamicCCD ( bool state)
private

◆ Explode()

void IEntity::Explode ( int damageType,
string ammoType = "" )
inlineprivate

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

Definition at line 142 of file Object.c.

143 {
144 if (ammoType == "")
145 ammoType = ConfigGetString("ammoType");
146
147 if (ammoType == "")
148 ammoType = "Dummy_Heavy";
149
150 if (GetGame().IsServer())
151 {
153 DamageSystem.ExplosionDamage(EntityAI.Cast(this), null, ammoType, GetPosition(), damageType);
154 }
155 }
void SynchExplosion()
Definition Object.c:157
proto native vector GetPosition()
Retrieve position.
proto string ConfigGetString(string entryName)

References GetGame(), and GetPosition.

◆ GetActionComponentCenter()

proto vector IEntity::GetActionComponentCenter ( int level,
int componentIndex )
private

The center of the component, in model space.

◆ GetActionComponentCenterOOB()

proto vector IEntity::GetActionComponentCenterOOB ( int level,
int componentIndex )
private

The center of the component, in model space.

◆ GetActionComponentMinMax()

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

The AABB of the component.

◆ GetActionComponentName()

proto native owned string IEntity::GetActionComponentName ( int componentIndex,
string geometry = "" )
private

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

◆ GetActionComponentNameList()

proto native owned int IEntity::GetActionComponentNameList ( int componentIndex,
TStringArray nameList,
string geometry = "" )
private

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)

◆ GetActionComponentPosition()

proto native owned vector IEntity::GetActionComponentPosition ( int componentIndex,
string geometry = "" )
private

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

◆ GetActionComponentsForSelectionName()

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

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

◆ GetActions()

void IEntity::GetActions ( typename action_input_type ,
out array< ActionBase_Basic > actions )
inlineprivate

Definition at line 1206 of file Object.c.

1207 {
1208 }

◆ GetAllowDamage()

proto native bool IEntity::GetAllowDamage ( )
private

Returns if object can receive damage.

◆ GetBonePivot()

proto int IEntity::GetBonePivot ( int level,
int component )
private

Get the pivot point of the bone from the component index in the LOD, level can be geometry, fire, view or memory.

◆ GetBonePivotsForAnimationSource()

proto native void IEntity::GetBonePivotsForAnimationSource ( int level,
string animationSource,
out TIntArray pivots )
private

Get the pivots assigned to the animation source at the specified LOD.

◆ GetBonePositionLS()

proto native vector IEntity::GetBonePositionLS ( int pivot)
private

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

◆ GetBonePositionMS()

proto native vector IEntity::GetBonePositionMS ( int pivot)
private

◆ GetBonePositionWS()

proto native vector IEntity::GetBonePositionWS ( int pivot)
private

◆ GetBoneRotationLS()

proto native void IEntity::GetBoneRotationLS ( int pivot,
out float quaternion[4] )
private

returns local space, model space, world space orientation (quaternion) of a bone

◆ GetBoneRotationMS()

proto native void IEntity::GetBoneRotationMS ( int pivot,
out float quaternion[4] )
private

◆ GetBoneRotationWS()

proto native void IEntity::GetBoneRotationWS ( int pivot,
out float quaternion[4] )
private

◆ GetBoneTransformLS()

proto native void IEntity::GetBoneTransformLS ( int pivot,
out vector transform[4] )
private

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

◆ GetBoneTransformMS()

proto native void IEntity::GetBoneTransformMS ( int pivot,
out vector transform[4] )
private

◆ GetBoneTransformWS()

proto native void IEntity::GetBoneTransformWS ( int pivot,
out vector transform[4] )
private

◆ GetBoundingCenter()

proto native vector IEntity::GetBoundingCenter ( )
private

◆ GetCanBeDestroyed()

proto native bool IEntity::GetCanBeDestroyed ( )
private

Returns if object is destroyable.

◆ GetCenter()

vector IEntity::GetCenter ( )
inlineprivate

Definition at line 1333 of file Object.c.

1334 {
1335 if (MemoryPointExists("ce_center"))
1336 {
1337 //Print("CE_CENTER found");
1338 return ModelToWorld(GetMemoryPointPos("ce_center"));
1339 }
1340 else
1341 {
1342 //Print("CE_CENTER DOING A BAMBOOZLE => not found");
1343 return GetPosition() + Vector(0, 0.2, 0);
1344 }
1345 }
vector ModelToWorld(vector modelPos)
Definition Object.c:855
proto native bool MemoryPointExists(string memoryPoint)
proto native vector GetMemoryPointPos(string memoryPointName)
proto native vector Vector(float x, float y, float z)
Vector constructor from components.

References GetPosition, and Vector().

◆ GetCollisionBox()

proto native bool IEntity::GetCollisionBox ( out vector minMax[2])
private

Gets collision bounding box.

Parameters
minMaxarray[2] of vectors, into minMax[0] is returned min, into minMax[1] is returned max
Returns
true if collision box exists, false otherwise
Print("has box");
PlayerBase GetPlayer()
proto native bool GetCollisionBox(out vector minMax[2])
Gets collision bounding box.

◆ GetCollisionRadius()

proto native float IEntity::GetCollisionRadius ( )
private

Gets collision radius (bounding sphere)

Returns
bounding sphere radius

◆ GetDamage()

proto native float IEntity::GetDamage ( )
private

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

◆ GetDamageZoneNameByComponentIndex()

proto native owned string IEntity::GetDamageZoneNameByComponentIndex ( int componentIndex)
private

Obtains name of damage zone based on index of specific component.

Parameters
indexof the component

◆ GetDamageZonePos()

proto native vector IEntity::GetDamageZonePos ( string zoneName)
private

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

Parameters
nameof the damage zone

◆ GetDamageZones()

proto native void IEntity::GetDamageZones ( out TStringArray dmgZones)
private

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

Parameters
listof names

◆ GetDebugName() [1/2]

override string IEntity::GetDebugName ( )
inlineprivate

Definition at line 800 of file Object.c.

801 {
802 return GetDebugNameNative();
803 }
proto string GetDebugNameNative()
native GetDebugName which is internally overloaded where needed

References GetDebugNameNative().

◆ GetDebugName() [2/2]

static string IEntity::GetDebugName ( Object o)
inlinestaticprivate

Definition at line 805 of file Object.c.

806 {
807 if (o)
808 return o.GetDebugName();
809 return "null";
810 }

◆ GetDebugNameNative()

proto string IEntity::GetDebugNameNative ( )
private

native GetDebugName which is internally overloaded where needed

◆ GetDirection()

proto native vector IEntity::GetDirection ( )
private

Retrieve direction vector.

◆ GetDirectionAside()

proto native vector IEntity::GetDirectionAside ( )
private

Retrieve direction aside vector.

◆ GetDirectionUp()

proto native vector IEntity::GetDirectionUp ( )
private

Retrieve direction up vector.

◆ GetDisplayName()

string IEntity::GetDisplayName ( )
inlineprivate

Get display name of entity.

Definition at line 467 of file Object.c.

468 {
469 string tmp;
470 if (NameOverride(tmp))
471 tmp = Widget.TranslateString(tmp);
472 else
473 GetGame().ObjectGetDisplayName(this, tmp);
474 return tmp;
475 }
bool NameOverride(out string output)
Definition Object.c:1316

References GetGame().

◆ GetFireGeometryLevel()

proto native int IEntity::GetFireGeometryLevel ( )
private

◆ GetGeometryLevel()

proto native int IEntity::GetGeometryLevel ( )
private

Native functions for getting the level used for calculating the pivot.

◆ GetGlobalPos()

proto native vector IEntity::GetGlobalPos ( vector vPos)
private

Calculate global position to this entity from local position.

◆ GetHealth() [1/2]

float IEntity::GetHealth ( )
inlineprivate

Equivalent of GetHealth("", "");.

Definition at line 1038 of file Object.c.

1039 {
1040 return GetHealth("", "");
1041 }

◆ GetHealth() [2/2]

proto native float IEntity::GetHealth ( string zoneName,
string healthType )
private

Returns current state of health.

Parameters
zoneNameif empty string, returns state of global health
healthTypeif empty string, returns state of main health

◆ GetHealth01() [1/2]

float IEntity::GetHealth01 ( )
inlineprivate

Equivalent of GetHealth01("", "");.

Definition at line 1043 of file Object.c.

1044 {
1045 return GetHealth01("", "");
1046 }

◆ GetHealth01() [2/2]

proto native float IEntity::GetHealth01 ( string zoneName,
string healthType )
private

Returns current state of health in range <0, 1>.

Parameters
zoneNameif empty string, returns state of global health
healthTypeif empty string, returns state of main health

◆ GetHealthLevel()

proto native int IEntity::GetHealthLevel ( string zone = "")
private

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).

Parameters
zoneNameif empty string, returns state of global health level

◆ GetHealthLevelValue()

proto native float IEntity::GetHealthLevelValue ( int healthLevel,
string zone = "" )
private

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

Parameters
zoneNameif empty string, returns number of global health levels
healthLevelthe health level to get the value from

◆ GetHiddenSelections()

TStringArray IEntity::GetHiddenSelections ( )
inlineprivate

Returns the hiddenSelections array from the object's config.

Definition at line 124 of file Object.c.

125 {
127 }
static array< string > GetHiddenSelectionsConfig(string type)
string GetType()
Get config class of object.
Definition Object.c:458

References HiddenSelectionsData::GetHiddenSelectionsConfig(), and GetType().

◆ GetHiddenSelectionsMaterials()

TStringArray IEntity::GetHiddenSelectionsMaterials ( )
inlineprivate

Returns the hiddenSelectionsMaterials array from the object's config.

Definition at line 136 of file Object.c.

137 {
139 }
static array< string > GetHiddenSelectionsMaterialsConfig(string type)

References HiddenSelectionsData::GetHiddenSelectionsMaterialsConfig(), and GetType().

◆ GetHiddenSelectionsTextures()

TStringArray IEntity::GetHiddenSelectionsTextures ( )
inlineprivate

Returns the hiddenSelectionsTextures array from the object's config.

Definition at line 130 of file Object.c.

131 {
133 }
static array< string > GetHiddenSelectionsTexturesConfig(string type)

References HiddenSelectionsData::GetHiddenSelectionsTexturesConfig(), and GetType().

◆ GetLocalPos()

proto native vector IEntity::GetLocalPos ( vector vPos)
private

Calculate local position of other entity to this entity.

◆ GetLODByName()

LOD IEntity::GetLODByName ( string name)
inlineprivate

Retrieve LOD by given name.

Definition at line 106 of file Object.c.

107 {
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 return lods.Get(i);
118 }
119
120 return NULL;
121 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
proto native bool GetLODS(notnull out array< LOD > lods)
Retrieve all LODS.
proto native owned string GetLODName(LOD lod)
Retrieve LOD name.

References name.

◆ GetLODName()

proto native owned string IEntity::GetLODName ( LOD lod)
private

Retrieve LOD name.

◆ GetLODS()

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

Retrieve all LODS.

◆ GetMaxHealth() [1/2]

float IEntity::GetMaxHealth ( )
inlineprivate

Equivalent of GetMaxHealth("", "");.

Definition at line 1048 of file Object.c.

1049 {
1050 return GetMaxHealth("", "");
1051 }

◆ GetMaxHealth() [2/2]

proto native float IEntity::GetMaxHealth ( string zoneName,
string healthType )
private

Returns maximum value of health.

Parameters
zoneNameif empty string, returns state of global health
healthTypeif empty string, returns state of main health

◆ GetMemoryLevel()

proto native int IEntity::GetMemoryLevel ( )
private

◆ GetMemoryPointIndex()

proto native int IEntity::GetMemoryPointIndex ( string memoryPointName)
private

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

◆ GetMemoryPointPos()

proto native vector IEntity::GetMemoryPointPos ( string memoryPointName)
private

◆ GetMemoryPointPosByIndex()

proto native vector IEntity::GetMemoryPointPosByIndex ( int pointIndex)
private

◆ GetModelName()

string IEntity::GetModelName ( )
inlineprivate

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

Definition at line 484 of file Object.c.

485 {
486 return GetGame().GetModelName(GetType());
487 }

References GetGame(), and GetType().

◆ GetModelSpeed()

proto native vector IEntity::GetModelSpeed ( )
private

Retrieve object's speed in local space.

◆ GetNetworkID()

proto void IEntity::GetNetworkID ( out int lowBits,
out int highBits )
private

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

◆ GetNetworkIDString()

string IEntity::GetNetworkIDString ( )
inlineprivate

Definition at line 793 of file Object.c.

794 {
795 int low, high;
797 return high.ToString() + low.ToString();
798 }
proto void GetNetworkID(out int lowBits, out int highBits)

◆ GetNumberOfHealthLevels()

proto native int IEntity::GetNumberOfHealthLevels ( string zone = "")
private

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).

Parameters
zoneNameif empty string, returns number of global health levels

◆ GetOrientation()

proto native vector IEntity::GetOrientation ( )
private

Retrieve orientation (yaw, pitch, roll) in degrees

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

◆ GetPosition()

proto native vector IEntity::GetPosition ( )
private

Retrieve position.

◆ GetSelectionList()

proto native void IEntity::GetSelectionList ( out TStringArray selectionList)
private

◆ GetSelectionPositionLS()

vector IEntity::GetSelectionPositionLS ( string name)
inlineprivate

Definition at line 839 of file Object.c.

840 {
841 return GetGame().ObjectGetSelectionPositionLS(this, name);
842 }

References GetGame(), and name.

◆ GetSelectionPositionMS()

vector IEntity::GetSelectionPositionMS ( string name)
inlineprivate

Definition at line 844 of file Object.c.

845 {
846 return GetGame().ObjectGetSelectionPositionMS(this, name);
847 }

References GetGame(), and name.

◆ GetSelectionPositionOld()

vector IEntity::GetSelectionPositionOld ( string name)
inlineprivate

Definition at line 834 of file Object.c.

835 {
836 return GetGame().ObjectGetSelectionPosition(this, name);
837 }

References GetGame(), and name.

◆ GetSelectionPositionWS()

vector IEntity::GetSelectionPositionWS ( string name)
inlineprivate

Definition at line 849 of file Object.c.

850 {
851 return GetGame().ObjectGetSelectionPositionWS(this, name);
852 }

References GetGame(), and name.

◆ GetShapeName()

proto native owned string IEntity::GetShapeName ( )
private

Return path and name of the model.

◆ GetSpeed()

proto native vector IEntity::GetSpeed ( )
private

Retrieve object's speed in global space.

◆ GetSurfaceNoise()

float IEntity::GetSurfaceNoise ( )
inlineprivate

Returns noise multiplier of surface under object.

Definition at line 387 of file Object.c.

388 {
390 return GetGame().SurfaceGetNoiseMultiplier(NULL, position, -1);
391 }

References GetGame(), and GetPosition.

◆ GetSurfaceType()

string IEntity::GetSurfaceType ( )
inlineprivate

Returns type of surface under object.

Definition at line 394 of file Object.c.

395 {
396 string surface_type;
397 int liquid_type;
398
399 GetGame().SurfaceUnderObject(this, surface_type, liquid_type);
400 // Print(surface_type);
401 // Print(liquid_type);
402
403 return surface_type;
404 }

References GetGame().

◆ GetTightlyPackedCorners()

proto native void IEntity::GetTightlyPackedCorners ( ETransformationAxis axis,
out vector corners[4] )
private

Get corner positions in worldspace aligned to the orientation of the object (currently only TOP/BOTTOM supported)

Parameters
axisThe axis the object is aligned to
cornersarray[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

◆ GetType()

string IEntity::GetType ( )
inlineprivate

Get config class of object.

Definition at line 458 of file Object.c.

459 {
460 string ret;
461 GetGame().ObjectGetType(this, ret);
462
463 return ret;
464 }

References GetGame().

◆ GetViewGeometryLevel()

proto native int IEntity::GetViewGeometryLevel ( )
private

◆ GetWaterSourceObjectType()

EWaterSourceObjectType IEntity::GetWaterSourceObjectType ( )
inlineprivate

Definition at line 634 of file Object.c.

635 {
636 return EWaterSourceObjectType.NONE;
637 }
EWaterSourceObjectType

◆ GetWorldPosition()

proto native vector IEntity::GetWorldPosition ( )
private

Returns world position. This function takes proxy transformation into account.

◆ HasAnimation()

bool IEntity::HasAnimation ( string anim_name)
inlineprivate

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

Definition at line 422 of file Object.c.

423 {
424 string cfg_path_vehicles = "CfgVehicles " + GetType() + " ";
426 return true;
427
428 string cfg_path_weapons = "CfgWeapons " + GetType() + " ";
430 return true;
431
432 string cfg_path_magazines = "CfgMagazines " + GetType() + " ";
434 return true;
435
436 return false;
437 }
proto native bool ConfigIsExisting(string entryName)
Checks if given entry exists.

References GetGame(), and GetType().

◆ HasDamageSystem()

proto native bool IEntity::HasDamageSystem ( )
private

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)

◆ HasFixedActionTargetCursorPosition()

bool IEntity::HasFixedActionTargetCursorPosition ( )
inlineprivate

Definition at line 1383 of file Object.c.

1384 {
1385 return false;
1386 }

◆ HasNetworkID()

bool IEntity::HasNetworkID ( )
inlineprivate

Definition at line 1308 of file Object.c.

1309 {
1310 int lo = 0;
1311 int hi = 0;
1312 GetNetworkID(lo, hi);
1313 return lo | hi;
1314 }

◆ HasProxyParts()

bool IEntity::HasProxyParts ( )
inlineprivate

Definition at line 752 of file Object.c.

753 {
754 return false;
755 }

◆ HasSelection()

bool IEntity::HasSelection ( string selection)
inlineprivate

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

Definition at line 407 of file Object.c.

408 {
411
412 for (int i = 0; i < selections.Count(); ++i)
413 {
414 if (selections.Get(i) == selection)
415 return true;
416 }
417
418 return false;
419 }
proto native void GetSelectionList(out TStringArray selectionList)
array< string > TStringArray
Definition EnScript.c:666

◆ IsActionComponentPartOfSelection()

proto native bool IEntity::IsActionComponentPartOfSelection ( int componentIndex,
string selectionName,
string geometry = "" )
private

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

◆ IsAlive()

bool IEntity::IsAlive ( )
inlineprivate

Definition at line 504 of file Object.c.

505 {
506 return !IsDamageDestroyed();
507 }
proto native bool IsDamageDestroyed()
Checks if object is destroyed.

References IsDamageDestroyed().

◆ IsAmmoPile()

bool IEntity::IsAmmoPile ( )
inlineprivate

Returns if this entity is Ammo Pile.

Definition at line 558 of file Object.c.

559 {
560 return false;
561 }

◆ IsAnyInherited()

bool IEntity::IsAnyInherited ( array< typename > typenames)
inlineprivate

Definition at line 940 of file Object.c.

941 {
942 bool ret;
943 for (int i = 0; i < typenames.Count(); i++)
944 ret = ret || this.IsInherited(typenames.Get(i));
945 return ret;
946 }

◆ IsBeingBackstabbed()

bool IEntity::IsBeingBackstabbed ( )
inlineprivate

Definition at line 687 of file Object.c.

688 {
689 return false;
690 }

◆ IsBuilding()

bool IEntity::IsBuilding ( )
inlineprivate

Returns if this entity is Building.

Definition at line 629 of file Object.c.

630 {
631 return false;
632 }

◆ IsBush()

bool IEntity::IsBush ( )
inlineprivate

Returns if this entity is bush.

Definition at line 600 of file Object.c.

601 {
602 return false;
603 }

◆ IsClothing()

bool IEntity::IsClothing ( )
inlineprivate

Returns if this entity is Clothing.

Definition at line 570 of file Object.c.

571 {
572 return false;
573 }

◆ IsContainer()

bool IEntity::IsContainer ( )
inlineprivate

Definition at line 546 of file Object.c.

547 {
548 return false;
549 }

◆ IsCorpse()

bool IEntity::IsCorpse ( )
inlineprivate

Definition at line 710 of file Object.c.

711 {
712 return false;
713 }

◆ IsCuttable()

bool IEntity::IsCuttable ( )
inlineprivate

Definition at line 605 of file Object.c.

606 {
607 return false;
608 }

◆ IsDamageDestroyed()

proto native bool IEntity::IsDamageDestroyed ( )
private

Checks if object is destroyed.

◆ IsDayZCreature()

bool IEntity::IsDayZCreature ( )
inlineprivate

Checks if this instance is of type DayZCreature.

Definition at line 516 of file Object.c.

517 {
518 return false;
519 }

◆ IsElectricAppliance()

bool IEntity::IsElectricAppliance ( )
inlineprivate

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

Definition at line 664 of file Object.c.

665 {
666 return false;
667 }

◆ IsEntityAI()

bool IEntity::IsEntityAI ( )
inlineprivate

Returns if this entity is EntityAI.

Definition at line 522 of file Object.c.

523 {
524 return false;
525 }

◆ IsFireplace()

bool IEntity::IsFireplace ( )
inlineprivate

Returns if this entity is fireplacebase.

Definition at line 576 of file Object.c.

577 {
578 return false;
579 }

◆ IsFood()

bool IEntity::IsFood ( )
inlineprivate

Returns if this entity if a food item.

Definition at line 695 of file Object.c.

696 {
697 return (IsFruit() || IsMeat() || IsCorpse() || IsMushroom());
698 }
bool IsFruit()
Definition Object.c:700
bool IsCorpse()
Definition Object.c:710
bool IsMeat()
Definition Object.c:705
bool IsMushroom()
Definition Object.c:715

References IsCorpse(), IsFruit(), IsMeat(), and IsMushroom().

◆ IsFruit()

bool IEntity::IsFruit ( )
inlineprivate

Definition at line 700 of file Object.c.

701 {
702 return false;
703 }

◆ IsFuelStation()

bool IEntity::IsFuelStation ( )
inlineprivate

Returns if this entity is Fuel Station (extends Building)

Definition at line 652 of file Object.c.

653 {
654 return false;
655 }

◆ IsHealthVisible()

bool IEntity::IsHealthVisible ( )
inlineprivate

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

Definition at line 721 of file Object.c.

722 {
723 return true;
724 }

◆ IsHologram()

bool IEntity::IsHologram ( )
inlineprivate

Definition at line 747 of file Object.c.

748 {
749 return false;
750 }

◆ IsInventoryItem()

bool IEntity::IsInventoryItem ( )
inlineprivate

Returns if this entity is InventoryItem.

Definition at line 564 of file Object.c.

565 {
566 return false;
567 }

◆ IsItemBase()

bool IEntity::IsItemBase ( )
inlineprivate

Returns if this entity is ItemBase.

Definition at line 540 of file Object.c.

541 {
542 return false;
543 }

◆ IsItemTent()

bool IEntity::IsItemTent ( )
inlineprivate

Definition at line 737 of file Object.c.

738 {
739 return false;
740 }

◆ IsKindOf()

bool IEntity::IsKindOf ( string type)
inlineprivate

Check config class name of the object.

Definition at line 498 of file Object.c.

499 {
500 return GetGame().ObjectIsKindOf(this, type);
501 }

References GetGame().

◆ IsMagazine()

bool IEntity::IsMagazine ( )
inlineprivate

Returns if this entity is Magazine.

Definition at line 552 of file Object.c.

553 {
554 return false;
555 }

◆ IsMan()

bool IEntity::IsMan ( )
inlineprivate

Returns if this entity is Man.

Definition at line 510 of file Object.c.

511 {
512 return false;
513 }

◆ IsMeat()

bool IEntity::IsMeat ( )
inlineprivate

Definition at line 705 of file Object.c.

706 {
707 return false;
708 }

◆ IsMeleeWeapon()

bool IEntity::IsMeleeWeapon ( )
inlineprivate

returns if this entity is Melee Weapon

Definition at line 623 of file Object.c.

624 {
625 return false;
626 }

◆ IsMushroom()

bool IEntity::IsMushroom ( )
inlineprivate

Definition at line 715 of file Object.c.

716 {
717 return false;
718 }

◆ IsParticle()

bool IEntity::IsParticle ( )
inlineprivate

Definition at line 732 of file Object.c.

733 {
734 return false;
735 }

◆ IsPeltBase()

bool IEntity::IsPeltBase ( )
inlineprivate

Returns if this entity is Pelt_Base.

Definition at line 611 of file Object.c.

612 {
613 return false;
614 }

◆ IsPendingDeletion()

proto native bool IEntity::IsPendingDeletion ( )
private

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

◆ IsPlainObject()

proto native bool IEntity::IsPlainObject ( )
private

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

◆ IsRock()

bool IEntity::IsRock ( )
inlineprivate

Returns if this entity is rock.

Definition at line 588 of file Object.c.

589 {
590 return false;
591 }

◆ IsRuined()

bool IEntity::IsRuined ( )
inlineprivate

Returns whether the object is ruined (0 Health).

Returns
bool true = item has 0 Health or less
if ( item.IsRuined() )
{
Print("Object is ruined!");
}

Definition at line 1195 of file Object.c.

1196 {
1197 return IsDamageDestroyed();
1198 }

References IsDamageDestroyed().

◆ IsScenery()

proto native bool IEntity::IsScenery ( )
private

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

◆ IsScriptedLight()

bool IEntity::IsScriptedLight ( )
inlineprivate

Definition at line 742 of file Object.c.

743 {
744 return false;
745 }

◆ IsStaticTransmitter()

bool IEntity::IsStaticTransmitter ( )
inlineprivate

Returns if this entity is Static Transmitter.

Definition at line 528 of file Object.c.

529 {
530 return false;
531 }

◆ IsTransmitter()

bool IEntity::IsTransmitter ( )
inlineprivate

Returns if this entity is a non-static Transmitter.

Definition at line 534 of file Object.c.

535 {
536 return false;
537 }

◆ IsTransport()

bool IEntity::IsTransport ( )
inlineprivate

Returns if this entity is transport.

Definition at line 658 of file Object.c.

659 {
660 return false;
661 }

◆ IsTree()

bool IEntity::IsTree ( )
inlineprivate

Returns if this entity is tree.

Definition at line 582 of file Object.c.

583 {
584 return false;
585 }

◆ IsWeapon()

bool IEntity::IsWeapon ( )
inlineprivate

Returns if this entity is Weapon.

Definition at line 617 of file Object.c.

618 {
619 return false;
620 }

◆ IsWell()

bool IEntity::IsWell ( )
inlineprivate

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

Definition at line 641 of file Object.c.

642 {
643 return false;
644 }

◆ IsWoodBase()

bool IEntity::IsWoodBase ( )
inlineprivate

Returns whether object is PlanBase.

Definition at line 594 of file Object.c.

595 {
596 return false;
597 }

◆ KindOf()

bool IEntity::KindOf ( string tag)
inlineprivate

Compares config class name to given string.

Definition at line 921 of file Object.c.

922 {
923 bool found = false;
924 string item_name = this.GetType();
926 ConfigGetTextArray("cfgVehicles " + item_name + " itemInfo", item_tag_array);
927
928 int array_size = item_tag_array.Count();
929 for (int i = 0; i < array_size; i++)
930 {
931 if (item_tag_array.Get(i) == tag)
932 {
933 found = true;
934 break;
935 }
936 }
937 return found;
938 }
proto native void ConfigGetTextArray(string entryName, out TStringArray values)
Get array of strings from config entry.

References GetType().

◆ MemoryPointExists()

proto native bool IEntity::MemoryPointExists ( string memoryPoint)
private

◆ ModelToWorld()

vector IEntity::ModelToWorld ( vector modelPos)
inlineprivate

Definition at line 855 of file Object.c.

856 {
857 return GetGame().ObjectModelToWorld(this, modelPos);
858 }

References GetGame().

◆ NameOverride()

bool IEntity::NameOverride ( out string output)
inlineprivate

Definition at line 1316 of file Object.c.

1317 {
1318 return false;
1319 }

◆ Object()

void IEntity::Object ( )
private

◆ OnEnterTrigger()

void IEntity::OnEnterTrigger ( ScriptedEntity trigger)
inlineprivate

Object entered trigger.

Definition at line 92 of file Object.c.

92{}

◆ OnExplodeClient()

void IEntity::OnExplodeClient ( )
inlineprivate

Called on clients when this object explodes.

Definition at line 169 of file Object.c.

170 {
171 string ammoType = ConfigGetString("ammoType");
172
173 if (ammoType == "")
174 ammoType = "Dummy_Heavy";
175
176 vector pos = GetPosition();
177
178 // Handle spawn of particle if one is configured in config
180
181 // Handle spawn of Effect if one is configured in config
183 }
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:85
static bool PlayAmmoParticle(string ammoType, vector pos)
Attempt to play the ammo particle at pos if found, returns true on success.
Definition AmmoEffects.c:43

References GetPosition, AmmoEffects::PlayAmmoEffect(), and AmmoEffects::PlayAmmoParticle().

◆ OnExplosionEffects()

void IEntity::OnExplosionEffects ( Object source,
Object directHit,
int componentIndex,
string surface,
vector pos,
vector surfNormal,
float energyFactor,
float explosionFactor,
bool isWater,
string ammoType )
inlineprivate

Definition at line 185 of file Object.c.

185{ }

◆ OnLeaveTrigger()

void IEntity::OnLeaveTrigger ( ScriptedEntity trigger)
inlineprivate

Object left trigger.

Definition at line 95 of file Object.c.

95{}

◆ OnPlayerRecievedHit()

void IEntity::OnPlayerRecievedHit ( )
private

DEPRECATED.

◆ OnReceivedHit()

void IEntity::OnReceivedHit ( ImpactEffectsData hitData)
private

◆ OnRPC()

void IEntity::OnRPC ( PlayerIdentity sender,
int rpc_type,
ParamsReadContext ctx )
private

Called after remote procedure call is recieved for this object.

Parameters
rpc_typeuser defined identification of RPC
ctxread context for params

◆ OnSimulationDisabled()

void IEntity::OnSimulationDisabled ( )
inlineprivate

Event called from C++ when simulation is disabled.

Definition at line 1204 of file Object.c.

1204{}

◆ OnSimulationEnabled()

void IEntity::OnSimulationEnabled ( )
inlineprivate

Event called from C++ when simulation is enabled.

Definition at line 1201 of file Object.c.

1201{}

◆ OnTreeCutDown()

void IEntity::OnTreeCutDown ( EntityAI cutting_entity)
private

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

◆ PlaceOnSurface()

proto native void IEntity::PlaceOnSurface ( )
private

Place object on surface.

◆ PlaySound()

SoundOnVehicle IEntity::PlaySound ( string sound_name,
float range,
bool create_local = true )
inlineprivate

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.

Definition at line 1211 of file Object.c.

1212 {
1213 return GetGame().CreateSoundOnObject(this, sound_name, range, false, create_local);
1214 }

References GetGame().

◆ PlaySoundLoop()

SoundOnVehicle IEntity::PlaySoundLoop ( string sound_name,
float range,
bool create_local = true )
inlineprivate

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.

Definition at line 1217 of file Object.c.

1218 {
1219 return GetGame().CreateSoundOnObject(this, sound_name, range, true, create_local);
1220 }

References GetGame().

◆ PlaySoundSet()

bool IEntity::PlaySoundSet ( out EffectSound sound,
string sound_set,
float fade_in,
float fade_out,
bool loop = false )
inlineprivate

EffectSound - plays soundset on this object and returns state of the sound (true - played, false - not played)

Definition at line 1223 of file Object.c.

1224 {
1225 if (GetGame() && !GetGame().IsDedicatedServer())
1226 {
1227 if (sound)
1228 {
1229 if (loop)
1230 return true;
1231 else
1232 {
1233 StopSoundSet(sound); //auto stop for non-looped sounds
1234 }
1235 }
1236
1238 sound.SetAutodestroy(true);
1239
1240 return true;
1241 }
1242
1243 return false;
1244 }
bool StopSoundSet(out EffectSound sound)
EffectSound - stops soundset and returns state of the sound (true - stopped, false - not playing)
Definition Object.c:1286
Manager class for managing Effect (EffectParticle, EffectSound)
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.

References GetGame(), and SEffectManager::PlaySoundOnObject().

◆ PlaySoundSetAtMemoryPoint()

bool IEntity::PlaySoundSetAtMemoryPoint ( out EffectSound sound,
string soundSet,
string memoryPoint,
bool looped = false,
float play_fade_in = 0,
float stop_fade_out = 0 )
inlineprivate

Definition at line 1266 of file Object.c.

1267 {
1268 vector pos;
1269
1271 {
1273 pos = ModelToWorld(pos);
1274 }
1275 else
1276 {
1277 ErrorEx(string.Format("Memory point %1 not found when playing soundset %2 at memory point location", memoryPoint, soundSet));
1278 return false;
1279 }
1280
1282 return true;
1283 }
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.
enum ShapeType ErrorEx

References ErrorEx, and SEffectManager::PlaySoundEnviroment().

◆ PlaySoundSetAtMemoryPointLooped()

bool IEntity::PlaySoundSetAtMemoryPointLooped ( out EffectSound sound,
string soundSet,
string memoryPoint,
float play_fade_in = 0,
float stop_fade_out = 0 )
inlineprivate

Definition at line 1260 of file Object.c.

1261 {
1263 }
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:1266

◆ PlaySoundSetAtMemoryPointLoopedSafe()

bool IEntity::PlaySoundSetAtMemoryPointLoopedSafe ( out EffectSound sound,
string soundSet,
string memoryPoint,
float play_fade_in = 0,
float stop_fade_out = 0 )
inlineprivate

Same as PlaySoundSetAtMemoryPointLooped, only requests stoppage of the currently playing EffectSound if it already exists and playing, before playing the new sound.

Definition at line 1253 of file Object.c.

1254 {
1255 if (sound && sound.IsPlaying())
1256 sound.SoundStop();
1258 }
bool PlaySoundSetAtMemoryPointLooped(out EffectSound sound, string soundSet, string memoryPoint, float play_fade_in=0, float stop_fade_out=0)
Definition Object.c:1260

◆ PlaySoundSetLoop()

bool IEntity::PlaySoundSetLoop ( out EffectSound sound,
string sound_set,
float fade_in,
float fade_out )
inlineprivate

EffectSound - plays soundset on this object in loop and returns state of the sound (true - played, false - not played)

Definition at line 1247 of file Object.c.

1248 {
1249 return PlaySoundSet(sound, sound_set, fade_in, fade_out, true);
1250 }
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:1223

◆ PostAreaDamageActions()

void IEntity::PostAreaDamageActions ( )
private

◆ PreAreaDamageActions()

void IEntity::PreAreaDamageActions ( )
private

◆ ProcessDirectDamage()

proto native void IEntity::ProcessDirectDamage ( int damageType,
EntityAI source,
string componentName,
string ammoName,
vector modelPos,
float damageCoef = 1.0,
int flags = 0 )
private

Applies damage on object.

Parameters
damageTypeDT_CLOSE_COMBAT/DT_FIRE_ARM/DT_EXPLOSION/DT_CUSTOM
sourcesource of damage
componentNamewhich 'DamageZone' was hit (NOT a component name, actually!)
ammoNameammoType, which defines how much damage should be applied
directHitModelPoslocal position of hit
damageCoefmultiplier of applied damage
flagsenables/disables special behaviour depending on the flags used (ProcessDirectDamageFlags type)

◆ ProcessMeleeItemDamage()

EntityAI IEntity::ProcessMeleeItemDamage ( int mode = 0)
inlineprivate

Definition at line 1326 of file Object.c.

1326{}

◆ Release()

int IEntity::Release ( )
inlineprivate

Definition at line 492 of file Object.c.

493 {
494 return GetGame().ObjectRelease(this);
495 }

References GetGame().

◆ RemoveProxyPhysics()

proto native void IEntity::RemoveProxyPhysics ( string proxySelectionName)
private

◆ RPC()

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

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

Definition at line 816 of file Object.c.

817 {
819 }

References GetGame().

◆ RPCSingleParam()

void IEntity::RPCSingleParam ( int rpc_type,
Param param,
bool guaranteed,
PlayerIdentity recipient = NULL )
inlineprivate

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

Definition at line 822 of file Object.c.

823 {
824 GetGame().RPCSingleParam(this, rpc_type, param, guaranteed, recipient);
825 }

References GetGame().

◆ SetAffectPathgraph()

proto native void IEntity::SetAffectPathgraph ( bool fromConfig,
bool affect )
private

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.

◆ SetAllowDamage()

proto native void IEntity::SetAllowDamage ( bool val)
private

Enable or disable object to receive damage.

Parameters
enableor disable

◆ SetBeingBackstabbed()

void IEntity::SetBeingBackstabbed ( int backstabType)
inlineprivate

Definition at line 692 of file Object.c.

692{}

◆ SetCanBeDestroyed()

proto native void IEntity::SetCanBeDestroyed ( bool val)
private

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

Parameters
enableor disable

◆ SetDestructTime()

proto native void IEntity::SetDestructTime ( float time)
private

Sets the time over which to perform DestructTent/DestructTree.

Parameters
timetime over which to perform DestructTent/DestructTree

◆ SetDirection()

proto native void IEntity::SetDirection ( vector vPos)
private

Set direction of object.

Parameters
vDirection,directionvector
Note
object up vector is always y-axis

◆ SetDynamicPhysicsLifeTime()

proto native void IEntity::SetDynamicPhysicsLifeTime ( float lifeTime)
private

◆ SetFullHealth()

proto native void IEntity::SetFullHealth ( )
private

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

◆ SetGlobalHealth()

void IEntity::SetGlobalHealth ( float health)
inlineprivate

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

Definition at line 1058 of file Object.c.

1059 {
1060 SetHealth("", "", health);
1061 }
proto native void SetHealth(string zoneName, string healthType, float value)
Sets current state of health.

◆ SetHealth() [1/2]

void IEntity::SetHealth ( float health)
inlineprivate

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

Definition at line 1053 of file Object.c.

1054 {
1055 SetHealth("", "", health);
1056 }

◆ SetHealth() [2/2]

proto native void IEntity::SetHealth ( string zoneName,
string healthType,
float value )
private

Sets current state of health.

Parameters
zoneNameif empty string, sets state of global health
healthTypeif empty string, sets state of main health

◆ SetHealth01()

void IEntity::SetHealth01 ( string zoneName,
string healthType,
float coef )
inlineprivate

Sets health relative to its maximum.

Definition at line 1076 of file Object.c.

1077 {
1079 }

◆ SetHealthLevel()

void IEntity::SetHealthLevel ( int healthLevel,
string zone = "" )
inlineprivate

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.

Definition at line 1063 of file Object.c.

1064 {
1066 }
proto native float GetHealthLevelValue(int healthLevel, string zone="")
Returns cutoff value for health level specified in object's config class parameter healthLevels.
void SetHealth01(string zoneName, string healthType, float coef)
Sets health relative to its maximum.
Definition Object.c:1076

◆ SetHealthMax()

void IEntity::SetHealthMax ( string zoneName = "",
string healthType = "" )
inlineprivate

Sets health to its maximum (zone or global)

Definition at line 1081 of file Object.c.

◆ SetOrientation()

proto native void IEntity::SetOrientation ( vector vOrientation)
private

Set orientation (yaw, pitch, roll) in degrees

Parameters
vOrientation,vectorof yaw, pitch and roll angles (x = yaw, y = pitch, z = roll)

◆ SetPosition()

proto native void IEntity::SetPosition ( vector vPos)
private

Set position.

◆ ShootsExplosiveAmmo()

bool IEntity::ShootsExplosiveAmmo ( )
inlineprivate

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

Definition at line 646 of file Object.c.

647 {
648 return false;
649 }

◆ ShowZonesHealth()

bool IEntity::ShowZonesHealth ( )
inlineprivate

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

Definition at line 727 of file Object.c.

728 {
729 return false;
730 }

◆ SpawnDamageDealtEffect()

void IEntity::SpawnDamageDealtEffect ( )
private

◆ StopSoundSet()

bool IEntity::StopSoundSet ( out EffectSound sound)
inlineprivate

EffectSound - stops soundset and returns state of the sound (true - stopped, false - not playing)

Definition at line 1286 of file Object.c.

1287 {
1288 if (sound && GetGame() && (!GetGame().IsDedicatedServer()))
1289 {
1290 sound.SoundStop();
1291 sound = null;
1292
1293 return true;
1294 }
1295
1296 return false;
1297 }

References GetGame().

◆ SynchExplosion()

void IEntity::SynchExplosion ( )
inlineprivate

Definition at line 157 of file Object.c.

158 {
159 if (GetGame().IsDedicatedServer()) // Multiplayer server
160 {
162 GetGame().RPCSingleParam(this, ERPCs.RPC_EXPLODE_EVENT, p, true);
163 }
164 else if (!GetGame().IsMultiplayer()) // Singleplayer
166 }
ERPCs
Definition ERPCs.c:2
void OnExplodeClient()
Called on clients when this object explodes.
Definition Object.c:169

References GetGame().

◆ ToDelete()

proto native bool IEntity::ToDelete ( )
private

Flag to determine this object is marked to be deleted soon.

◆ WorldToModel()

vector IEntity::WorldToModel ( vector worldPos)
inlineprivate

Definition at line 860 of file Object.c.

861 {
862 return GetGame().ObjectWorldToModel(this, worldPos);
863 }

References GetGame().


The documentation for this class was generated from the following files: