Enforce script essentials
float ftime; The deltaTime since last framefloat FLT_MAX; The maximum value for floatfloat FLT_MIN; The minimum value for floatClasses
Typedefs
MapIterator | int | |
TBoolArray | array<bool> | |
TClassArray | array<Class> | |
TClassClassMap | map<Class, Class> | |
TClassFloatMap | map<Class, float> | |
TClassIntMap | map<Class, int> | |
TClassManagedMap | map<Class, Managed> | |
TClassManagedRefMap | map<Class, ref Managed> | |
TClassSet | set<Class> | |
TClassStringMap | map<Class, string> | |
TClassTypenameMap | map<Class, typename> | |
TClassVectorMap | map<Class, vector> | |
TFloatArray | array<float> | |
TFloatSet | set<float> | |
TIntArray | array<int> | |
TIntClassMap | map<int, Class> | |
TIntFloatMap | map<int, float> | |
TIntIntMap | map<int, int> | |
TIntManagedMap | map<int, Managed> | |
TIntManagedRefMap | map<int, ref Managed> | |
TIntSet | set<int> | |
TIntStringMap | map<int, string> | |
TIntTypenameMap | map<int, typename> | |
TIntVectorMap | map<int, vector> | |
TManagedArray | array<Managed> | |
TManagedClassMap | map<Managed, Class> | |
TManagedFloatMap | map<Managed, float> | |
TManagedIntMap | map<Managed, int> | |
TManagedManagedMap | map<Managed, Managed> | |
TManagedManagedRefMap | map<Managed, ref Managed> | |
TManagedRefArray | array<ref Managed> | |
TManagedRefClassMap | map<ref Managed, Class> | |
TManagedRefFloatMap | map<ref Managed, float> | |
TManagedRefIntMap | map<ref Managed, int> | |
TManagedRefManagedMap | map<ref Managed, Managed> | |
TManagedRefManagedRefMap | map<ref Managed, ref Managed> | |
TManagedRefSet | set<ref Managed> | |
TManagedRefStringMap | map<ref Managed, string> | |
TManagedRefTypenameMap | map<ref Managed, typename> | |
TManagedRefVectorMap | map<ref Managed, vector> | |
TManagedSet | set<Managed> | |
TManagedStringMap | map<Managed, string> | |
TManagedTypenameMap | map<Managed, typename> | |
TManagedVectorMap | map<Managed, vector> | |
TStringArray | array<string> | |
TStringClassMap | map<string, Class> | |
TStringFloatMap | map<string, float> | |
TStringIntMap | map<string, int> | |
TStringManagedMap | map<string, Managed> | |
TStringManagedRefMap | map<string, ref Managed> | |
TStringSet | set<string> | |
TStringStringMap | map<string, string> | |
TStringTypenameMap | map<string, typename> | |
TStringVectorMap | map<string, vector> | |
TTypenameArray | array<typename> | |
TTypeNameClassMap | map<typename, Class> | |
TTypeNameFloatMap | map<typename, float> | |
TTypeNameIntMap | map<typename, int> | |
TTypeNameManagedMap | map<typename, Managed> | |
TTypeNameManagedRefMap | map<typename, ref Managed> | |
TTypenameSet | set<typename> | |
TTypeNameStringMap | map<typename, string> | |
TTypeNameTypenameMap | map<typename, typename> | |
TTypeNameVectorMap | map<typename, vector> | |
TVectorArray | array<vector> | |
TypeID | int[] |
Functions
private void ~EnScript() | ||
private void ~ScriptModule() | ||
proto native MapIterator Begin() | ||
proto volatile int Call(Class inst, string function, void parm) | 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 | |
proto volatile int CallFunction(Class inst, string function, out void returnVal, void parm) | dynamic call of function when inst == NULL, it's global function call, otherwise it's method of class returns true, when success The call do not create new thread!!!! | |
proto volatile int CallFunctionParams(Class inst, string function, out void returnVal, Class parms) | ||
proto static Class Cast(Class from) | Try to safely down-cast base class to child class. | more… |
proto static bool CastTo(out Class to, Class from) | Try to safely down-cast base class to child class. | more… |
proto native owned external string ClassName() | Returns name of class-type | more… |
proto native void Clear() [1/3] | Destroyes all elements of the array and sets the Count to 0. The underlying memory of the array is not freed. | |
proto native void Clear() [2/3] | Clears the hash map. | |
proto native void Clear() [3/3] | ||
proto bool Contains(TKey key) | Returns if map contains element with given key. | |
proto int Copy(notnull array<T> from) [1/3] | Copes contents of `from` array to this array. | more… |
proto int Copy(map<TKey,TValue> from) [2/3] | ||
proto int Copy(set<T> from) [3/3] | ||
proto void copyarray(void destArray, void srcArray) | ||
proto native int Count() [1/3] | O(1) complexity. | more… |
proto native int Count() [2/3] | more… | |
proto native int Count() [3/3] | ||
void Debug() [1/2] | Print all elements in array | more… |
void Debug() [2/2] | more… | |
int DifferentAtPosition(array<T> pOtherArray) | Returns an index where 2 arrays start to differ from each other | more… |
proto native MapIterator End() | ||
private void EnScript() | ||
proto int Find(T value) [1/3] | Tries to find the first occurance of given value in the array. | more… |
proto bool Find(TKey key, out TValue val) [2/3] | Search for an element with the given key. | more… |
proto int Find(T value) [3/3] | Tries to find the first occurance of given value in the set. | more… |
proto T Get(int n) [1/3] | more… | |
proto TValue Get(TKey key) [2/3] | Search for an element with the given key. | more… |
proto T Get(int n) [3/3] | ||
static proto int GetClassVar(Class inst, string varname, int index, out void result) | Dynamic read of variable value by its name | more… |
string GetDebugName() | more… | |
proto TValue GetElement(int index) | Return the i:th element in the map. Note: This operation is O(n) complexity. Use with care! | more… |
proto TValue GetIteratorElement(MapIterator it) | ||
proto TKey GetIteratorKey(MapIterator it) | ||
proto TKey GetKey(int i) | Return the i:th element key in the map. Note: This operation is O(n) complexity. Use with care! | more… |
array<TKey> GetKeyArray() | more… | |
TKey GetKeyByValue(TValue value) | more… | |
bool GetKeyByValueChecked(TValue value, out TKey key) | more… | |
T GetRandomElement() | Returns a random element of array | more… |
int GetRandomIndex() | Returns a random index of array. If Count is 0, return index is -1 . | more… |
array<TValue> GetValueArray() | more… | |
proto volatile void Idle() | Yiels execution to other threads and then it continues. Obsolete... | |
proto int Init(T init[]) [1/2] | ||
proto int Init(T init[]) [2/2] | ||
proto int Insert(T value) [1/3] | Inserts element at the end of array. | more… |
proto bool Insert(TKey key, TValue value) [2/3] | Insert new element into hash map. | more… |
proto int Insert(T value) [3/3] | Inserts element at the end of array. | more… |
void InsertAll(notnull array<T> from) | Inserts all elements from array | more… |
void InsertArray(array<T> other) | more… | |
proto int InsertAt(T value, int index) [1/2] | Inserts element at certain position and moves all elements behind this position by one. | more… |
proto int InsertAt(T value, int index) [2/2] | Inserts element at certain position and moves all elements behind this position by one. | more… |
void InsertSet(set<T> other) | more… | |
void Invert() | more… | |
proto native external bool IsInherited(typename type) | Returns true when instance is of the type, or inherited one. | more… |
bool IsValidIndex(int index) | more… | |
proto native int KillThread(Class owner, string name) | Kills thread. | more… |
static proto native ScriptModule LoadScript(ScriptModule parentModule, string scriptFile, bool listing) | Do load script and create ScriptModule for it | more… |
int MoveIndex(int curr_index, int move_number) | Returns a index in array moved by specific number | more… |
proto native MapIterator Next(MapIterator it) | ||
void Obsolete(string msg = "") | ||
proto int ParseString(string input, out string tokens[]) | Parses string into array of tokens returns number of tokens | more… |
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. | more… |
void PrintString(string s) | more… | |
proto native void Release() | ||
proto native void Remove(int index) [1/3] | Removes element from array. The empty position is replaced by last element, so removal is quite fast but do not retain order. | more… |
proto void Remove(TKey key) [2/3] | Removes element with given key. | |
proto native void Remove(int index) [3/3] | Removes element from array, but retain all elements ordered. | more… |
proto void RemoveElement(int i) | Removes i:th element with given key. Note: This operation is O(n) complexity. Use with care! | more… |
void RemoveItem(T value) [1/2] | more… | |
void RemoveItem(T value) [2/2] | more… | |
void RemoveItems(set<T> other) | more… | |
void RemoveItemUnOrdered(T value) | more… | |
proto native void RemoveOrdered(int index) | Removes element from array, but retain all elements ordered. It's slower than Remove | more… |
bool ReplaceKey(TKey old_key, TKey new_key) | more… | |
proto native void Reserve(int newSize) | Resizes the array to given size internally. Is used for optimization purposes when the approx. size is known beforehand | |
proto native void Resize(int newSize) | 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). | |
proto void reversearray(void param_array) | ||
private proto static bool SafeCastType(Class type, out Class to, Class from) | This function is for internal script usage | |
proto void Set(int n, T value) [1/2] | Sets n-th element to given value. | |
proto void Set(TKey key, TValue value) [2/2] | 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. | |
static proto int SetClassVar(Class inst, string varname, int index, void input) | Dynamic write to variable by its name | more… |
static proto int SetVar(out void var, string value) | Sets variable value by value in string | more… |
void ShuffleArray() | more… | |
proto void Sort(void param_array[], int num) [1/2] | Sorts static array of integers(ascendically) / floats(ascendically) / strings(alphabetically) | more… |
proto native void Sort(bool reverse = false) [2/2] | Sorts elements of array, depends on underlaying type. | more… |
static typename StaticGetType(typename t) | Returns typename of class even without a variable or instance | more… |
proto external static typename StaticType() | Returns typename of object's reference | more… |
string String(string s) | Helper for passing string expression to functions with void parameter. Example: Print(String("Hello " + var)); | more… |
proto native void Swap(notnull array<T> other) [1/2] | Swaps the contents of this and `other` arrays. Does not involve copying of the elements. | |
proto native void Swap(set<T> other) [2/2] | ||
void SwapItems(int item1_index, int item2_index) | more… | |
proto owned string ThreadFunction(Class owner, string name, int backtrace, out int linenumber) | Debug function. Returns current function on stack of the thread | more… |
proto external string ToString() | ||
proto native external typename Type() | Returns typename of object's class | more… |
static proto void Watch(void var, int flags) | Debug tool for watching certain variable. Invokes debugger whenever is variable used | more… |
Variables
string m_Msg |
Function Documentation
CastClass
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!
}CastToClass
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!
}ClassNameClass
proto native owned external string ClassName()Returns name of class-type
inst- Class
Returns: string class-type
Man player = g_Game.GetPlayer();
string className = player.ClassName();
Print(className);
>> className = 'Man'Show 30 more
, ActionCraftBoltsFeather.OnStartServer(), ActionMountBarbedWire.GetAdminLogMessage(), ActionSortAmmoPile.SortAmmo(), ActionUnmountBarbedWire.GetAdminLogMessage(), ActionUseUndergroundPanel.ActionCondition(), AgentBase.GetName(), CachedEquipmentStorage.LogMessage(), GetDebugName(), Edible_Base.FilterAgents(), Edible_Base.PrintNutritionsData(), Fireplace.OnIgnitedThis(), HudDebugWinHealth.InitEntityEntries(), Icon.CheckIsMagazineEx(), InfectedSoundEventBase.Play(), InfectedSoundEventHandler.PlayRequest(), Magazine.Magazine(), ModifierBase.GetName(), NotifierBase.GetName(), PlayerSoundEventHandler.PlayRequestEx(), PluginAdminLog.TotemFlagChange(), PluginBase.GetModuleName(), PluginRecipesManager.RegisterRecipe(), PluginSceneManager.ExecuteEnforceScript(), PresetSpawnBase.FindAndTakeToHandsFromInventory(), PresetSpawnBase.FindItem(), ReplaceSoundEventHandler.PlayReplaceSound(), ScriptConsoleItemsTab.ListItemRelatedActions(), SymptomBase.GetName(), SymptomManager.SpawnSymptom(), and TFCaller.GetTestEx()Copy [1/3]array
Copes contents of `from` array to this array.
Returns: How many elements were copied
Show 10 more
, ColorValuesData.ColorValuesData(), ColorValuesData.SetValues(), EntityAI.SetInvisibleRecursive(), GameplayEffectsDataImage.GameplayEffectsDataImage(), MiscGameplayFunctions.FilterObstructedObjectsByGrouping(), MiscGameplayFunctions.TransferEntityHealth(), PlayerRestrictedAreaInstance.GetRandomSafePos3D(), PPEMatClassParameterColor.Update(), PPERequesterBase.SetTargetValueColor(), and WeaponManager.SortMagazineAfterLoad()Count [1/3]array
proto native int Count()O(1) complexity.
Returns: Number of elements of the array
Count [2/3]map
proto native int Count()Returns: The number of elements in the hashmap.
Debug [1/2]array
void Debug()Print all elements in array
Returns: void
my_array.Debug();
>> "One"
>> "Two"
>> "Three"DifferentAtPositionarray
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);
>> 2Find [1/3]array
proto int Find(T value)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]map
proto bool Find(TKey key, out TValue val)Search for an element with the given key.
key- The key of the element to find
val- result is stored to val
Returns: returns True if given key exist.
Show 43 more
, BaseBuildingBase.DestroyAreaDamage(), CachedEquipmentStorage.ProcessAttachments(), CachedEquipmentStorage.ProcessCargo(), CrashSoundSets.GetSoundSetByHash(), DamageSystem.GetDamageDisplayName(), DayZPlayerCameras.GetTransitionTime(), EasterEgg.PlaySFX(), EmoteManager.CanPlayEmote(), EmoteManager.OnCallbackEnd(), EmoteManager.OnSyncJuncture(), EmoteManager.PlayEmote(), EntityAI.GetSkinningBloodInfectionChance(), ErrorHandlerModuleScript.GetProperties(), ErrorHandlerModuleScript.OnErrorThrown(), ExplosivesBase.AddExplosionEffectForSurface(), ExplosivesBase.GetParticleExplosionID(), FoodStage.CanTransitionToFoodStageType(), FoodStage.GetAllCookingPropertiesForStage(), FoodStage.GetCookingPropertyFromIndex(), FoodStage.GetNextFoodStageType(), FoodStage.GetNutritionPropertyFromIndex(), FoodStage.UpdateVisualsEx(), HiddenSelectionsData.GetHiddenSelectionIndex(), MainMenuData.GetDLCModInfoByName(), MissionServer.EquipCharacter(), ParticleList.GetParticleIDByName(), ParticleList.GetParticlePath(), ParticleList.RegisterParticle(), PlayerBase.GetBloodyHandsPenaltyChancePerAgent(), PlayerListScriptedWidget.Reload(), PlayerListScriptedWidget.ReloadLocal(), PMTF.GetManager(), PPEClassBase.InsertParamValueData(), SEffectManager.EffectUnregister(), SEffectManager.GetCachedSoundParam(), ServerBrowserHelperFunctions.AddMapInfo(), ServerBrowserTab.Unfavorite(), StaminaConsumers.HasEnoughStaminaFor(), StaminaConsumers.HasEnoughStaminaToStart(), StaminaHandler.SetCooldown(), TriggerEffectManager.IsPlayerInTriggerType(), TriggerEffectManager.OnPlayerEnter(), and TriggerEffectManager.OnPlayerExit()Find [3/3]set
proto int Find(T value)Tries to find the first occurance of given value in the set.
Returns: Index of the first occurance of `value` if found, -1 otherwise
Show 22 more
, EntityAI.ClearSingleExclusionValueGlobal(), EntityAI.HasInternalExclusionConflicts(), EntityAI.IsExclusionFlagPresent(), GameplayEffectWidgets.RemoveActiveEffects(), GameplayEffectWidgets.RemoveSuspendRequest(), GameplayEffectWidgets.UpdateVisibility(), GameplayEffectWidgets.UpdateWidgets(), Land_Underground_Panel.UnregisterEntrance(), Land_Underground_Panel.UnregisterPanel(), Land_WarheadStorage_PowerStation.UnregisterBunker(), PluginRemotePlayerDebugServer.OnRequestReceived(), PluginUniversalTemperatureSourceServer.OnRequestReceived(), PowerGeneratorStatic.UnregisterPersistentObject(), RainProcurementHandler.HandleChangedComponents(), ScriptedLightBase.~ScriptedLightBase(), ServerBrowserFavoritesTabConsolePages.LoadExtraEntries(), ServerBrowserFavoritesTabPc.LoadExtraEntries(), ServerBrowserTabConsolePages.LoadEntries(), RemoveItem(), StaminaHandler.DeactivateDepletionModifier(), StaminaHandler.DeactivateRecoveryModifier(), and UndergroundHandlerClient.OnTriggerLeave()Get [1/3]array
proto T Get(int n)Returns: Element at the index `n`
Get [2/3]map
proto TValue Get(TKey key)Search for an element with the given key.
key- The key of the element to find
Returns: Pointer to element data if found, NULL otherwise.
GetClassVarEnScript
Dynamic read of variable value by its name
inst- When inst == NULL, it's for global variable, otherwise it's class member
index- Is index when variable is array
- out
result - Variable 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 = 1GetDebugNameClass
string GetDebugName()Show 3 more
, SEffectManager.Cleanup(), SEffectManager.EffectRegister(), and TFCaller.Run()GetElementmap
proto TValue GetElement(int index)Return the i:th element in the map. Note: This operation is O(n) complexity. Use with care!
index- The position of the element in the map
Returns: The element on the i:th position
GetKeymap
proto TKey GetKey(int i)Return the i:th element key in the map. Note: This operation is O(n) complexity. Use with care!
i- The position of the element key in the map
Returns: Return key of i-th element
GetKeyByValuemap
TKey GetKeyByValue(TValue value)Show 12 more
, HudDebugWinCharStats.UpdateValues(), IconsContainer.RemoveItem(), IngameHud.Debug(), Inventory.MoveAttachmentDown(), Inventory.MoveAttachmentUp(), InventoryGrid.GetColFromBg(), ParticleList.GetParticleID(), PluginVariables.GetID(), ScriptConsoleConfigTab.~ScriptConsoleConfigTab(), TabberUI.OnMouseButtonUp(), TabberUI.OnMouseEnter(), and TabberUI.OnMouseLeave()GetRandomElementarray
T GetRandomElement()Returns a random element of array
Returns: int Random element of array
Print( my_array.GetRandomElement() );
>> "Three"Show 11 more
, DayZGame.CreateRandomPlayer(), DayZIntroSceneXbox.CreateRandomCharacter(), IntroSceneCharacter.CreateNewCharacterRandom(), MenuDefaultCharacterData.GenerateRandomEquip(), MissionServer.EquipCharacter(), OnlineServices.GetRandomFreeResult(), PlayerSpawnHandler.GetRandomCharacterPreset(), PlayerSpawnHandler.SelectAndSpawnCargoSet(), PlayerSpawnHandler.SelectAndSpawnSlotEquipment(), PlayerSpawnPreset.GetRandomCharacterType(), and ServerBrowserTab.InitDummyServers()GetRandomIndexarray
int GetRandomIndex()Returns a random index of array. If Count is 0, return index is -1 .
Returns: int Random index of array
Print( my_array.GetRandomIndex() );
>> 2Insert [1/3]array
proto int Insert(T value)Inserts element at the end of array.
value- Element to be inserted
Returns: Position at which element is inserted
Insert [2/3]map
proto bool Insert(TKey key, TValue value)Insert new element into hash map.
key- Key of element to be inserted.
value- Data of element to be inserted.
Insert [3/3]set
proto int Insert(T value)Inserts element at the end of array.
value- Element to be inserted
Returns: Position at which element is inserted
InsertAllarray
void InsertAll(notnull array<T> from)Inserts all elements from array
fromarray<T>array from which all elements will be added
TStringArray arr1 = new TStringArray;
arr1.Insert( "Dave" );
arr1.Insert( "Mark" );
arr1.Insert( "John" );
TStringArray arr2 = new TStringArray;
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"InsertAt [1/2]array
Inserts element at certain position and moves all elements behind this position by one.
value- Element to be inserted
index- Position at which element is inserted. Must be less than Array::GetCardinality()
Returns: Number of elements after insertion
Show 24 more
, ContainerWithCargoAndAttachments.RecomputeContainers(), DayZCreatureAnimScriptDebug.OnAnimationEvent(), InventoryItem.ProcessImpactSoundEx(), MissionMainMenu.SortedInsert(), PlayerAgentPool.GetDebugObject(), PlayerContainer.Insert(), PlayerStatsPCO_Base.RegisterStat(), PluginConfigDebugProfile.AddWeatherPreset(), PluginDayZCreatureAIDebug.SendSyncMessages(), PluginDeveloperSync.SendRPCHealth(), PluginDeveloperSync.SendRPCLevels(), PluginDeveloperSync.SendRPCStats(), PluginDeveloperSync.SendRPCStomach(), PluginItemDiagnostic.GetLocalProperties(), PluginItemDiagnostic.SendRPC(), RadialQuickbarMenu.CheckForLightsAndNVG(), RecipeBase.InsertIngredientEx(), RemotePlayerDamageDebug.AddDamage(), ServerBrowserTabPc.SortedInsertAsc(), ServerBrowserTabPc.SortedInsertDesc(), ServerBrowserTabPc.SortedInsertEx(), SymptomManager.QueueUpPrimarySymptom(), WeaponManager.OnMagazineInventoryEnter(), and WeaponManager.SortMagazineAfterLoad()InsertAt [2/2]set
Inserts element at certain position and moves all elements behind this position by one.
value- Element to be inserted
index- Position at which element is inserted. Must be less than Array::GetCardinality()
Returns: Number of elements after insertion
Invertarray
void Invert()IsInheritedClass
Returns true when instance is of the type, or inherited one.
type- Class 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!");
}IsValidIndexarray
Show 14 more
, LeftArea.GetCurrentContainerBottomY(), LeftArea.GetCurrentContainerTopY(), LightDimming.SwapConfig(), PluginConfigDebugProfile.GetItemParams(), PMTPlayback.CheckOnePlayingSA(), PMTPlayback.CheckOnePlayingSAAD(), PMTPlayback.CheckStop(), ScriptConsoleEnfScriptServerTab.OnSelected(), ScriptConsoleEnfScriptTab.OnSelected(), ScriptConsoleItemsTab.SelectPreset(), ScriptConsoleVicinityTab.OnClick(), ScriptConsoleVicinityTab.UpdateSelected(), SlotsContainer.GetSlotIcon(), and UndergroundTriggerCarrier.SpawnTrigger()KillThread
Kills thread.
owner- Can be NULL for global threads.
name- Name of the first function on stack
Returns: int ???
???LoadScriptScriptModule
static proto native ScriptModule LoadScript(ScriptModule parentModule, string scriptFile, bool listing)Do load script and create ScriptModule for it
parentModule- Module
scriptFile- Script path
listing- ??
Returns: ScriptModule Loaded scripted module
???MoveIndexarray
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";ParseString
Parses string into array of tokens returns number of tokens
inputstringString for parse- out
tokens array[]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'ParseStringEx
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.
- [in,out] input
stringString for parse\ Output is without founded token - out
token stringFounded string token
Returns: int Type of token \verbatim 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 \endverbatim
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'PrintString
void PrintString(string s)Show 21 more
, InventoryGrid.OnDrag(), InventoryGrid.OnDraggingOver(), InventoryGrid.OnDrop(), InventoryGrid.OnDropReceived(), InventoryGrid.OnMouseButtonDown(), InventoryGrid.OnMouseButtonUp(), InventoryGrid.OnMouseEnter(), PlayerBase.ShowUnconsciousScreen(), PluginDeveloper.OnSpawnErrorReport(), PluginLocalProfile.LoadConfigFile(), PluginRecipesManager.GenerateHumanReadableRecipeList(), PluginRecipesManager.PrintCache(), PluginRemotePlayerDebugClient.DebugDamage(), PluginRemotePlayerDebugClient.OnRPC(), PluginUniversalTemperatureSourceClient.PrintedDebug(), RecoilBase.ApplyMouseOffset(), RecoilBase.Update(), RemotePlayerDamageDebug.Debug(), StatDebugObject.Debug(), VirtualHud.PrintElements(), and WeaponDebug.DrawLineOfFireCameraHybrid()Remove [1/3]array
proto native void Remove(int index)Removes element from array. The empty position is replaced by last element, so removal is quite fast but do not retain order.
index- Index of element to be removed
Remove [3/3]set
proto native void Remove(int index)Removes element from array, but retain all elements ordered.
index- Index of element to be removed
Show 15 more
, GameplayEffectWidgets.RemoveSuspendRequest(), Land_Underground_Panel.UnregisterEntrance(), Land_Underground_Panel.UnregisterPanel(), Land_WarheadStorage_PowerStation.UnregisterBunker(), PluginRemotePlayerDebugServer.OnRequestReceived(), PluginRemotePlayerDebugServer.SendDebug(), PluginUniversalTemperatureSourceServer.OnRequestReceived(), PowerGeneratorStatic.UnregisterPersistentObject(), RainProcurementHandler.Cleanup(), RainProcurementHandler.HandleChangedComponents(), ScriptedLightBase.~ScriptedLightBase(), RemoveItem(), StaminaHandler.DeactivateDepletionModifier(), StaminaHandler.DeactivateRecoveryModifier(), and UndergroundHandlerClient.OnTriggerLeave()RemoveElementmap
proto void RemoveElement(int i)Removes i:th element with given key. Note: This operation is O(n) complexity. Use with care!
i- The position of the element key in the map
RemoveItem [1/2]array
void RemoveItem(T value)Show 34 more
, ArrowManagerBase.RemoveArrow(), BoatScript.RemoveAction(), BuildingBase.RemoveAction(), CachedEquipmentStorageBase.Remove(), CargoContainer.ReleaseLock(), CargoContainer.RemovedFromCargo(), CarScript.RemoveAction(), ClientData.RemovePlayerBase(), Container.Remove(), EntityAI.EEItemDetached(), GameplayEffectsDataBleeding.CleanupBleedingIndicators(), HandsContainer.AttachmentRemoved(), HandsContainer.DestroyAtt(), HandsContainer.DestroyCargo(), HandsContainer.OnPerformCombination(), InputUtils.InitInputMetadata(), ItemBase.RemoveAction(), MapNavigationBehaviour.OnItemNotInPlayerPossession(), MissionGameplay.RemoveActiveInputExcludes(), MissionGameplay.RemoveActiveInputRestriction(), MissionServer.RemoveActiveInputExcludes(), MissionServer.RemoveActiveInputRestriction(), NotificationSystem.LoadNotificationData(), NotificationSystem.Update(), OutdoorThermometerManager.Remove(), PlayerBase.RemoveActiveNV(), PlayerLightManager.UpdateLightSourceList(), PluginConfigDebugProfile.RemovePreset(), PluginInventoryRepair.Remove(), PluginManager.UnregisterPlugin(), PluginSceneManager.DeleteSelectedObject(), ServerBrowserMenuNew.AddFavorite(), TFModule.Run(), and WeaponManager.OnMagazineInventoryExit()RemoveItem [2/2]set
void RemoveItem(T value)RemoveItemsset
void RemoveItems(set<T> other)RemoveOrderedarray
proto native void RemoveOrdered(int index)Removes element from array, but retain all elements ordered. It's slower than Remove
index- Index of element to be removed
SetClassVarEnScript
Dynamic write to variable by its name
inst- when inst == NULL, it's for global variable, otherwise it's class member
varnameindex- Is index when variable is array
input- Input 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 = 1SetVarEnScript
Sets variable value by value in string
- out
var value
Returns: int
???ShuffleArrayarray
void ShuffleArray()Sort [1/2]
proto void Sort(void param_array[], int num)Sorts static array of integers(ascendically) / floats(ascendically) / strings(alphabetically)
param_arrayarrayArray to sortnumintHow 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'Sort [2/2]array
proto native void Sort(bool reverse = false)Sorts elements of array, depends on underlaying type.
StaticGetTypeClass
Returns typename of class even without a variable or instance
Returns: typename class-type
typename eAITypename = StaticGetType(EntityAI);StaticTypeClass
proto external static typename StaticType()Returns typename of object's reference
Returns: typename class-type
EntityAI e;
Print(e.StaticType());
>> 'EntityAI'String
Helper for passing string expression to functions with void parameter. Example: Print(String("Hello " + var));
Show 9 more
, IngameHud.DisplayTendencyNormal(), IngameHud.DisplayTendencyTemp(), IngameHud.InitBadgesAndNotifiers(), ScriptCamera.DebugInfo(), ScriptConsoleEnfScriptTab.Add(), ScriptConsoleOutputTab.Add(), UndergroundHandlerClient.CalculateLinePointFade(), UndergroundHandlerClient.DisplayDebugInfo(), and WorldsMenu.InsertWorldToList()SwapItemsarray
ThreadFunction
Debug function. Returns current function on stack of the thread
owner- Can be NULL for global threads
name- Name of the first function on stack
backtrace- ???
linenumber- ???
Returns: string ???
???TypeClass
proto native external typename Type()Returns typename of object's class
Returns: typename class-type
Man player = g_Game.GetPlayer();
typename type = player.Type();
Print(type.ToString());
>> 'Man'