PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
Enforce script essentials

Data Structures

class  Class
 Super root of all classes in Enforce script. More...
 
class  Managed
 TODO doc. More...
 
class  NonSerialized
 TODO doc. More...
 
class  ScriptModule
 Module containing compiled scripts. More...
 
class  EnScript
 
class  array< Class T >
 
class  set< Class T >
 
class  map< Class TKey, Class TValue >
 Associative array template
usage: More...
 

Typedefs

typedef int[] TypeID
 script representation for C++ RTTI types
 
typedef array< stringTStringArray
 
typedef array< floatTFloatArray
 
typedef array< intTIntArray
 
typedef array< boolTBoolArray
 
typedef array< ClassTClassArray
 
typedef array< ManagedTManagedArray
 
typedef array< ref ManagedTManagedRefArray
 
typedef array< vectorTVectorArray
 
typedef array< typenameTTypenameArray
 
typedef set< stringTStringSet
 
typedef set< floatTFloatSet
 
typedef set< intTIntSet
 
typedef set< ClassTClassSet
 
typedef set< ManagedTManagedSet
 
typedef set< ref ManagedTManagedRefSet
 
typedef set< typenameTTypenameSet
 
typedef int MapIterator
 
typedef map< int, floatTIntFloatMap
 
typedef map< int, intTIntIntMap
 
typedef map< int, stringTIntStringMap
 
typedef map< int, ClassTIntClassMap
 
typedef map< int, ManagedTIntManagedMap
 
typedef map< int, ref ManagedTIntManagedRefMap
 
typedef map< int, typenameTIntTypenameMap
 
typedef map< int, vectorTIntVectorMap
 
typedef map< string, floatTStringFloatMap
 
typedef map< string, intTStringIntMap
 
typedef map< string, stringTStringStringMap
 
typedef map< string, ClassTStringClassMap
 
typedef map< string, ManagedTStringManagedMap
 
typedef map< string, ref ManagedTStringManagedRefMap
 
typedef map< string, typenameTStringTypenameMap
 
typedef map< string, vectorTStringVectorMap
 
typedef map< Class, floatTClassFloatMap
 
typedef map< Class, intTClassIntMap
 
typedef map< Class, stringTClassStringMap
 
typedef map< Class, ClassTClassClassMap
 
typedef map< Class, ManagedTClassManagedMap
 
typedef map< Class, ref ManagedTClassManagedRefMap
 
typedef map< Class, typenameTClassTypenameMap
 
typedef map< Class, vectorTClassVectorMap
 
typedef map< typename, floatTTypeNameFloatMap
 
typedef map< typename, intTTypeNameIntMap
 
typedef map< typename, stringTTypeNameStringMap
 
typedef map< typename, ClassTTypeNameClassMap
 
typedef map< typename, ManagedTTypeNameManagedMap
 
typedef map< typename, ref ManagedTTypeNameManagedRefMap
 
typedef map< typename, typenameTTypeNameTypenameMap
 
typedef map< typename, vectorTTypeNameVectorMap
 
typedef map< Managed, floatTManagedFloatMap
 
typedef map< Managed, intTManagedIntMap
 
typedef map< Managed, stringTManagedStringMap
 
typedef map< Managed, ClassTManagedClassMap
 
typedef map< Managed, ManagedTManagedManagedMap
 
typedef map< Managed, ref ManagedTManagedManagedRefMap
 
typedef map< Managed, typenameTManagedTypenameMap
 
typedef map< Managed, vectorTManagedVectorMap
 
typedef map< ref Managed, floatTManagedRefFloatMap
 
typedef map< ref Managed, intTManagedRefIntMap
 
typedef map< ref Managed, stringTManagedRefStringMap
 
typedef map< ref Managed, ClassTManagedRefClassMap
 
typedef map< ref Managed, ManagedTManagedRefManagedMap
 
typedef map< ref Managed, ref ManagedTManagedRefManagedRefMap
 
typedef map< ref Managed, typenameTManagedRefTypenameMap
 
typedef map< ref Managed, vectorTManagedRefVectorMap
 

Functions

proto native external bool IsInherited (typename type)
 Returns true when instance is of the type, or inherited one.
 
proto native owned external string ClassName ()
 Returns name of class-type.
 
string GetDebugName ()
 
proto native external Type ()
 Returns typename of object's class.
 
proto static external StaticType ()
 Returns typename of object's reference.
 
static StaticGetType (typename t)
 Returns typename of class even without a variable or instance.
 
proto external string ToString ()
 
static proto Class Cast (Class from)
 Try to safely down-cast base class to child class.
 
static proto bool CastTo (out Class to, Class from)
 Try to safely down-cast base class to child class.
 
private static proto bool SafeCastType (Class type, out Class to, Class from)
 This function is for internal script usage.
 
private void ~ScriptModule ()
 
proto volatile int Call (Class inst, string function, void parm)
 
proto volatile int CallFunction (Class inst, string function, out void returnVal, void parm)
 
proto volatile int CallFunctionParams (Class inst, string function, out void returnVal, Class parms)
 
proto native void Release ()
 
static proto native ScriptModule LoadScript (ScriptModule parentModule, string scriptFile, bool listing)
 Do load script and create ScriptModule for it.
 
private void EnScript ()
 
private void ~EnScript ()
 
static proto int GetClassVar (Class inst, string varname, int index, out void result)
 Dynamic read of variable value by its name.
 
static proto int SetClassVar (Class inst, string varname, int index, void input)
 Dynamic write to variable by its name.
 
static proto int SetVar (out void var, string value)
 Sets variable value by value in string.
 
static proto void Watch (void var, int flags)
 Debug tool for watching certain variable. Invokes debugger whenever is variable used.
 
proto void Sort (void param_array[], int num)
 Sorts static array of integers(ascendically) / floats(ascendically) / strings(alphabetically)
 
proto void reversearray (void param_array)
 
proto void copyarray (void destArray, void srcArray)
 
proto int ParseStringEx (inout string input, string token)
 Parses one token from input string. Result is put into token string, and type of token is returned. Input string is left-truncated by the resulting token length.
 
proto int ParseString (string input, out string tokens[])
 Parses string into array of tokens returns number of tokens.
 
proto native int KillThread (Class owner, string name)
 Kills thread.
 
proto volatile void Idle ()
 
proto owned string ThreadFunction (Class owner, string name, int backtrace, out int linenumber)
 Debug function. Returns current function on stack of the thread.
 
string String (string s)
 Helper for passing string expression to functions with void parameter. Example: Print(String("Hello " + var));.
 
void PrintString (string s)
 Helper for printing out string expression. Example: PrintString("Hello " + var);.
 
proto native int Count ()
 
proto native void Clear ()
 
proto void Set (int n, T value)
 
proto int Find (T value)
 
proto T Get (int n)
 
proto int Insert (T value)
 
proto int InsertAt (T value, int index)
 
void InsertAll (notnull array< T > from)
 Inserts all elements from array.
 
proto native void Remove (int index)
 
proto native void RemoveOrdered (int index)
 
proto native void Resize (int newSize)
 
proto native void Reserve (int newSize)
 
proto native void Swap (notnull array< T > other)
 
proto native void Sort (bool reverse=false)
 
proto int Copy (notnull array< T > from)
 
proto int Init (T init[])
 
void RemoveItem (T value)
 
void RemoveItemUnOrdered (T value)
 
bool IsValidIndex (int index)
 
void Debug ()
 Print all elements in array.
 
int GetRandomIndex ()
 Returns a random index of array. If Count is 0, return index is -1 .
 
GetRandomElement ()
 Returns a random element of array.
 
void SwapItems (int item1_index, int item2_index)
 
void InsertArray (array< T > other)
 
void Invert ()
 
int MoveIndex (int curr_index, int move_number)
 Returns a index in array moved by specific number.
 
void ShuffleArray ()
 
int DifferentAtPosition (array< T > pOtherArray)
 Returns an index where 2 arrays start to differ from each other.
 
proto native int Count ()
 
proto native void Clear ()
 
proto int Find (T value)
 
proto T Get (int n)
 
proto int Insert (T value)
 
proto int InsertAt (T value, int index)
 
proto native void Remove (int index)
 
proto int Copy (set< T > from)
 
proto native void Swap (set< T > other)
 
proto int Init (T init[])
 
void InsertSet (set< T > other)
 
void RemoveItem (T value)
 
void RemoveItems (set< T > other)
 
void Debug ()
 
proto native int Count ()
 
proto native void Clear ()
 
proto TValue Get (TKey key)
 
proto bool Find (TKey key, out TValue val)
 
proto TValue GetElement (int index)
 
proto TKey GetKey (int i)
 
proto void Set (TKey key, TValue value)
 
proto void Remove (TKey key)
 
proto void RemoveElement (int i)
 
proto bool Contains (TKey key)
 
proto bool Insert (TKey key, TValue value)
 
proto int Copy (map< TKey, TValue > from)
 
array< TKey > GetKeyArray ()
 
array< TValue > GetValueArray ()
 
bool ReplaceKey (TKey old_key, TKey new_key)
 
TKey GetKeyByValue (TValue value)
 
bool GetKeyByValueChecked (TValue value, out TKey key)
 
proto native MapIterator Begin ()
 
proto native MapIterator End ()
 
proto native MapIterator Next (MapIterator it)
 
proto TKey GetIteratorKey (MapIterator it)
 
proto TValue GetIteratorElement (MapIterator it)
 

Detailed Description

Note
float ftime; The deltaTime since last frame
float FLT_MAX; The maximum value for float
float FLT_MIN; The minimum value for float

Typedef Documentation

◆ MapIterator

typedef int MapIterator

◆ TBoolArray

typedef array<bool> TBoolArray

◆ TClassArray

◆ TClassClassMap

◆ TClassFloatMap

◆ TClassIntMap

◆ TClassManagedMap

◆ TClassManagedRefMap

◆ TClassSet

typedef set<Class> TClassSet

◆ TClassStringMap

◆ TClassTypenameMap

◆ TClassVectorMap

◆ TFloatArray

◆ TFloatSet

typedef set<float> TFloatSet

◆ TIntArray

typedef array<int> TIntArray

◆ TIntClassMap

◆ TIntFloatMap

◆ TIntIntMap

typedef map<int, int> TIntIntMap

◆ TIntManagedMap

◆ TIntManagedRefMap

◆ TIntSet

typedef set<int> TIntSet

◆ TIntStringMap

◆ TIntTypenameMap

◆ TIntVectorMap

◆ TManagedArray

◆ TManagedClassMap

◆ TManagedFloatMap

◆ TManagedIntMap

◆ TManagedManagedMap

◆ TManagedManagedRefMap

◆ TManagedRefArray

◆ TManagedRefClassMap

◆ TManagedRefFloatMap

◆ TManagedRefIntMap

◆ TManagedRefManagedMap

◆ TManagedRefManagedRefMap

◆ TManagedRefSet

typedef set<ref Managed> TManagedRefSet

◆ TManagedRefStringMap

◆ TManagedRefTypenameMap

◆ TManagedRefVectorMap

◆ TManagedSet

typedef set<Managed> TManagedSet

◆ TManagedStringMap

◆ TManagedTypenameMap

◆ TManagedVectorMap

◆ TStringArray

◆ TStringClassMap

◆ TStringFloatMap

◆ TStringIntMap

◆ TStringManagedMap

◆ TStringManagedRefMap

◆ TStringSet

typedef set<string> TStringSet

◆ TStringStringMap

◆ TStringTypenameMap

◆ TStringVectorMap

◆ TTypenameArray

◆ TTypeNameClassMap

◆ TTypeNameFloatMap

◆ TTypeNameIntMap

◆ TTypeNameManagedMap

◆ TTypeNameManagedRefMap

◆ TTypenameSet

typedef set<typename> TTypenameSet

◆ TTypeNameStringMap

◆ TTypeNameTypenameMap

◆ TTypeNameVectorMap

◆ TVectorArray

◆ TypeID

typedef int [] TypeID

script representation for C++ RTTI types

Function Documentation

◆ Begin()

proto native MapIterator Begin ( )
private

◆ Call()

proto volatile int Call ( Class  inst,
string  function,
void  parm 
)
private

dynamic call of function when inst == NULL, it's global function call, otherwise it's method of class returns true, when success The call creates new thread, so it's legal to use sleep/wait

Referenced by UIScriptedMenu::Init(), and EnProfilerTests::TestFuncCountData().

◆ CallFunction()

proto volatile int CallFunction ( Class  inst,
string  function,
out void  returnVal,
void  parm 
)
private

◆ CallFunctionParams()

◆ Cast()

static proto Class Cast ( Class  from)
staticprivate

Try to safely down-cast base class to child class.

Returns
down-casted 'from' pointer when cast is successfull (classes are related), or null if casting is invalid
// assume that Man inheites from Object
Object obj = g_Game.GetPlayer();
Man player = Man.Cast(obj);
if (player)
{
// horay!
}
DayZGame g_Game
Definition DayZGame.c:3868
Definition ObjectTyped.c:2

◆ CastTo()

static proto bool CastTo ( out Class  to,
Class  from 
)
staticprivate

Try to safely down-cast base class to child class.

Returns
bool true when 'from' is not null and cast successfull, false when casting is not valid or 'from' is null
// assume that Man inheites from Object
Object obj = g_Game.GetPlayer();
Man player;
if (Class.CastTo(player, obj))
{
// horay!
}
Super root of all classes in Enforce script.
Definition EnScript.c:11
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Referenced by AbortWeaponEvent(), ActionCarHornBase::ActionCondition(), ActionBuryBody::ActionCondition(), ActionCoverHeadTarget::ActionCondition(), ActionDigGardenPlot::ActionCondition(), ActionDigInStash::ActionCondition(), ActionCondition(), ActionDisinfectPlant::ActionCondition(), ActionEatFruit::ActionCondition(), ActionFertilizeSlot::ActionCondition(), ActionFillGeneratorTank::ActionCondition(), ActionFillObject::ActionCondition(), ActionGagTarget::ActionCondition(), ActionLockDoors::ActionCondition(), ActionRefuelTorch::ActionCondition(), ActionRepairShelter::ActionCondition(), ActionRepairTent::ActionCondition(), ActionRepairTentPart::ActionCondition(), ActionShaveTarget::ActionCondition(), ActionUncoverHeadTarget::ActionCondition(), ActionUngagTarget::ActionCondition(), ActionUnlockShippingContainer::ActionCondition(), ActionUnlockDoors::ActionCondition(), ActionViewBinoculars::ActionCondition(), ActionViewOptics::ActionCondition(), ActionDefibrilateBase::ActionCondition(), ActionCloseDoors::ActionCondition(), ActionEnterLadder::ActionCondition(), ActionGetInTransport::ActionCondition(), ActionHarvestCrops::ActionCondition(), ActionOpenDoors::ActionCondition(), ActionPickupChicken::ActionCondition(), ActionRemovePlant::ActionCondition(), ActionRemoveSeed::ActionCondition(), ActionAnimateCarSelection::ActionCondition(), ActionAnimateSeats::ActionCondition(), ActionCarDoors::ActionCondition(), ActionCarDoorsOutside::ActionCondition(), ActionSwitchLights::ActionCondition(), ActionClapBearTrapWithThisItem::ActionCondition(), ActionOpen::ActionCondition(), ActionToggleNVMode::ActionCondition(), ActionZoomIn::ActionCondition(), ActionZoomOut::ActionCondition(), ActionStopEngine::ActionCondition(), ActionSwitchSeats::ActionCondition(), ActionWorldCraft::ActionConditionContinue(), CatchingContextTrapsBase::AdjustBaitItemChance(), UIScriptedMenu::Apply(), Environment::ApplyDrynessToItemEx(), ActionGetOutTransport::ApplyJumpOutDmg(), Environment::ApplyWetnessToItem(), ManBase::BrokenLegForceProne(), ButtonHighlight(), ButtonNormal(), CAContinuousEmptyMagazine::CalcAndSetQuantity(), CAContinuousTransferQuantity::CalcAndSetQuantity(), PluginBase::CalculateHealth(), ManBase::CalculateVisibilityForAI(), DayZPlayer::CameraHandler(), WeaponManager::CanAttachMagazine(), DayZPlayer::CanClimb(), Attachments::CanCombineAmmo(), VicinitySlotsContainer::CanCombineAmmo(), AttachmentCategoriesContainer::CanDisplayAnyCategory(), RecipeBase::CanDo(), ActionEmptyMagazine::CanEmpty(), ItemBase::CanLoadAttachment(), ActionLoadMagazine::CanLoadMagazine(), UIScriptedMenu::CanOpenMenu(), CanPlayEmote(), ItemBase::CanReceiveAttachment(), WeaponManager::CanSwapMagazine(), TrapBase::CauseVictimToStartLimping(), ScriptedWidgetEventHandler::CheckForActionWidgetOverrides(), ManBase::CheckForBurlap(), ManBase::CheckForGag(), ScriptedWidgetEventHandler::ColorRed(), ScriptedWidgetEventHandler::ColorWhite(), ConnectionLost::ConnectionLost(), BreakLongWoodenStick::CopyOldPropertiesToNew(), UnboxLambda::CopyOldPropertiesToNew(), CopyOldPropertiesToNew(), TorchLambda::CopyOldPropertiesToNew(), ActionFishingNewCB::CreateActionComponent(), ActionFishingNew::CreateAndSetupActionCallback(), CreateAndSetupActionCallback(), ActionRepositionPluggedItem::CreateAndSetupActionCallback(), ActionTakeArrowToHands::CreateAndSetupActionCallback(), ActionTakeHybridAttachmentToHands::CreateAndSetupActionCallback(), ActionTakeItemToHands::CreateAndSetupActionCallback(), ActionTakeMaterialToHands::CreateAndSetupActionCallback(), AnimatedActionBase::CreateAndSetupActionCallback(), MissionBase::CreateCharacter(), PlayerSpawnHandler::CreateChildItem(), CreateDamageTriggerEx(), CreateEmoteCallback(), CreateOrgan(), Hologram::CreateTrigger(), CreateTrigger(), EffectAreaLoader::CreateZones(), DamageCrew(), DamageDealtEffect::DamageDealtEffect(), DayZIntroScene::DayZIntroScene(), DayZPlayerCameraBase::DayZPlayerCameraIronsights(), DayZPlayerImplementAiming::DayZPlayerImplementAiming(), InventoryActionHandler::DeactiveAction(), DeferredWeaponFailed(), ActionDefibrilateBase::DefibrillateServer(), StaminaHandler::DepleteStaminaEx(), CatchingContextFishingBase::DeserializeData(), CatchingContextTrapsBase::DeserializeData(), ActionDismantlePart::DismantleCondition(), Hud::DisplayBadge(), Hud::DisplayNotifier(), Hud::DisplayPresence(), Hud::DisplayStance(), Hud::DisplayTendencyNormal(), RecipeBase::Do(), ClosableContainer::DraggingOverHeader(), WeaponDebug::DrawLineOfFireCameraHybrid(), WeaponDebug::DrawLineOfFireMuzzleToHit(), ManBase::DropAllItems(), ActionDeployBase::DropDuringPlacing(), ManBase::EEItemIntoHands(), Mask_Base::EEItemLocationChanged(), InventoryItemSuper::EEKilled(), EffectRadial(), Trigger::EOnEnter(), Trigger::EOnLeave(), AreaDamageTriggerBase::EOnTouch(), Hologram::EvaluateCollision(), ActionFishingNew::EvaluateFishingResult(), VicinityItemManager::ExcludeFromContainer_Phase1(), VicinityItemManager::ExcludeFromContainer_Phase2(), VicinityItemManager::ExcludeFromContainer_Phase3(), CAContinuousCraft::Execute(), CAContinuousFertilizeGardenSlot::Execute(), CAContinuousMineWood::Execute(), CAContinuousRepeatStartEngine::Execute(), CAContinuousTransferQuantity::Execute(), CAContinuousWaterPlant::Execute(), CAContinuousWaterSlot::Execute(), FlashbangEffect::FlashbangEffect(), FloatingCrossHair(), GameplayEffectsDataImage(), GenerateResult(), CatchingContextFishingRodAction::GenerateResult(), GestureMenuItem(), ActionTargetsCursor::GetActionManager(), ScriptedWidgetEventHandler::GetActionManager(), GetActionManager(), FishingRod_Base_New::GetActionWidgetOverride(), ActionMountBarbedWire::GetBarbedWire(), CarScript::GetCarDoorsState(), HandsContainer::GetCombinationFlags(), ItemManager::GetCombinationFlags(), ScriptedWidgetEventHandler::GetCrosshairPosition(), ActionTargetsCursor::GetItemHealth(), QuantityConversions::GetItemQuantity(), QuantityConversions::GetItemQuantity(), ActionTargetsCursor::GetItemQuantity(), QuantityConversions::GetItemQuantityMax(), QuantityConversions::GetItemQuantityText(), GetLocalProperties(), GetMeleeTarget(), CAContinuousMineRock::GetMiningData(), CAContinuousMineWood::GetMiningData(), InventoryItem::GetNumberOfItems(), ActionHarvestCrops::GetPlantSlot(), ActionTargetsCursor::GetPlayer(), ScriptedWidgetEventHandler::GetPlayer(), GetPlayer(), DeveloperTeleport::GetPlayerRootForTeleporting(), ScriptedWidgetEventHandler::GetRadioFrequency(), Managed::GetRequester(), ActionWorldCraft::GetText(), CGame::GetUserFOVFromConfig(), WeaponDebug::GetWeaponInHands(), BotGuardBase::GuardCondition(), HandEventBase(), DayZPlayer::HandleDeath(), BaseBuildingBase::HandleDropAttachment(), HandleDropCartridge(), HandleEngineSound(), HandleInventory(), PlayerSpawnHandler::HandleNewItem(), HandlePlayerBody(), HandleStoreCartridge(), HandleWeaponEvents(), DayZPlayer::HandleWeapons(), QuantityConversions::HasItemQuantity(), UIScriptedMenu::Init(), Init(), ScriptedWidgetEventHandler::Init(), Hud::Init(), Hud::InitBadgesAndNotifiers(), PPEMatClassParameterCommandData::InitDefaults(), IsAuthoritative(), IsEntityBehindEntityInAngle(), EntityAI::IsIgnoredObject(), HumanCommandVehicle::IsObjectIgnoredOnGettingOut(), IsOwner(), IsProxy(), VONManager::IsVoiceThresholdMinimum(), IsWearingBurlap(), ActionUncoverHeadTarget::IsWearingBurlap(), ActionUngagSelf::IsWearingGag(), ActionUngagTarget::IsWearingGag(), ManBase::IsWearingSplint(), ItemBase::ItemFall(), LoadingScreen(), ActionLockDoors::LockDoor(), UIScriptedMenu::MarkSelected(), DayZCreature::ModCommandHandlerBefore(), ModifierBase(), ActionWorldCraft::OnActionInfoUpdate(), ActionContinuousBase::OnAnimationEvent(), AKS74U::OnDebugSpawn(), Aug_Base::OnDebugSpawn(), Weapon_Base::OnDebugSpawn(), B95_base::OnDebugSpawn(), CZ550_Base::OnDebugSpawn(), RifleSingleShot_Base::OnDebugSpawn(), Mosin9130_Base::OnDebugSpawn(), Repeater::OnDebugSpawn(), Winchester70_Base::OnDebugSpawn(), Izh43Shotgun_Base::OnDebugSpawn(), Mp133Shotgun_Base::OnDebugSpawn(), VSS_Base::OnDebugSpawn(), CivilianBelt::OnDebugSpawn(), HelmetBase::OnDebugSpawn(), HipPack_ColorBase::OnDebugSpawn(), MilitaryBelt::OnDebugSpawn(), PlateCarrierVest::OnDebugSpawn(), FishingRod_Base_New::OnDebugSpawn(), Container_Base::OnDebugSpawn(), ItemBase::OnDebugSpawn(), CarScript::OnDebugSpawn(), AttachmentCategoriesRow::OnDropReceivedFromHeader(), ActionFishingNew::OnEnd(), ActionViewOptics::OnEndAnimationLoopClient(), ActionViewOptics::OnEndAnimationLoopServer(), ActionViewOptics::OnEndClient(), ActionContinuousBase::OnEndInput(), ActionFishingNew::OnEndInput(), ActionViewOptics::OnEndServer(), ActionCollectBloodSelf::OnEndServer(), ActionCollectBloodTarget::OnEndServer(), ActionCollectSampleSelf::OnEndServer(), ActionCollectSampleTarget::OnEndServer(), OnEndServer(), ActionAnimateCarSelection::OnEndServer(), ActionZoomIn::OnEndServer(), ActionZoomOut::OnEndServer(), WeaponStateBase::OnEntry(), WeaponStartAction::OnEntry(), WeaponFire::OnEntry(), OnEntry(), CGame::OnEvent(), OnEvent(), MissionBase::OnEvent(), ActionAttachWheels::OnExecuteClient(), ActionEmptyMagazine::OnExecuteServer(), ActionLoadMagazine::OnExecuteServer(), ActionRefuelTorch::OnExecuteServer(), OnExecuteServer(), ActionSwitchLights::OnExecuteServer(), ActionAttachWheels::OnExecuteServer(), ActionClapBearTrapWithThisItem::OnExecuteServer(), ActionStopEngine::OnExecuteServer(), WeaponFire::OnExit(), ActionFishingNew::OnFinishProgress(), ActionFillObject::OnFinishProgressClient(), ActionDefibrilateSelf::OnFinishProgressClient(), ActionDefibrilateTarget::OnFinishProgressClient(), ActionBreakLongWoodenStick::OnFinishProgressServer(), ActionCoverHeadSelf::OnFinishProgressServer(), ActionCoverHeadTarget::OnFinishProgressServer(), OnFinishProgressServer(), ActionFillObject::OnFinishProgressServer(), ActionGagSelf::OnFinishProgressServer(), ActionGagTarget::OnFinishProgressServer(), ActionRepairPart::OnFinishProgressServer(), ActionRepairShelter::OnFinishProgressServer(), ActionRepairTent::OnFinishProgressServer(), ActionShaveTarget::OnFinishProgressServer(), ActionStripCarrierVest::OnFinishProgressServer(), ActionUngagSelf::OnFinishProgressServer(), ActionUngagTarget::OnFinishProgressServer(), ActionWorldCraft::OnFinishProgressServer(), ActionDefibrilateSelf::OnFinishProgressServer(), Barrel_ColorBase::OnFreezeStateChangeServer(), OnFreezeStateChangeServer(), SymptomBase::OnInit(), ItemBase::OnInventoryEnter(), Weapon::OnItemLocationChanged(), Icon::OnPerformCombination(), HandsContainer::OnPerformCombination(), EntityPlacementCallback::OnQuery(), ManBase::OnQuickBarSingleUse(), TrapBase::OnServerSteppedOn(), EntityPlacementCallback::OnSetup(), OnShow(), CAContinuousRepeatFishing::OnSignalEnd(), ActionFishingNew::OnSignalEnd(), CAContinuousRepeatFishing::OnSignalStart(), ActionFishingNew::OnSignalStart(), ActionSwitchSeats::OnStart(), ActionViewOptics::OnStartAnimationLoopClient(), ActionViewOptics::OnStartAnimationLoopServer(), ActionCloseDoors::OnStartServer(), ActionGetOutTransport::OnStartServer(), ActionOpenDoors::OnStartServer(), ActionPullBodyFromTransport::OnStartServer(), ActionAnimateCarSelection::OnStartServer(), PPERequester_GameplayBase::OnStop(), InventoryItem::OnStoreLoad(), UngagSelfLambda::OnSuccess(), WeaponStartAction::OnUpdate(), OnUpdate(), WeaponFireMultiMuzzle::OnUpdate(), WeaponStateBase::OnUpdate(), OnVehicleJumpOutServer(), ItemOptics::OnWasAttached(), HeadGear_Base::OnWasAttached(), ItemBase::OnWasAttached(), ItemOptics::OnWasDetached(), ItemBase::OnWasDetached(), Icon::PerformCombination(), Hologram::PlaceEntity(), ManBase::PredictiveSwapEntities(), Environment::ProcessItemHierarchyRecursive(), DayZPlayer::ProcessWeaponEvent(), RandomizeSignalValues(), ActionFishingNew::ReadFromContext(), VicinityItemManager::RefreshVicinityItems(), GameplayEffectsData::RegisterData(), PPEClassBase::RegisterParameterColorEx(), PPEClassBase::RegisterParameterScalarFloatEx(), ManBase::ReloadWeapon(), ManBase::RemoveAllItems(), ItemBase::RemoveCookingAudioVisuals(), RemoveSplint(), ActionRepairTent::RepairDamageTransfer(), CatchingResultBase::RollChanceSeeded(), RollNextResultChance(), SelectStoreCartridge(), ActionBase::SendMessageToClient(), InventoryActionHandler::SetAction(), ActionTargetsCursor::SetActionWidget(), ScriptedWidgetEventHandler::SetActionWidget(), Weapon_Base::SetAttachmentsHealth(), ManBase::SetContaminatedEffectEx(), DayZIntroScenePC::SetInitPostprocesses(), DayZIntroSceneXbox::SetInitPostprocesses(), ActionTargetsCursor::SetInteractActionIcon(), ScriptedWidgetEventHandler::SetInteractActionIcon(), ScriptedWidgetEventHandler::SetItemDesc(), ActionTargetsCursor::SetItemDesc(), ActionTargetsCursor::SetItemHealth(), ScriptedWidgetEventHandler::SetItemHealth(), ActionTargetsCursor::SetItemQuantity(), ScriptedWidgetEventHandler::SetItemQuantity(), ScriptedWidgetEventHandler::SetRadioFrequency(), Hud::SetStamina(), CAContinuousCraft::Setup(), CAContinuousDisinfectPlant::Setup(), CAContinuousEmptyMagazine::Setup(), CAContinuousFertilizeGardenSlot::Setup(), CAContinuousFill::Setup(), CAContinuousFish::Setup(), CAContinuousLoadMagazine::Setup(), CAContinuousTransferQuantity::Setup(), CAContinuousWaterPlant::Setup(), CAContinuousWaterSlot::Setup(), ActionFishingNew::SetupAction(), ActionWorldCraft::SetupAction(), ScriptedWidgetEventHandler::SetValue(), Hud::SetWalkieTalkieText(), ScriptedWidgetEventHandler::SetWeaponModeAndZeroing(), ScriptedWidgetEventHandler::SetWeaponQuantity(), SoftSkillManagerDebug(), ActionSortAmmoPile::SortAmmo(), SpawnAdditionalItems(), CarchingResultFishingAction::SpawnAndSetup(), CatchingResultTrapBase::SpawnAndSetup(), PlayerSpawnHandler::SpawnComplexChildrenItems(), PluginBase::SpawnEntityOnCursorDir(), PluginBase::SpawnEntityOnGroundPatternGrid(), PluginBase::SpawnEntityOnGroundPos(), PlayerSpawnHandler::SpawnSimpleChildrenItems(), ActionEnterLadder::Start(), StopCooling(), SwitchPreset(), SyncAnimState(), HandsContainer::TakeAsAttachment(), ClosableContainer::TakeAsAttachment(), DeveloperTeleport::TeleportAtCursor(), DeveloperTeleport::TeleportAtCursorEx(), ScriptedWidgetEventHandler::TextMapUpdateWidget(), PluginDayzPlayerDebug_Weapons::Tick(), TransferEntityVariables(), ActionUnlockShippingContainer::TranslateLockSelectionIntoDoorIdx(), DayZPlayer::TriggerPullPlayerOutOfVehicle(), Managed::TrySpawnNextDrop(), ActionUncoverHeadBase::UncoverHead(), ActionUnlockShippingContainer::UnlockDoor(), ActionUnlockDoors::UnlockDoor(), GameplayEffectsData::Update(), Hud::UpdateBloodName(), UIScriptedMenu::UpdateItemInfoQuantity(), MissionBase::UpdatePlayersStats(), UniversalTemperatureSourceLambdaBaseImpl::UpdateVicinityTemperatureRecursive(), UniversalTemperatureSourceLambdaBaseImpl::WarmAndCoolItemsInVicinity(), ActionFishingNew::WriteToContext(), ActionMountBarbedWire::WriteToContext(), ActionRepairCarPart::WriteToContext(), ActionRepairPart::WriteToContext(), ActionRepairTent::WriteToContext(), ActionRepairTentPart::WriteToContext(), and ActionRepairVehiclePartBase::WriteToContext().

◆ ClassName()

proto native owned external string ClassName ( )
private

Returns name of class-type.

Parameters
instClass
Returns
string class-type
Man player = g_Game.GetPlayer();
string className = player.ClassName();
Print(className);
>> className = 'Man'
proto void Print(void var)
Prints content of variable to console/log.

Referenced by Class::GetDebugName().

◆ Clear() [1/3]

proto native void Clear ( )
private

Destroyes all elements of the array and sets the Count to 0. The underlying memory of the array is not freed.

◆ Clear() [2/3]

proto native void Clear ( )
private

◆ Clear() [3/3]

proto native void Clear ( )
private

Clears the hash map.

◆ Contains()

proto bool Contains ( TKey  key)
private

Returns if map contains element with given key.

◆ Copy() [1/3]

proto int Copy ( map< TKey, TValue >  from)
private

◆ Copy() [2/3]

proto int Copy ( notnull array< T >  from)
private

Copes contents of from array to this array.

Returns
How many elements were copied

◆ Copy() [3/3]

proto int Copy ( set< T >  from)
private

◆ copyarray()

proto void copyarray ( void  destArray,
void  srcArray 
)

◆ Count() [1/3]

proto native int Count ( )
private

O(1) complexity.

Returns
Number of elements of the array

◆ Count() [2/3]

proto native int Count ( )
private

◆ Count() [3/3]

proto native int Count ( )
private
Returns
The number of elements in the hashmap.

◆ Debug() [1/2]

void Debug ( )
inlineprivate

Print all elements in array.

Returns
void
my_array.Debug();
>> "One"
>> "Two"
>> "Three"

References Count, Get(), and Print().

◆ Debug() [2/2]

void Debug ( )
inlineprivate

References Count, Get(), and Print().

◆ DifferentAtPosition()

int DifferentAtPosition ( array< T >  pOtherArray)
inlineprivate

Returns an index where 2 arrays start to differ from each other.

Returns
int Index from where arrays differ
array<int> arr1 = {0,1,2,3};
array<int> arr2 = {0,1,3,2};
int differsAt = arr1.DifferentAtPosition(arr2);
Print(differsAt);
>> 2
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition IsBoxCollidingGeometryProxyClasses.c:28

References Count, ErrorEx, and Get().

◆ End()

proto native MapIterator End ( )
private

◆ EnScript()

private void EnScript ( )
inlineprivate

◆ Find() [1/3]

proto int Find ( value)
private

Tries to find the first occurance of given value in the array.

Returns
Index of the first occurance of value if found, -1 otherwise

◆ Find() [2/3]

proto int Find ( value)
private

Tries to find the first occurance of given value in the set.

Returns
Index of the first occurance of value if found, -1 otherwise

◆ Find() [3/3]

proto bool Find ( TKey  key,
out TValue  val 
)
private

Search for an element with the given key.

Parameters
keyThe key of the element to find
valresult is stored to val
Returns
returns True if given key exist.

◆ Get() [1/3]

proto T Get ( int  n)
private
Returns
Element at the index n

◆ Get() [2/3]

proto T Get ( int  n)
private

◆ Get() [3/3]

proto TValue Get ( TKey  key)
private

Search for an element with the given key.

Parameters
keyThe key of the element to find
Returns
Pointer to element data if found, NULL otherwise.

◆ GetClassVar()

static proto int GetClassVar ( Class  inst,
string  varname,
int  index,
out void  result 
)
staticprivate

Dynamic read of variable value by its name.

Parameters
instWhen inst == NULL, it's for global variable, otherwise it's class member
indexIs index when variable is array
[out]resultVariable must be of the same type!
Returns
int true when success
float count = 0;
bool success = EnScript.GetClassVar(myClass, "m_Counter", 0, count);
Print(count);
Print(success);
>> count = 5
>> success = 1
Definition EnScript.c:167
static proto int GetClassVar(Class inst, string varname, int index, out void result)
Dynamic read of variable value by its name.

◆ GetDebugName()

string GetDebugName ( )
inlineprivate

References Class::ClassName().

◆ GetElement()

proto TValue GetElement ( int  index)
private

Return the i:th element in the map. Note: This operation is O(n) complexity. Use with care!

Parameters
indexThe position of the element in the map
Returns
The element on the i:th position

◆ GetIteratorElement()

proto TValue GetIteratorElement ( MapIterator  it)
private

◆ GetIteratorKey()

proto TKey GetIteratorKey ( MapIterator  it)
private

◆ GetKey()

proto TKey GetKey ( int  i)
private

Return the i:th element key in the map. Note: This operation is O(n) complexity. Use with care!

Parameters
iThe position of the element key in the map
Returns
Return key of i-th element

◆ GetKeyArray()

array< TKey > GetKeyArray ( )
inlineprivate

References Count.

◆ GetKeyByValue()

TKey GetKeyByValue ( TValue  value)
inlineprivate

References Count, and GetElement().

◆ GetKeyByValueChecked()

bool GetKeyByValueChecked ( TValue  value,
out TKey  key 
)
inlineprivate

References Count, and GetElement().

◆ GetRandomElement()

T GetRandomElement ( )
inlineprivate

Returns a random element of array.

Returns
int Random element of array
Print( my_array.GetRandomElement() );
>> "Three"

References Get().

◆ GetRandomIndex()

int GetRandomIndex ( )
inlineprivate

Returns a random index of array. If Count is 0, return index is -1 .

Returns
int Random index of array
Print( my_array.GetRandomIndex() );
>> 2

References Count, and Math::RandomInt().

◆ GetValueArray()

array< TValue > GetValueArray ( )
inlineprivate

References Count, and GetElement().

◆ Idle()

proto volatile void Idle ( )

Yiels execution to other threads and then it continues. Obsolete...

◆ Init() [1/2]

proto int Init ( init[])
private

◆ Init() [2/2]

proto int Init ( init[])
private

◆ Insert() [1/3]

proto int Insert ( value)
private

Inserts element at the end of array.

Parameters
valueElement to be inserted
Returns
Position at which element is inserted

◆ Insert() [2/3]

proto int Insert ( value)
private

Inserts element at the end of array.

Parameters
valueElement to be inserted
Returns
Position at which element is inserted

◆ Insert() [3/3]

proto bool Insert ( TKey  key,
TValue  value 
)
private

Insert new element into hash map.

Parameters
keyKey of element to be inserted.
valueData of element to be inserted.

◆ InsertAll()

void InsertAll ( notnull array< T >  from)
inlineprivate

Inserts all elements from array.

Parameters
fromarray<T> array from which all elements will be added
arr1.Insert( "Dave" );
arr1.Insert( "Mark" );
arr1.Insert( "John" );
arr2.Insert( "Sarah" );
arr2.Insert( "Cate" );
arr1.InsertAll(arr2);
for ( int i = 0; i < arr1.Count(); i++ )
{
Print( arr1.Get(i) );
}
delete arr2;
delete arr1;
>> "Dave"
>> "Mark"
>> "John"
>> "Sarah"
>> "Cate"
array< string > TStringArray
Definition EnScript.c:685

◆ InsertArray()

void InsertArray ( array< T >  other)
inlineprivate

◆ InsertAt() [1/2]

proto int InsertAt ( value,
int  index 
)
private

Inserts element at certain position and moves all elements behind this position by one.

Parameters
valueElement to be inserted
indexPosition at which element is inserted. Must be less than Array::GetCardinality()
Returns
Number of elements after insertion

◆ InsertAt() [2/2]

proto int InsertAt ( value,
int  index 
)
private

Inserts element at certain position and moves all elements behind this position by one.

Parameters
valueElement to be inserted
indexPosition at which element is inserted. Must be less than Array::GetCardinality()
Returns
Number of elements after insertion

◆ InsertSet()

void InsertSet ( set< T >  other)
inlineprivate

◆ Invert()

void Invert ( )
inlineprivate

References Count, Get(), and Set().

◆ IsInherited()

proto native external bool IsInherited ( typename type  )
private

Returns true when instance is of the type, or inherited one.

Parameters
typeClass type
Returns
bool true when 'clType' is the same as 'type', or inherited one.
if (inst && inst.IsInherited(Widget))
{
Print("inst is inherited from Widget class!");
}
Definition EnWidgets.c:190

◆ IsValidIndex()

bool IsValidIndex ( int  index)
inlineprivate

References Count.

◆ KillThread()

proto native int KillThread ( Class  owner,
string  name 
)

Kills thread.

Parameters
ownerCan be NULL for global threads.
nameName of the first function on stack
Returns
int ???
???

◆ LoadScript()

static proto native ScriptModule LoadScript ( ScriptModule  parentModule,
string  scriptFile,
bool  listing 
)
staticprivate

Do load script and create ScriptModule for it.

Parameters
parentModuleModule
scriptFileScript path
listing??
Returns
ScriptModule Loaded scripted module
???

◆ MoveIndex()

int MoveIndex ( int  curr_index,
int  move_number 
)
inlineprivate

Returns a index in array moved by specific number.

Returns
int Moved index in this array
Print( "Count: "+ my_array.Count() );
Print( "Moved 1:"+ my_array.MoveIndex(2, 1) );
Print( "Moved 3:"+ my_array.MoveIndex(2, 2) );
>> "Count: 4"
>> "Moved index 2 by 1: 3";
>> "Moved index 2 by 2: 0";

References Count.

◆ Next()

proto native MapIterator Next ( MapIterator  it)
private

◆ ParseString()

proto int ParseString ( string  input,
out string  tokens[] 
)

Parses string into array of tokens returns number of tokens.

Parameters
inputstring String for parse
[out]tokensarray[] Parsed string in array
Returns
int Number of tokens
string token[2];
int result = ParseString("Hello World", token);
for( int i = 0; i < 2; i++ )
{
Print(token[i]);
}
>> 'Hello'
>> 'World'
proto int ParseString(string input, out string tokens[])
Parses string into array of tokens returns number of tokens.

◆ ParseStringEx()

proto int ParseStringEx ( inout string  input,
string  token 
)

Parses one token from input string. Result is put into token string, and type of token is returned. Input string is left-truncated by the resulting token length.

Parameters
[in,out]inputstring String for parse\ Output is without founded token
[out]tokenstring Founded string token
Returns
int Type of token
Token types:
 0 - error, no token
 1 - defined token (special characters etc. . / * )
 2 - quoted string. Quotes are removed -> TODO
 3 - alphabetic string
 4 - number
 5 - end of line -> TODO
string input = "Hello*World";
string token1;
string token2;
int result1 = ParseStringEx(input, token1);
int result2 = ParseStringEx(input, token2);
Print( String( "Token1 = '" + token1 + "' Type = " + result1.ToString() ) );
Print( String( "Token2 = '" + token2 + "' Type = " + result2.ToString() ) );
Print( input );
>> 'Toke1 = 'Hello' Type = 3'
>> 'Toke1 = '*' Type = 1'
proto int ParseStringEx(inout string input, string token)
Parses one token from input string. Result is put into token string, and type of token is returned....
string String(string s)
Helper for passing string expression to functions with void parameter. Example: Print(String("Hello "...
Definition EnScript.c:339

◆ PrintString()

◆ Release()

proto native void Release ( )
private

◆ Remove() [1/3]

proto native void Remove ( int  index)
private

Removes element from array. The empty position is replaced by last element, so removal is quite fast but do not retain order.

Parameters
indexIndex of element to be removed

◆ Remove() [2/3]

proto native void Remove ( int  index)
private

Removes element from array, but retain all elements ordered.

Parameters
indexIndex of element to be removed

◆ Remove() [3/3]

proto void Remove ( TKey  key)
private

Removes element with given key.

◆ RemoveElement()

proto void RemoveElement ( int  i)
private

Removes i:th element with given key. Note: This operation is O(n) complexity. Use with care!

Parameters
iThe position of the element key in the map

◆ RemoveItem() [1/2]

void RemoveItem ( value)
inlineprivate

◆ RemoveItem() [2/2]

void RemoveItem ( value)
inlineprivate

References Remove().

◆ RemoveItems()

void RemoveItems ( set< T >  other)
inlineprivate

◆ RemoveItemUnOrdered()

void RemoveItemUnOrdered ( value)
inlineprivate

References Remove().

◆ RemoveOrdered()

proto native void RemoveOrdered ( int  index)
private

Removes element from array, but retain all elements ordered. It's slower than Remove

Parameters
indexIndex of element to be removed

◆ ReplaceKey()

bool ReplaceKey ( TKey  old_key,
TKey  new_key 
)
inlineprivate

References Get(), Remove(), and Set().

◆ Reserve()

proto native void Reserve ( int  newSize)
private

Resizes the array to given size internally. Is used for optimization purposes when the approx. size is known beforehand

◆ Resize()

proto native void Resize ( int  newSize)
private

Resizes the array to given size. If the newSize is lower than current Count overflowing objects are destroyed. If the newSize is higher than current Count missing elements are initialized to zero (null).

◆ reversearray()

proto void reversearray ( void  param_array)

◆ SafeCastType()

private static proto bool SafeCastType ( Class  type,
out Class  to,
Class  from 
)
staticprivate

This function is for internal script usage.

◆ Set() [1/2]

proto void Set ( int  n,
value 
)
private

Sets n-th element to given value.

◆ Set() [2/2]

proto void Set ( TKey  key,
TValue  value 
)
private

Sets value of element with given key. If element with key not exists, it is created. Note: creating new elements is faster using Insert function.

◆ SetClassVar()

static proto int SetClassVar ( Class  inst,
string  varname,
int  index,
void  input 
)
staticprivate

Dynamic write to variable by its name.

Parameters
instwhen inst == NULL, it's for global variable, otherwise it's class member
varname
indexIs index when variable is array
inputInput variable must be of the same type!
Returns
int Returns true(1) when success
Print(myClass.m_Counter);
>> m_Counter = 0
bool success = EnScript.SetClassVar(myClass, "m_Counter", 0, 5.0);
Print(myClass.m_Counter);
Print(success);
>> m_Counter = 5
>> success = 1
int m_Counter
Definition DayZGame.c:704
static proto int SetClassVar(Class inst, string varname, int index, void input)
Dynamic write to variable by its name.

◆ SetVar()

static proto int SetVar ( out void  var,
string  value 
)
staticprivate

Sets variable value by value in string.

Parameters
[out]var
value
Returns
int
???

◆ ShuffleArray()

void ShuffleArray ( )
inlineprivate

References Count.

◆ Sort() [1/2]

proto native void Sort ( bool  reverse = false)
private

Sorts elements of array, depends on underlaying type.

◆ Sort() [2/2]

proto void Sort ( void  param_array[],
int  num 
)

Sorts static array of integers(ascendically) / floats(ascendically) / strings(alphabetically)

Parameters
param_arrayarray Array to sort
numint How many items will be sorted in array
Returns
void
string arrStr[3] = {"Dog", "Car", "Apple"};
Sort(arrStr, 2)
for ( int x = 0; x < 3; x++ )
{
Print( arrStr[x] );
}
>> 'Car'
>> 'Dog'
>> 'Apple'
Icon x
proto void Sort(void param_array[], int num)
Sorts static array of integers(ascendically) / floats(ascendically) / strings(alphabetically)

Referenced by ActionConstructor::ConstructActions(), and EmoteConstructor::ConstructEmotes().

◆ StaticGetType()

static StaticGetType ( typename )
inlinestaticprivate

Returns typename of class even without a variable or instance.

Returns
typename class-type
typename eAITypename = StaticGetType(EntityAI);
Definition Building.c:6
static StaticGetType(typename t)
Returns typename of class even without a variable or instance.
Definition EnScript.c:73

◆ StaticType()

proto static external StaticType ( )
staticprivate

Returns typename of object's reference.

Returns
typename class-type
Print(e.StaticType());
>> 'EntityAI'

◆ String()

◆ Swap() [1/2]

proto native void Swap ( notnull array< T >  other)
private

Swaps the contents of this and other arrays. Does not involve copying of the elements.

◆ Swap() [2/2]

proto native void Swap ( set< T >  other)
private

◆ SwapItems()

void SwapItems ( int  item1_index,
int  item2_index 
)
inlineprivate

References Get(), and Set().

◆ ThreadFunction()

proto owned string ThreadFunction ( Class  owner,
string  name,
int  backtrace,
out int  linenumber 
)

Debug function. Returns current function on stack of the thread.

Parameters
ownerCan be NULL for global threads
nameName of the first function on stack
backtrace???
linenumber???
Returns
string ???
???

◆ ToString()

proto external string ToString ( )
private

◆ Type()

proto native external Type ( )
private

Returns typename of object's class.

Returns
typename class-type
Man player = g_Game.GetPlayer();
typename type = player.Type();
Print(type.ToString());
>> 'Man'

◆ Watch()

static proto void Watch ( void  var,
int  flags 
)
staticprivate

Debug tool for watching certain variable. Invokes debugger whenever is variable used.

Parameters
varCertain variable for watching
flags= 1 means it will break even when not modified
Returns
void

◆ ~EnScript()

private void ~EnScript ( )
inlineprivate

◆ ~ScriptModule()

private void ~ScriptModule ( )
private