class MiscGameplayFunctionsSource
Methods 80
truncate float to specified precision
truncate float to specified precision, output as string
truncate float to specified precision
Show 3 more
, Vector(), float.LOWEST, and float.MAXProduces ACII "progress bar" based on an 0..1 'value' input
Insert 'insert' behind index 'pos' of the 'base' string
static void TransferItemProperties(EntityAI source, notnull EntityAI target, bool transfer_agents = true, bool transfer_variables = true, bool transfer_health = true, bool exclude_quantity = false)will transform variables, agents and other local scripted properties as well as any relevant non-scripted properties like health
Show 4 more
, CGame.IsServer(), ItemBase.TransferAgents(), TransferEntityHealth(), and TransferEntityVariables()static void TransferEntityVariables(EntityAI source, EntityAI target, bool exclude_quantity = false)Show 23 more
, Class.Cast(), Class.Cast(), Class.CastTo(), Weapon_Base.CopyWeaponStateFrom(), Magazine.GetAmmoCount(), EntityAI.GetCompEM(), EntityAI.GetCompEM(), ComponentEnergyManager.GetEnergy(), EntityAI.GetVariablesFloat(), EntityAI.HasEnergyManager(), EntityAI.HasEnergyManager(), Object.IsMagazine(), Object.IsMagazine(), ComponentEnergyManager.IsSwitchedOn(), Object.IsWeapon(), Object.IsWeapon(), EntityAI.RemoveItemVariable(), Magazine.ServerSetAmmoCount(), ComponentEnergyManager.SetEnergy(), ComponentEnergyManager.SwitchOn(), Edible_Base.TransferFoodStage(), EntityAI.TransferVariablesFloat(), and EntityAI.m_VariablesMaskDEPRECATED
static TransferInventoryResult TransferInventory(EntityAI sourceItem, EntityAI targetItem, PlayerBase player)Show 10 more
, array.Get(), GameInventory.GetCurrentInventoryLocation(), EntityAI.GetInventory(), EntityAI.GetInventory(), EntityAI.GetInventory(), Man.LocalDropEntity(), GameInventory.LocationCanAddEntity(), CGame.RemoteObjectTreeCreate(), InventoryLocation.SetParent(), and GameInventory.TakeToDst()static void TransferEntityHealth(EntityAI source, EntityAI target, array<string> healthTypes = null, bool transferZoneDamage = true)Show 5 more
, Object.GetDamageZones(), Object.GetDamageZones(), Object.GetHealth01(), array.Insert(), and Object.SetHealth01()static void UnlimitedAmmoDebugCheck(Weapon_Base weapon)Show 4 more
, Weapon.GetMagazine(), CGame.IsServer(), Magazine.LocalSetAmmoMax(), and Magazine.ServerSetAmmoMax()static void TurnItemIntoItem(notnull ItemBase old_item, string new_item_type, notnull PlayerBase player)static void TurnItemIntoItemEx(notnull PlayerBase player, ReplaceItemWithNewLambdaBase lambda)Show 38 more
, ActionGiveBloodTarget.OnEndAnimationLoopServer(), ActionRestrainSelf.OnFinishProgressServer(), Barrel_ColorBase.ColourClothes(), TransformRestrainItem(), TurnItemIntoItem(), OpenItem.SwitchItems(), PaintAK74HndgrdBlack.Do(), PaintAK74HndgrdCamo.Do(), PaintAK74WoodBttstckBlack.Do(), PaintAK74WoodBttstckCamo.Do(), PaintAKWoodBttstckBlack.Do(), PaintAKWoodBttstckCamo.Do(), PaintCz527CamoBlack.Do(), PaintCz527CamoGreen.Do(), PaintGhillieAttBlack.Do(), PaintGhillieAttGreenMossy.Do(), PaintGhillieBushragBlack.Do(), PaintGhillieBushragGreenMossy.Do(), PaintGhillieHoodGreenMossy.Do(), PaintGhillieSuitGreen.Do(), PaintGhillieSuitGreenMossy.Do(), PaintGhillieTopBlack.Do(), PaintGhillieTopGreen.Do(), PaintGhillieTopGreenMossy.Do(), PaintItem.SwitchItems(), PaintMosinCamoBlack.Do(), PaintMosinCamoGreen.Do(), PaintSawedoffMosinCamoBlack.Do(), PaintSawedoffMosinCamoGreen.Do(), RemoteDetonatorTrigger.SpawnInPlayerHands(), SawOFFB95.Do(), SawoffFAMAS.Do(), SawOffIzh18.Do(), SawOffIzh18Shotgun.Do(), SawOffMagnum.Do(), SawoffMosin.Do(), SawoffMosinPainted.Do(), and SawoffShotgunIzh43.Do()static void TurnItemInHandsIntoItem(notnull ItemBase old_item, string new_item_type, notnull PlayerBase player)static void TurnItemInHandsIntoItemEx(notnull PlayerBase player, ReplaceItemWithNewLambdaBase lambda)static array<ItemBase> CreateItemBasePiles(string item_name, vector ground_position, float quantity, float health, bool floaty_spawn = false)Spawns multiple piles of stackable ItemBase objects on ground (intended for generic use)
Show 4 more
, Math.Floor(), array.Insert(), Object.SetHealth(), and ItemBase.SetQuantity()static array<ItemBase> CreateItemBasePilesDispersed(string item_name, vector starPos, vector targetPos, float radius, float quantity, float health, Object ignoreObjectCollison)creation method using raycast-dispersed positioning; ECE_TRACE not used as a result
Show 5 more
, Math.Floor(), GetRandomizedPositionVerified(), array.Insert(), Object.SetHealth(), and ItemBase.SetQuantity()static array<Magazine> CreateMagazinePiles(string item_name, vector ground_position, float quantity, float health)Show 3 more
, Math.Floor(), array.Insert(), and Magazine.ServerSetAmmoCount()static array<Magazine> CreateMagazinePilesDispersed(string item_name, vector starPos, vector targetPos, float radius, float quantity, float health, Object ignoreObjectCollison)creation method using raycast-dispersed positioning; ECE_TRACE not used as a result
Show 4 more
, Math.Floor(), GetRandomizedPositionVerified(), array.Insert(), and Magazine.ServerSetAmmoCount()static array<Magazine> CreateMagazinePilesFromBullet(string bullet_type, vector ground_position, float quantity, float health)Show 4 more
, CGame.CreateObjectEx(), Math.Floor(), array.Insert(), and Magazine.ServerSetAmmoCount()static array<Magazine> CreateMagazinePilesFromBulletDispersed(string bullet_type, vector starPos, vector targetPos, float radius, float quantity, float health, Object ignoreObjectCollison)Show 2 more
, array.Get(), and CachedObjectsArrays.ARRAY_FLOATstatic bool GetProjectedCursorPos3d(out vector position, Weapon_Base weapon)Show 1 more
, DayZPhysics.RaycastRV()static void GetHeadBonePos(notnull PlayerBase player, out vector pos)Show 19 more
, AITargetCallbacksPlayer.GetHeadPositionWS(), CCTCursor.Can(), CCTCursorNoObject.Can(), CCTCursorNoRuinCheck.Can(), CCTCursorParent.Can(), CCTObject.Can(), CCTParent.Can(), Construction.DropNonUsableMaterialsServer(), CraftTannedLeather.Do(), CrossHairSelector.FloatingCrossHair(), DayZPlayerImplementMeleeCombat.HitZoneSelection(), DayZPlayerImplementMeleeCombat.HitZoneSelectionRaycast(), DayZPlayerImplementMeleeCombat.IsObstructed(), FlashbangEffect.PlaySound(), GetRandomizedPositionVerifiedPlayer(), IsObjectObstructed(), StaticConstructionMethods.SpawnConstructionMaterialPiles(), UndergroundHandlerClient.CalculateBreadCrumbs(), and UndergroundHandlerClient.CalculateLinePointFade()static vector GetHeadingVector(notnull PlayerBase player)Show 3 more
, Math.Sin(), Math.PI_HALF, and vector.ZeroShow 8 more
, DayZPlayerImplementMeleeCombat.IsObstructed(), DayZPlayerImplementMeleeCombat.TargetSelection(), DayZPlayerMeleeFightLogic_LightHeavy.EvaluateHit_Player(), Hologram.DrawDebugArrow(), VicinityItemManager.ExcludeFromContainer_Phase1(), VicinityItemManager.RefreshVicinityItems(), Weapon_Base.LiftWeaponCheckEx(), and ZombieBase.FightLogic()static float GetHeadingAngle(notnull DayZPlayerImplement player)Show 1 more
, VicinityItemManager.DebugConeDraw()Show 1 more
, PlayerConstants.METABOLIC_SPEED_ENERGY_WALKShow 1 more
, PlayerConstants.METABOLIC_SPEED_WATER_WALKstatic void TransformRestrainItem(EntityAI current_item, EntityAI tool, PlayerBase player_source, PlayerBase player_target, bool destroy = false)static bool IsPlayerOrientedTowardPos(notnull DayZPlayerImplement player, vector target_pos, float cone_angle)Check if player direction(based on cone of defined angle) is oriented to target position
Show 5 more
, Object.GetDirection(), Object.GetPosition(), vector.Normalize(), vector.Normalize(), and Math.RAD2DEGdir in cone or in a tip of cone
static bool ComplexBuildCollideCheckClient(PlayerBase player, ActionTarget target, ItemBase item, string partName = "")static bool ComplexBuildCollideCheckClient(PlayerBase player, ActionTarget target, ItemBase item, int constraction_index)Show 10 more
, ConstructionActionData.GetBuildPartNoToolAtIndex(), BaseBuildingBase.GetConstruction(), PlayerBase.GetConstructionActionData(), ActionTarget.GetObject(), ConstructionPart.GetPartName(), ConstructionPart.GetPartName(), Construction.IsColliding(), PlayerBase.IsPlacingLocal(), PlayerBase.IsPlacingServer(), and BaseBuildingBase.PerformRoofCheckForBase()static bool BuildCondition(PlayerBase player, ActionTarget target, ItemBase item, bool camera_check)static bool BuildCondition(PlayerBase player, ActionTarget target, ItemBase item, bool camera_check, int constraction_index)Show 11 more
, ConstructionActionData.GetBuildPartAtIndex(), ConstructionActionData.GetBuildPartNoToolAtIndex(), PlayerBase.GetConstructionActionData(), Human.GetInputController(), ConstructionPart.GetMainPartName(), ActionTarget.GetObject(), CGame.IsDedicatedServer(), BaseBuildingBase.IsFacingCamera(), BaseBuildingBase.IsPlayerInside(), BaseBuildingBase.MustBeBuiltFromOutside(), and ConstructionActionData.SetTarget()static void IsUnderRoofFromToCalculation(EntityAI entity, out vector from, out vector to, float height = GameConstants.ROOF_CHECK_RAYCAST_DIST)Show 2 more
, EntityAI.HeightStartCheckOverride(), and Vector()Show 2 more
, Math.Sin(), and Vector()static vector GetRandomizedPositionVerified(vector startPos, vector targetPos, float radius, Object ignore = null)Show 1 more
, RaycastRVParams.typestatic vector GetRandomizedPositionVerifiedPlayer(Man player, float distance, float radius, Object ignore)Show 2 more
, Object.GetPosition(), and GetRandomizedPositionVerified()Show 13 more
, Object.GetCollisionBox(), EntityAI.GetInventory(), CargoBase.GetItem(), CargoBase.GetItemCount(), Object.GetOrientation(), Object.GetPosition(), GetVelocity(), array.Insert(), Math3D.MatrixToQuat(), Math.RandomFloat(), ThrowEntityFromInventory(), Vector(), and Math3D.YawPitchRollMatrix()static void ThrowEntityFromInventory(notnull EntityAI entity, vector position, float direction[4], vector force, int flags)Show 20 more
, Class.CastTo(), dBodyApplyImpulse(), GameInventory.DropEntity(), GameInventory.GetCurrentInventoryLocation(), EntityAI.GetHierarchyRoot(), EntityAI.GetInventory(), ItemBase.GetQuantity(), ItemBase.GetTargetQuantityMax(), Object.GetType(), CGame.IsMultiplayer(), GameInventory.LocationCreateEntity(), InventoryLocation.SetGroundEx(), InventoryLocation.SetGroundEx(), ItemBase.SetQuantity(), ItemBase.SplitIntoStackMaxToInventoryLocationEx(), GameInventory.TakeToDst(), InventoryItem.ThrowPhysically(), InventoryItem.ThrowPhysically(), InventoryItem.ThrowPhysically(), and TransferItemProperties()Show 20 more
, GameConstants.ENVIRO_ISOLATION_HEALTHFACTOR_B_DAMAGED, GameConstants.ENVIRO_ISOLATION_HEALTHFACTOR_DAMAGED, GameConstants.ENVIRO_ISOLATION_HEALTHFACTOR_PRISTINE, GameConstants.ENVIRO_ISOLATION_HEALTHFACTOR_RUINED, GameConstants.ENVIRO_ISOLATION_HEALTHFACTOR_WORN, GameConstants.ENVIRO_ISOLATION_WETFACTOR_DAMP, GameConstants.ENVIRO_ISOLATION_WETFACTOR_DRENCHED, GameConstants.ENVIRO_ISOLATION_WETFACTOR_DRY, GameConstants.ENVIRO_ISOLATION_WETFACTOR_SOAKED, GameConstants.ENVIRO_ISOLATION_WETFACTOR_WET, GameConstants.STATE_BADLY_DAMAGED, GameConstants.STATE_DAMAGED, GameConstants.STATE_DAMP, GameConstants.STATE_DRENCHED, GameConstants.STATE_DRY, GameConstants.STATE_PRISTINE, GameConstants.STATE_RUINED, GameConstants.STATE_SOAKING_WET, GameConstants.STATE_WET, and GameConstants.STATE_WORNstatic void FilterObstructingObjects(array<Object> potentiallyObstructingObjects, out array<Object> obstructingObjects)apply factors
Show 1 more
, array.Insert()static void FilterObstructedObjectsByGrouping(vector origin, float range, float distanceDelta, array<Object> objects, array<Object> obstructingObjects, out array<Object> filteredObjects, bool doDistanceCheck = false, bool checkIfDistanceCanBeIgnored = false, float maxDist = 0)group objects that are close to each other together
Show 33 more
, array.Copy(), array.Copy(), Math.Cos(), array.Count(), array.Count(), array.Count(), array.Count(), Count(), array.Count(), vector.DistanceSq(), vector.Dot(), array.Find(), Object.GetCollisionBox(), Object.GetOrientation(), Object.GetPosition(), Object.GetWorldPosition(), Object.GetWorldPosition(), Object.GetWorldPosition(), array.Insert(), array.Insert(), array.Insert(), array.Insert(), Insert(), new IsObjectObstructedCache(), IsObjectObstructedEx(), array.Remove(), vector.RotateAroundZero(), Math.Sin(), array.Sort(), SplitArrayIntoGroupsByDistance(), Vector(), vector.Aside, and vector.Upstatic void SplitArrayIntoGroupsByDistance(array<Object> objects, array<ref array<Object>> objectGroups, float squaredDistanceDelta)Show 4 more
, Object.GetWorldPosition(), array.Insert(), array.Insert(), and array.Remove()static bool IsObjectObstructed(Object object, bool doDistanceCheck = false, vector distanceCheckPos = "0 0 0", float maxDist = 0)Show 2 more
, new IsObjectObstructedCache(), and IsObjectObstructedEx()static bool IsObjectObstructedEx(Object object, IsObjectObstructedCache cache, bool doDistanceCheck = false, vector distanceCheckPos = "0 0 0", float maxDist = 0)static bool IsObjectObstructedProxy(Object object, IsObjectObstructedCache cache, PlayerBase player)static bool IsObjectObstructedFilter(Object object, IsObjectObstructedCache cache, PlayerBase player)Show 1 more
, IsObjectObstructedCache.HitObjectsstatic bool IsObjectObstructedFilterEx(Object object, IsObjectObstructedCache cache, PlayerBase player, int geometryTypeOverride = -1)groups 'RaycastRVProxy' and 'RaycastRV' approaches into one method, allowes for comprehensive geometry override, if desired
Show 16 more
, set.Count(), array.Count(), CGame.GetPlayer(), Object.IsMan(), DayZPhysics.RaycastRV(), new RaycastRVParams(), DayZPhysics.RaycastRVProxy(), IsObjectObstructedCache.ContactComponent, RaycastRVParams.flags, IsObjectObstructedCache.HitObjects, IsObjectObstructedCache.HitProxyObjects, IsObjectObstructedCache.ObjectCenterPos, IsObjectObstructedCache.ObjectContactDir, IsObjectObstructedCache.ObjectContactPos, IsObjectObstructedCache.RaycastStart, and RaycastRVParams.typestatic void DealEvinronmentAdjustedDmg(ItemBase item, PlayerBase player, float baseDamage)Show 12 more
, ActionDismantleGardenPlot.OnFinishProgressServer(), ActionLockAttachment.OnFinishProgressServer(), ActionLockDoors.OnFinishProgressServer(), ActionRepairBoatEngine.AdjustVehicleHealthServer(), ActionRepairCarEngine.AdjustVehicleHealthServer(), ActionSkinning.OnFinishProgressServer(), ActionUnlockDoors.OnFinishProgressServer(), ActionUnlockShippingContainer.OnFinishProgressServer(), ActionUnrestrainTarget.OnFinishProgressServer(), BarbedWire.PostAreaDamageActions(), LandMineTrap.OnSteppedOn(), and DealEvinronmentAdjustedDmg()static void RemoveSplint(PlayerBase player)Show 18 more
, EntityAI.Delete(), Object.GetHealthLevel(), EntityAI.GetInventory(), PlayerBase.GetItemOnSlot(), Object.GetMaxHealth(), Object.GetType(), CGame.IsServer(), Object.SetHealth(), PlayerBase.SpawnEntityOnGroundOnCursorDir(), TransferItemProperties(), GameConstants.DAMAGE_BADLY_DAMAGED_VALUE, GameConstants.DAMAGE_DAMAGED_VALUE, GameConstants.DAMAGE_RUINED_VALUE, GameConstants.DAMAGE_WORN_VALUE, GameConstants.STATE_BADLY_DAMAGED, GameConstants.STATE_DAMAGED, GameConstants.STATE_RUINED, and GameConstants.STATE_WORNstatic void TeleportCheck(notnull PlayerBase player, notnull array<ref array<float>> safe_positions)checks if we should teleport the player to a safe location and if so, performs the teleportation
static bool TeleportPlayerToSafeLocation3D(notnull PlayerBase player, vector safePos)'stupider' teleport method, does not touch flag management. Applies Y from the position as well!
Show 1 more
, Object.SetPosition()static void GenerateAINoiseAtPosition(vector position, float lifeTime, NoiseParams noiseParams)Show 2 more
, CGame.GetWeather(), and CGame.IsServer()Show 1 more
, string.ToLower()static void RemoveAllAttachedChildrenByTypename(notnull EntityAI parent, array<typename> listOfTypenames)Show 1 more
, PlayerBase.EEItemIntoHands()static void DeleteAttachedChildrenByTypename(notnull EntityAI parent, array<typename> listOfTypenames)Show 4 more
, IEntity.GetChildren(), IEntity.GetSibling(), Object.IsAnyInherited(), and IEntity.RemoveChild()Fills the provided array with all children entities in hierarchy of this entity
static void SoakItemInsideParentContainingLiquidAboveThreshold(notnull ItemBase item, notnull ItemBase parent, float liquidQuantityThresholdPercentage = 0.05)Show 2 more
, CGame.IsServer(), and ItemBase.SetWetMax()static float GetCombinedSnowfallWindValue()