9class ObjectSnapCallback
111 for (
int i = 0; i < lods.Count(); ++i )
113 string lod_name = GetLODName( lods.Get( i ) );
116 if ( lod_name ==
name )
118 return lods.Get( i );
144 void Explode(
int damageType,
string ammoType =
"")
147 ammoType = ConfigGetString(
"ammoType");
150 ammoType =
"Dummy_Heavy";
155 DamageSystem.ExplosionDamage(
EntityAI.Cast(
this), null, ammoType,
GetPosition(), damageType);
161 if (
GetGame().IsDedicatedServer() )
163 Param1<EntityAI> p =
new Param1<EntityAI>(null);
166 else if ( !
GetGame().IsMultiplayer() )
175 string ammoType = ConfigGetString(
"ammoType");
178 ammoType =
"Dummy_Heavy";
218 proto
bool ToBonePivot(out
int pivot,
int level,
int bone);
219 proto
bool FromBonePivot(
int pivot, out
int level, out
int bone);
255 GetTightlyPackedCorners(axis, corners);
257 points[0] = corners[0];
258 points[1] = corners[1];
261 points[0] = corners[1];
262 points[1] = corners[3];
265 points[0] = corners[3];
266 points[1] = corners[2];
269 points[0] = corners[2];
270 points[1] = corners[0];
398 GetSelectionList( selections );
400 for (
int i = 0; i < selections.Count(); ++i )
402 if ( selections.Get( i ) == selection )
414 string cfg_path_vehicles =
"CfgVehicles " +
GetType() +
" ";
415 if (
GetGame().ConfigIsExisting (cfg_path_vehicles) &&
GetGame().ConfigIsExisting (cfg_path_vehicles +
"AnimationSources " + anim_name) )
420 string cfg_path_weapons =
"CfgWeapons " +
GetType() +
" ";
421 if (
GetGame().ConfigIsExisting (cfg_path_weapons) &&
GetGame().ConfigIsExisting (cfg_path_weapons +
"AnimationSources " + anim_name) )
426 string cfg_path_magazines =
"CfgMagazines " +
GetType() +
" ";
427 if (
GetGame().ConfigIsExisting (cfg_path_magazines) &&
GetGame().ConfigIsExisting (cfg_path_magazines +
"AnimationSources " + anim_name) )
470 if (NameOverride(tmp))
472 tmp =
Widget.TranslateString(tmp);
763 return IsPlainObject() && !IsScenery();
794 GetNetworkID( low, high );
795 return high.ToString() + low.ToString();
801 return o.GetType() +
":" + o.GetNetworkIDString();
811 GetGame().
RPC(
this, rpc_type, params, guaranteed, recipient);
871 return (ConfigGetInt(entryName) == 1);
917 string item_name = this.
GetType();
919 ConfigGetTextArray(
"cfgVehicles " + item_name +
" itemInfo", item_tag_array);
921 int array_size = item_tag_array.Count();
922 for (
int i = 0; i < array_size; i++)
924 if ( item_tag_array.Get(i) == tag )
936 for(
int i = 0; i < typenames.Count(); i++ )
938 ret = ret || this.IsInherited( typenames.Get(i) );
975 proto native
float GetHealth(
string zoneName,
string healthType);
982 proto native
float GetHealth01(
string zoneName,
string healthType);
996 proto native
void SetHealth(
string zoneName,
string healthType,
float value);
1008 proto native
void AddHealth(
string zoneName,
string healthType,
float value);
1022 void DecreaseHealth(
string zoneName,
string healthType,
float value,
bool auto_delete)
1024 DecreaseHealth( zoneName, healthType, value);
1026 float result_health = GetHealth(zoneName, healthType);
1028 if ( auto_delete && result_health <= 0 )
1037 return GetHealth(
"",
"");
1042 return GetHealth01(
"",
"");
1047 return GetMaxHealth(
"",
"");
1052 SetHealth(
"",
"", health);
1057 SetHealth(
"",
"", health);
1062 SetHealth01(zone,
"", GetHealthLevelValue(healthLevel, zone));
1067 int maxHealthLevel = GetNumberOfHealthLevels(zone) - 1;
1068 int newHealthLevel =
Math.
Clamp(GetHealthLevel(zone) + healthLevelDelta,0,maxHealthLevel);
1069 SetHealthLevel(newHealthLevel,zone);
1075 SetHealth(zoneName,healthType,(GetMaxHealth(zoneName,healthType)*coef));
1080 SetHealth(zoneName,healthType,GetMaxHealth(zoneName,healthType));
1085 AddHealth(
"",
"", add_health);
1090 DecreaseHealth(
"",
"", dec_health, auto_delete);
1095 float current_health = GetHealth();
1096 float final_health_coef = GetHealth01() - dec_health_coef;
1097 float final_health = GetMaxHealth() * final_health_coef;
1098 DecreaseHealth(
"",
"", current_health - final_health);
1208 SoundOnVehicle
PlaySound(
string sound_name,
float range,
bool create_local =
true)
1214 SoundOnVehicle
PlaySoundLoop(
string sound_name,
float range,
bool create_local =
true)
1232 StopSoundSet( sound );
1248 return PlaySoundSet( sound, sound_set, fade_in, fade_out,
true );
1254 if (sound && sound.IsPlaying())
1258 return PlaySoundSetAtMemoryPointLooped(sound, soundSet, memoryPoint, play_fade_in, stop_fade_out);
1263 return PlaySoundSetAtMemoryPoint(sound, soundSet, memoryPoint,
true, play_fade_in, stop_fade_out);
1271 if (MemoryPointExists(memoryPoint))
1273 pos = GetMemoryPointPos(memoryPoint);
1274 pos = ModelToWorld(pos);
1278 ErrorEx(
string.Format(
"Memory point %1 not found when playing soundset %2 at memory point location", memoryPoint, soundSet));
1310 GetNetworkID(lo, hi);
1333 if ( MemoryPointExists(
"ce_center") )
1336 return ModelToWorld( GetMemoryPointPos(
"ce_center") );
1346 void SetDebugItem();
1351 int pivot = GetBonePivot(GetFireGeometryLevel(), componentIndex);
1352 vector parentTransMat[4];
1357 GetTransform(parentTransMat);
1361 GetBoneTransformWS(pivot, parentTransMat);
1364 float scale = GetScale();
1365 scale = 1 / (scale * scale);
1367 arrow.GetTransform(arrowTransMat);
1373 arrowTransMat[3] = arrowTransMat[3] * scale;
1375 arrow.SetTransform(arrowTransMat);
eBleedingSourceType GetType()
protected bool IsDamageDestroyed(ActionTarget target)
override bool CanUseConstruction()
override bool IsDayZCreature()
override bool IsMushroom()
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
override bool IsHologram()
override bool IsItemBase()
void OnDebug(vector p0, vector p1, bool hasHit, bool found)
Debug callback for rendering on the screen.
bool OnCollide(Object other)
Ray cast line test from owner to a tested position.
vector m_DirectionFunc
The size of the boundig box, centered.
enum ProcessDirectDamageFlags m_Owner
bool OnFirstContact(Object other)
Called for first layer contacts to determine if this object should be snapped around or default rv ra...
bool OnQuery(Object other)
Initial query around the owner position to see if an object should be processed in contact testing.
vector m_Offset
The direction of the owner in world space.
@ NO_ATTACHMENT_TRANSFER
Do not transfer damage to attachments.
@ NO_GLOBAL_TRANSFER
Do not transfer damage to global.
@ NO_TRANSFER
NO_ATTACHMENT_TRANSFER | NO_GLOBAL_TRANSFER.
vector m_OwnerDirection
The position of the owner in world space.
vector m_Transform[4]
If 'OnDebug' is to be called.
bool m_DebugEnabled
How much should the direction be favoured.
vector m_OwnerPosition
The owner performing the snap callback.
vector m_Extents
The true center of the bounding box of the object to be dropped in model space.
void OnSetup()
The transformation currently being debugged.
class JsonUndergroundAreaTriggerData GetPosition
Static data holder for certain ammo config values.
static bool PlayAmmoEffect(string ammoType, vector pos)
Attempt to play the ammo effect at pos if found, returns true on success.
static bool PlayAmmoParticle(string ammoType, vector pos)
Attempt to play the ammo particle at pos if found, returns true on success.
proto void SurfaceUnderObject(notnull Object object, out string type, out int liquidType)
proto native vector ObjectGetSelectionPosition(Object obj, string name)
proto native vector ObjectGetSelectionPositionWS(Object obj, string name)
proto native vector ObjectWorldToModel(Object obj, vector worldPos)
proto native void RPC(Object target, int rpcType, notnull array< ref Param > params, bool guaranteed, PlayerIdentity recipient=null)
Initiate remote procedure call. When called on client, RPC is evaluated on server; When called on ser...
proto native vector ObjectGetSelectionPositionMS(Object obj, string name)
string GetModelName(string class_name)
Get name of the p3d file of the given class name.
proto native SoundOnVehicle CreateSoundOnObject(Object source, string sound_name, float distance, bool looped, bool create_local=false)
override ScriptCallQueue GetCallQueue(int call_category)
proto native float SurfaceGetNoiseMultiplier(Object directHit, vector pos, int componentIndex)
proto native vector ObjectGetSelectionPositionLS(Object obj, string name)
void RPCSingleParam(Object target, int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=null)
see CGame.RPC
bool ObjectIsKindOf(Object object, string cfg_parent_name)
Returns is object inherited from parent class name.
proto native int ObjectRelease(Object obj)
RemoteObjectTreeCreate - postponed registration of network object tree (and creation of remote object...
proto void ObjectGetType(Object obj, out string type)
proto native vector ObjectModelToWorld(Object obj, vector modelPos)
proto void ObjectGetDisplayName(Object obj, out string name)
Wrapper class for managing sound through SEffectManager.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
static array< string > GetHiddenSelectionsConfig(string type)
static array< string > GetHiddenSelectionsMaterialsConfig(string type)
static array< string > GetHiddenSelectionsTexturesConfig(string type)
bool IsEntityAI()
Returns if this entity is EntityAI.
bool IsRock()
Returns if this entity is rock.
bool IsAmmoPile()
Returns if this entity is Ammo Pile.
proto native int GetFireGeometryLevel()
void AddArrow(Object arrow, int componentIndex, vector closeBonePosWS, vector closeBoneRotWS)
proto native void SetHealth(string zoneName, string healthType, float value)
Sets current state of health.
bool IsAnyInherited(array< typename > typenames)
proto native bool IsDamageDestroyed()
Checks if object is destroyed.
proto void GetNetworkID(out int lowBits, out int highBits)
void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
Called after remote procedure call is recieved for this object.
proto native bool GetAllowDamage()
Returns if object can receive damage.
bool IsBuilding()
Returns if this entity is Building.
float GetHealth01()
Equivalent of GetHealth01("", "");.
proto native void SetOrientation(vector vOrientation)
Set orientation (yaw, pitch, roll) in degrees
proto native void SetAllowDamage(bool val)
Enable or disable object to receive damage.
proto native void ConfigGetTextArrayRaw(string entryName, out TStringArray values)
Get array of raw strings from config entry.
bool IsWeapon()
Returns if this entity is Weapon.
bool IsHealthVisible()
Returns if the health of this entity should be displayed (widgets, inventory)
void SetHealth01(string zoneName, string healthType, float coef)
Sets health relative to its maximum.
proto native vector GetBonePositionWS(int pivot)
SoundOnVehicle PlaySoundLoop(string sound_name, float range, bool create_local=true)
Plays the given sound in loop on this object's instance. Range is in meters. Created sound is only lo...
proto float ClippingInfo(out vector minMax[2])
Get Clipping info.
bool IsBeingBackstabbed()
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,...
proto native void GetDamageZones(out TStringArray dmgZones)
Obtains a list of nammes of all object's damage zones.
proto vector ConfigGetVector(string entryName)
proto native void AddProxyPhysics(string proxySelectionName)
bool KindOf(string tag)
Compares config class name to given string.
proto native bool ConfigIsExisting(string entryName)
Checks if given entry exists.
proto float ConfigGetFloat(string entryName)
EntityAI ProcessMeleeItemDamage(int mode=0)
proto native vector GetOrientation()
Retrieve orientation (yaw, pitch, roll) in degrees
string GetType()
Get config class of object.
bool IsInventoryItem()
Returns if this entity is InventoryItem.
vector GetSelectionPositionMS(string name)
void SetHealthMax(string zoneName="", string healthType="")
Sets health to its maximum (zone or global)
bool IsBush()
Returns if this entity is bush.
proto native bool GetCollisionBox(out vector minMax[2])
Gets collision bounding box.
proto native vector GetLocalPos(vector vPos)
Calculate local position of other entity to this entity.
proto native vector GetDamageZonePos(string zoneName)
Obtains middle position of damage zone based on it's name.
proto native void SetCanBeDestroyed(bool val)
Enable or disable destruction of object (after health is depleated)
bool ConfigGetBool(string entryName)
bool IsFuelStation()
Returns if this entity is Fuel Station (extends Building)
bool ShootsExplosiveAmmo()
Returns if this entity is a weapon which can shoot explosive ammo.
vector WorldToModel(vector worldPos)
proto native int GetGeometryLevel()
Native functions for getting the level used for calculating the pivot.
proto native vector GetBonePositionMS(int pivot)
TStringArray GetHiddenSelectionsTextures()
Returns the hiddenSelectionsTextures array from the object's config.
proto native owned string GetLODName(LOD lod)
Retrieve LOD name.
float GetSurfaceNoise()
Returns noise multiplier of surface under object.
proto native void GetSelectionList(out TStringArray selectionList)
proto native bool IsPlainObject()
Is this just static object without config? So we can avoid calling unnecessary methods.
proto native vector GetPosition()
Retrieve position.
proto native void ProcessDirectDamage(int damageType, EntityAI source, string componentName, string ammoName, vector modelPos, float damageCoef=1.0, int flags=0)
Applies damage on object.
proto native float GetHealth(string zoneName, string healthType)
Returns current state of health.
bool IsFood()
Returns if this entity if a food item.
void SetGlobalHealth(float health)
Equivalent of SetHealth("", "", float value);.
proto native float GetCollisionRadius()
Gets collision radius (bounding sphere)
proto native bool GetCanBeDestroyed()
Returns if object is destroyable.
void PostAreaDamageActions()
proto native owned int GetActionComponentNameList(int componentIndex, TStringArray nameList, string geometry="")
outputs action component name list by given component index, 'geometry' can be "fire" or "view" (defa...
proto native void ConfigGetIntArray(string entryName, out TIntArray values)
Get array of integers from config entry.
SoundOnVehicle PlaySound(string sound_name, float range, bool create_local=true)
Plays the given sound once on this object's instance. Range is in meters. Created sound is only local...
proto native vector GetGlobalPos(vector vPos)
Calculate global position to this entity from local position.
bool HasAnimation(string anim_name)
Searches object's config for the given animation name. Returns true if it was found,...
void RPC(int rpc_type, array< ref Param > params, bool guaranteed, PlayerIdentity recipient=NULL)
Remote procedure call shortcut, see CGame.RPC / CGame.RPCSingleParam.
LOD GetLODByName(string name)
Retrieve LOD by given name.
float GetHealth()
Equivalent of GetHealth("", "");.
void PreAreaDamageActions()
void OnExplosionEffects(Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
proto native int GetHealthLevel(string zone="")
Returns global health level specified in object's config class parameter healthLevels (range is usual...
proto native void GetTightlyPackedCorners(ETransformationAxis axis, out vector corners[4])
Get corner positions in worldspace aligned to the orientation of the object (currently only TOP/BOTTO...
void SetHealth(float health)
Equivalent of SetHealth("", "", float value);.
void GetActions(typename action_input_type, out array< ActionBase_Basic > actions)
void SetBeingBackstabbed(int backstabType)
bool DescriptionOverride(out string output)
proto native void SetDynamicPhysicsLifeTime(float lifeTime)
void OnExplodeClient()
Called on clients when this object explodes.
bool IsDayZCreature()
Checks if this instance is of type DayZCreature.
proto native void SetFullHealth()
Sets full health to all zones and removes fatal damage when applicable.
proto string GetDebugNameNative()
native GetDebugName which is internally overloaded where needed
proto native void AddHealth(string zoneName, string healthType, float value)
Adds health.
proto native int GetNumberOfHealthLevels(string zone="")
Returns global number of health levels specified in object's config class parameter healthLevels (ran...
bool IsMeleeWeapon()
returns if this entity is Melee Weapon
proto native bool MemoryPointExists(string memoryPoint)
proto int GetBonePivot(int level, int component)
Get the pivot point of the bone from the component index in the LOD, lvel can be geometry,...
proto native void GetBoneTransformWS(int pivot, out vector transform[4])
void OnPlayerRecievedHit()
proto native void ConfigGetTextArray(string entryName, out TStringArray values)
Get array of strings from config entry.
proto native void SetAffectPathgraph(bool fromConfig, bool affect)
Sets if object's geometry affects pathgraph generation. If first parameter is true,...
bool PlaySoundSetAtMemoryPointLooped(out EffectSound sound, string soundSet, string memoryPoint, float play_fade_in=0, float stop_fade_out=0)
proto native vector GetWorldPosition()
bool DisableVicinityIcon()
Disables icon in the vicinity, useful for large, immovable items, that are not buildings.
proto native bool HasDamageSystem()
Checks if object's DamageSystem has been initialized(despite the name, does not really reliably answe...
bool IsFireplace()
Returns if this entity is fireplacebase.
proto native void SetPosition(vector vPos)
Set position.
proto int ConfigGetInt(string entryName)
vector GetSelectionPositionLS(string name)
vector ModelToWorld(vector modelPos)
proto native float GetHealth01(string zoneName, string healthType)
Returns current state of health in range <0, 1>.
void OnLeaveTrigger(ScriptedEntity trigger)
Object left trigger.
bool IsRuined()
Returns whether the object is ruined (0 Health).
bool IsClothing()
Returns if this entity is Clothing.
void SpawnDamageDealtEffect()
bool IsWoodBase()
Returns whether object is PlanBase.
bool StopSoundSet(out EffectSound sound)
EffectSound - stops soundset and returns state of the sound (true - stopped, false - not playing)
proto native float GetHealthLevelValue(int healthLevel, string zone="")
Returns cutoff value for health level specified in object's config class parameter healthLevels.
proto native owned string GetActionComponentName(int componentIndex, string geometry="")
returns action component name by given component index, 'geometry' can be "fire" or "view" (default "...
bool IsElectricAppliance()
Returns if this is an appliance, that can be plugged into electric circuit (== not energy source)
proto native owned vector GetActionComponentPosition(int componentIndex, string geometry="")
returns action component position by given component index, 'geometry' can be "fire" or "view" (defau...
bool IsStaticTransmitter()
Returns if this entity is Static Transmitter.
proto native void DecreaseHealth(string zoneName, string healthType, float value)
Decreases health.
proto native owned string GetDamageZoneNameByComponentIndex(int componentIndex)
Obtains name of damage zone based on index of specific component.
proto native vector GetSpeed()
Retrieve object's speed in global space.
void DecreaseHealth(string zoneName, string healthType, float value, bool auto_delete)
Decreases health with the option of auto-deleting the object if its ruined.
proto native bool IsScenery()
Is this Scenery? (handy for excluding terain when it is not needed)
bool IsTransmitter()
Returns if this entity is a non-static Transmitter.
proto native void GetBoneRotationWS(int pivot, out float quaternion[4])
proto native bool CanAffectPathgraph()
Returns true if object's geometry can affect pathgraph generation.
proto native bool IsActionComponentPartOfSelection(int componentIndex, string selectionName, string geometry="")
return true if selection containts action component, 'geometry' can be "fire" or "view" (default "" f...
bool CanBeRepairedToPristine()
bool IsMagazine()
Returns if this entity is Magazine.
proto string ConfigGetString(string entryName)
EWaterSourceObjectType GetWaterSourceObjectType()
bool CanUseHandConstruction()
Returns if this entity can be constructed without tools.
void OnSimulationDisabled()
Event called from C++ when simulation is disabled.
void RPCSingleParam(int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=NULL)
Remote procedure call shortcut, see CGame.RPCSingleParam / CGame.RPC.
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 ...
proto native vector GetBonePositionLS(int pivot)
returns local space, model space, world space position of the bone
proto native void EnableDynamicCCD(bool state)
proto native owned string GetShapeName()
static string GetDebugName(Object o)
vector GetSelectionPositionOld(string name)
proto native bool IsPendingDeletion()
proto native vector GetMemoryPointPos(string memoryPointName)
proto native vector GetModelSpeed()
Retrieve object's speed in local space.
proto native void GetBoneRotationLS(int pivot, out float quaternion[4])
returns local space, model space, world space orientation (quaternion) of a bone
string GetNetworkIDString()
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,...
TStringArray GetHiddenSelectionsMaterials()
Returns the hiddenSelectionsMaterials array from the object's config.
proto native void GetBoneTransformLS(int pivot, out vector transform[4])
returns local space, model space, world space transformations of a bone
void OnTreeCutDown(EntityAI cutting_entity)
Called when tree is chopped down. 'cutting_entity' can be tool, or player, if cutting bush with bare ...
proto native bool GetLODS(notnull out array< LOD > lods)
Retrieve all LODS
proto native void SetDestructTime(float time)
Sets the time over which to perform DestructTent/DestructTree.
proto native void GetBoneTransformMS(int pivot, out vector transform[4])
proto native vector GetMemoryPointPosByIndex(int pointIndex)
void Delete()
Delete this object in next frame.
string GetSurfaceType()
Returns type of surface under object.
bool ShowZonesHealth()
Returns true if the health of damage zones should be displayed (instead of global HP of the entity) (...
proto native void RemoveProxyPhysics(string proxySelectionName)
proto native bool ToDelete()
Flag to determine this object is marked to be deleted soon.
bool IsItemBase()
Returns if this entity is ItemBase.
proto native int GetViewGeometryLevel()
bool IsPeltBase()
Returns if this entity is Pelt_Base.
string GetModelName()
Returns name of the model of this object without the '.p3d' suffix.
bool IsKindOf(string type)
Check config class name of the object.
bool NameOverride(out string output)
proto native vector GetDirection()
Retrieve direction vector.
proto native int GetMemoryPointIndex(string memoryPointName)
If Returns true if this item has EnergyManager in its config. Otherwise returns false.
bool PlaySoundSetAtMemoryPoint(out EffectSound sound, string soundSet, string memoryPoint, bool looped=false, float play_fade_in=0, float stop_fade_out=0)
bool IsTransport()
Returns if this entity is transport.
proto native vector GetDirectionUp()
Retrieve direction up vector.
proto native vector GetBoundingCenter()
void DecreaseHealth(float dec_health, bool auto_delete=true)
Equivalent of DecreaseHealth("", "", float value, bool auto_delete);.
proto native float GetMaxHealth(string zoneName, string healthType)
Returns maximum value of health.
vector GetSelectionPositionWS(string name)
void OnSimulationEnabled()
Event called from C++ when simulation is enabled.
bool IsTree()
Returns if this entity is tree.
proto native void ConfigGetFloatArray(string entryName, out TFloatArray values)
Get array of floats from config entry.
proto string ConfigGetStringRaw(string entryName)
Get a raw strings from config entry.
void DecreaseHealthCoef(float dec_health_coef, bool auto_delete=true)
Decreases health by the given coeficient.
bool CanBeIgnoredByDroppedItem()
void OnEnterTrigger(ScriptedEntity trigger)
Object entered trigger.
bool CanUseConstruction()
Returns if this entity can be constucted,deconstructed (e.g. fence,watchtower)
proto native float GetDamage()
Get total damage (clipped to range 0..1)
void AddHealth(float add_health)
Equivalent of AddHealth("", "", float value);.
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.
void SetHealthLevel(int healthLevel, string zone="")
Sets specific health level. It will use the cutoff value as returned by 'GetHealthLevelValue' as the ...
bool IsMan()
Returns if this entity is Man.
TStringArray GetHiddenSelections()
Returns the hiddenSelections array from the object's config.
proto native void SetDirection(vector vPos)
Set direction of object.
bool HasSelection(string selection)
Returns true if the given selection was found in the p3d file. False if otherwise.
void Explode(int damageType, string ammoType="")
Creates an explosion on this object by its ammoType in config.
bool DisplayNameRuinAttach()
float GetMaxHealth()
Equivalent of GetMaxHealth("", "");.
bool CanUseConstructionBuild()
Returns if this entity can be built, specifically.
proto native void GetBoneRotationMS(int pivot, out float quaternion[4])
void AddHealthLevel(int healthLevelDelta, string zone="")
Similar to 'SetHealthLevel', but allows to jump up/down 'healthLevelDelta' amount of health levels fr...
proto native void CreateDynamicPhysics(int interactionLayers)
proto native void PlaceOnSurface()
Place object on surface.
string GetDisplayName()
Get display name of entity.
proto native vector GetDirectionAside()
Retrieve direction aside vector.
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
The class that will be instanced (moddable)
Manager class for managing Effect (EffectParticle, EffectSound)
static EffectSound PlaySoundEnviroment(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound, updating environment variables.
static EffectSound PlaySoundOnObject(string sound_set, Object parent_object, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
proto void Call(func fn, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
Serialization general interface. Serializer API works with:
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
array< string > TStringArray
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto void MatrixOrthogonalize4(vector mat[4])
Orthogonalizes matrix.
static proto void MatrixInvMultiply4(vector mat0[4], vector mat1[4], out vector res[4])
Invert-transforms matrix.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
proto int ToLower()
Changes string to lowercase. Returns length.