class CGameSource
DayZGame › CGame
Constructors 2
void CGame()private void ~CGame()Show 1 more
, VONManager.CleanupInstance()Members 7
int m_DebugMonitorEnabledScriptModule GameScriptShow 31 more
, ComponentEnergyManager.Event_OnInit(), ComponentEnergyManager.SwitchOff(), ComponentEnergyManager.SwitchOn(), CreditsMenu.Init(), DayZCreatureAI.ModCommandHandlerBefore(), EnProfilerTests.TestFuncCountData(), PluginKeyBinding.OnKeyPress(), PluginKeyBinding.OnMouse(), PMTCreationAndCleanup.TestCleanup(), RadialMenu.OnMouseButtonUp(), RadialMenu.SetControlType(), RadialMenu.UpdataControllerInput(), RadialMenu.Update(), TFCaller.Run(), Timer.OnTimer(), UniversalTemperatureSourceTimer.OnTimer(), WidgetEventHandler.OnChildAdd(), WidgetEventHandler.OnChildRemove(), WidgetEventHandler.OnClick(), WidgetEventHandler.OnDoubleClick(), WidgetEventHandler.OnDrag(), WidgetEventHandler.OnDraggingOver(), WidgetEventHandler.OnDrop(), WidgetEventHandler.OnDropReceived(), WidgetEventHandler.OnFocus(), WidgetEventHandler.OnFocusLost(), WidgetEventHandler.OnMouseButtonDown(), WidgetEventHandler.OnMouseButtonUp(), WidgetEventHandler.OnMouseEnter(), WidgetEventHandler.OnMouseLeave(), and WidgetEventHandler.OnMouseWheel()ref AnalyticsManagerServer m_AnalyticsManagerServerref AnalyticsManagerClient m_AnalyticsManagerClientref MenuDefaultCharacterData m_CharacterDataref array<ComponentEnergyManager> m_EnergyManagerArrayDIAG_DEVELOPERMethods 273
void EnableEMPlugs(bool enable)DIAG_DEVELOPERproto native WorkspaceWidget GetWorkspace()proto native WorkspaceWidget GetLoadingWorkspace()Called when some system event occur.
eventTypeId- event type.
params- Param object, cast to specific param class to get parameters for particular event.
void OnProcessLifetimeChanged(int plmtype)void OnLicenseChanged()void OnAfterCreate()Called after creating of CGame instance
void OnActivateMessage()Called when recieving focus (windows)
void OnDeactivateMessage()Called when loosing focus (windows)
bool OnInitialize()Called once before game update loop starts, ret value indicates if init was done in scripts, otherwise it is done in the engine
void OnDeviceReset()Called when inputs is not possible (Steam overlay active or something), all internal script variables should be reset here!
Called on World update
doSim- False when simulation is paused, True otherwise
timeslice- time elapsed from last call
Called on World update after simulation of entities
doSim- False when simulation is paused, True otherwise
timeslice- time elapsed from last call
void OnKeyPress(int key)Called when key is pressed
key- direct input key code (DIK)
void OnKeyRelease(int key)Called when key is released
key- direct input key code (DIK)
void OnMouseButtonPress(int button)Called when mouse button is pressed
button- - number of button \ref Mouse
void OnMouseButtonRelease(int button)Called when mouse button is released
button- - number of button \ref Mouse
UIScriptedMenu CreateScriptedMenu(int id)create custom main menu part (submenu)
UIScriptedWindow CreateScriptedWindow(int id)create custom window part
void OnRPC(PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx)Called after remote procedure call is recieved for this object
target- object on which remote procedure is called, when NULL, RPC is evaluated by CGame as global
rpc_type- user defined identification of RPC
ctx- read context for params
proto native void RequestExit(int code)Sets exit code and quits in the right moment
proto native void RequestRestart(int code)Sets exit code and restart in the right moment
proto native bool IsAppActive()Returns if the application is focused on PC, returns true always on console
Gets the server address. (from client)
proto owned string GetHostName()Gets the server name. (from client)
proto GetServersResultRow GetHostData()Gets the server data. (from client)
proto native int Connect(UIScriptedMenu parent, string IpAddress, int port, string password)Connects to IsServer
IpAddress- of the server
port- of the server set to 0 for default port
password- of the server
Returns: 0 on success, error code from ErrorModuleHandler on not success
proto native int ConnectLastSession(UIScriptedMenu parent, int selectedCharacter = -1)Connects to last success network session
Returns: 0 on success, error code from ErrorModuleHandler on not success
proto native void DisconnectSession()Disconnects from current multiplayer session
proto native void DisconnectSessionForce()Forces disconnect from current multiplayer session even if not yet in the game
proto native void GetProfileStringList(string name, out TStringArray values)Gets array of strings from profile variable
name- of the variable
values- output values
usage:
TStringArray lastInventoryArray = new TStringArray;
g_Game.GetProfileStringList("lastInventory", lastInventoryArray);Gets string from profile variable
name- of the variable
value- output value
Returns: true when successful
proto native void SetProfileStringList(string name, TStringArray values)Sets array of strings to profile variable
name- of the variable
values- to set
Sets string to profile variable
name- of the variable
value- to set
proto native void SaveProfile()Saves profile on disk.
proto void GetPlayerName(out string name)Gets current player name
name- output value
Gets current player name. If length of player name is grater than maxLength, then it is omitted and append ellipsis
maxLength- - max chars in name
name- - output value of player name with 'maxLength' characters and then ellipsis "..."
proto native void SetPlayerName(string name)Sets current player name
name
proto native Entity CreatePlayer(PlayerIdentity identity, string name, vector pos, float radius, string spec)Assign player entity to client (in multiplayer)
name
proto native void SelectPlayer(PlayerIdentity identity, Object player)Selects player's controlled object
identity- identity used in MP (use NULL in singleplayer)
player- object which should be controlled by player
proto void GetPlayerNetworkIDByIdentityID(int playerIdentityID, out int networkIdLowBits, out int networkIdHightBits)returns player's network id from identity id in out parameters
identity- PlayerIdentity.id used in MP (use NULL in singleplayer)
networkIdLowBits- lower bits of 64bit network id
networkIdHighBits- higher bits of 64bit network id
Returns entity identified by network id
networkIdLowBits- identity used in MP (use NULL in singleplayer)
networkIdHighBits- object which should be controlled by player
Static objects cannot be replicated by default (there are too many objects on the map). Use this method when you want to replicate some scripted variables. Cannot be called in object's constructor, because networking is not initialized yet
object- static object to replicate
Returns: false, if registration wasn't successful or when object is already registered
proto native bool IsNetworkInputBufferFull()Returns the state of the buffer for network inputs (UAInterface)
Returns: true, if the buffer is filled and client simulation must stop
proto native void SelectSpectator(PlayerIdentity identity, string spectatorObjType, vector position)Creates spectator object (mostly cameras)
identity- identity used in MP (use NULL in singleplayer)
spectatorObjType- classname for spectator object (like cameras)
position- where to create spectator instance
proto native void UpdateSpectatorPosition(vector position)Updates spectator position on server = position of network bubble
position
Inform client about logout time (creates logout screen on specified client)
player- object which is logging out
time- length of logout
proto native void DisconnectPlayer(PlayerIdentity identity, string uid = "")Destroy player info and disconnect
proto native void AddToReconnectCache(PlayerIdentity identity)Add player to reconnect cache to be able to rejoin character still existing in the world
identity- of player
proto native void RemoveFromReconnectCache(string uid)Remove player from reconnect cache
uid- of the player
proto native void ClearReconnectCache()Remove all player from reconnect cache
proto native void StorageVersion(int iVersion)Set actual storage version - for next save
proto native int LoadVersion()Returns actual storage version - loading
proto native int SaveVersion()Returns actual storage version - saving
Show 1 more
, PlayerStats.SaveStats()proto native float GetDayTime()Returns current daytime on server
Get string value from config on path.
path- of value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
value- output
Returns: true on success
Get raw string value from config on path.
path- of value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
value- output in raw format (localization keys '$STR_' are not translated)
Returns: true on success
Get string value from config on path.
path- of value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
Returns: value output string
Changes localization key format to script-friendly format.
original- config string.
Returns: value output string with '$' substituted to script-friendly '#'. If not found, does nothing.
Get name of the p3d file of the given class name.
class- name of the desired object
Returns: Name of the object's p3d file (without the '.p3d' suffix)
Get float value from config on path.
path- of value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
Returns: value
Get vector value from config on path.
path- of value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
Returns: value
Show 1 more
, WeaponParticlesBase.WeaponParticlesBase()Get int value from config on path.
path- of value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
Returns: value
Returns type of config value
path- of value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
Returns: one of constants CT_INT, CT_FLOAT, CT_STRING, CT_ARRAY, CT_CLASS, CT_OTHER
proto native void ConfigGetTextArray(string path, out TStringArray values)Get array of strings from config on path.
path- of value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
value- output
usage :
TStringArray characterAnimations = new TStringArray;
g_Game.ConfigGetTextArray("CfgMovesMaleSdr2 States menu_idleUnarmed0 variantsPlayer", characterAnimations);Show 40 more
, Attachments.GetItemSlots(), AttachmentsOutOfReach.CreateAttachmentPosition(), BaseBuildingBase.GetAttachmentSlots(), BetaSound.SaySound(), BillboardSet.LoadConfig(), Construction.DropNonUsableMaterialsServer(), Construction.GetCollisionBoxData(), Construction.GetRequiredParts(), Construction.HasConflictPart(), Construction.HasRequiredPart(), ConstructionActionData.GetAttachmentsFromSelection(), ConstructionActionData.GetAttachmentSlotFromSelection(), DamageSystem.GetComponentNamesFromDamageZone(), DamageSystem.GetDamageZoneMap(), DayZGame.CheckAmmoCompability(), DayZPlayerImplement.HandleView(), DefaultCharacterCreationMethods.GetConfigArrayCountFromSlotID(), DefaultCharacterCreationMethods.GetConfigAttachmentTypes(), FireplaceBase.LockOvenAttachments(), HiddenSelectionsData.GetHiddenSelectionsConfig(), HiddenSelectionsData.GetHiddenSelectionsMaterialsConfig(), HiddenSelectionsData.GetHiddenSelectionsTexturesConfig(), HiddenSelectionsData.HiddenSelectionsData(), IntroSceneCharacter.LoadCharacterData(), Inventory.LoadPlayerAttachmentIndexes(), InventoryItemSoundAttach.LoadSoundEvents(), InventoryItemSoundDetach.LoadSoundEvents(), InventoryItemType.SetAttachSoundEvent(), InventoryItemType.SetDetachSoundEvent(), ItemBase.KindOf(), PlayerContainer.PlayerContainer(), PlayerContainer.SetPlayer(), PluginConfigViewer.GetConfigRecursive(), PluginDiagMenu.OnInit(), PluginLifespan.LoadFromCfg(), SceneEditorMenu.GetItemNamesForSlots(), SceneObject.GetConfigAttachments(), SelectionTranslation.SearchAndTranslate(), SoundLookupTable.LoadTable(), and ZombieContainer.InitGhostSlots()proto native void ConfigGetTextArrayRaw(string path, out TStringArray values)Get array of raw strings from config on path.
path- of value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
value- output in raw format (localization keys '$STR_' are not translated)
usage :
TStringArray characterAnimations = new TStringArray;
g_Game.ConfigGetTextArrayRaw("CfgMovesMaleSdr2 States menu_idleUnarmed0 variantsPlayer", characterAnimations);proto native void ConfigGetFloatArray(string path, out TFloatArray values)Get array of floats from config on path.
path- of value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
value- output
Show 10 more
, DayZIntroScene.DayZIntroScene(), FoodStage.GetNutritionPropertyFromIndex(), FoodStage.SetupFoodStageMapping(), ItemOptics.InitOpticsDOFProperties(), ItemOptics.InitOpticsPP(), Magazine.InitReliability(), MiscGameplayFunctions.GetHealthLevelForAmmo(), Weapon_Base.InitDOFProperties(), Weapon_Base.InitReliability(), and WeaponParticlesBase.WeaponParticlesBase()Get array of integers from config on path.
path- of value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
value- output
Get name of subclass in config class on path.
path- of value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
index- of subclass in class
name- output
Returns: true on success, false if path or child is not found
Get name of base class of config class on path.
path- of value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
name- output
Returns: true on success, false if path or base is not exists
Get count of subclasses in config class on path.
path- of value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
index- of parameter in class
name- output
Returns: true on success, false if path or child is not found
proto native void ConfigGetFullPath(string path, out TStringArray full_path)proto native void ConfigGetObjectFullPath(Object obj, out TStringArray full_path)proto native bool GetModToBeReported()string ConfigPathToString(TStringArray array_path)Converts array of strings into single string.
Array- of strings like {"All", "AllVehicles", "Land"}
Returns: Converts given array into something lile "All AllVehicles Land".
???Get command line parameter value.
name- of parameter
value- output
Returns: true when parameter exists, false otherwise
usage :
// you run e.g.: DayZInt.exe -scriptDebug=true
string value;
if (g_Game.CommandlineGetParam("scriptDebug", value) && value == "true")
{
Print("Script debugging on!");
}proto native void CopyToClipboard(string text)proto void CopyFromClipboard(out string text)proto native void BeginOptionsVideo()proto native void EndOptionsVideo()proto native void AdminLog(string text)Preload objects with certain type in certain distance from camera.
type- of objects which should be preloaded
distance- from camera in which objects should be preloaded
Returns: true on success
proto native Object CreateStaticObjectUsingP3D(string p3dFilename, vector position, vector orientation, float scale = 1.0, bool createLocal = false)proto native Object CreateObject(string type, vector pos, bool create_local = false, bool init_ai = false, bool create_physics = true)Creates object of certain type
type- of objects to create
pos- position where to create object
create_local- if True, object is not spawned on clients only on server
init_ai- if creating object is LightAI class, by this param is initialised AI or not
Returns: new Object
Show 15 more
, CameraToolsMenu.CameraToolsMenu(), Construction.CreateCollisionTrigger(), CTObjectFollower.CreateFollowedObject(), DayZGame.FirearmEffects(), DayZIntroScene.DayZIntroScene(), DayZIntroSceneXbox.CameraCreate(), DayZIntroSceneXbox.DayZIntroSceneXbox(), EasterEgg.Release(), Grenade_ChemGas.OnExplode(), PluginCharPlacement.Init(), PluginDayZCreatureAIDebug.GUIAction_CreateShadow(), PluginDayzPlayerDebug.PlayerSyncCreate(), PluginDoorRuler.Init(), ScriptedLightBase.CreateLight(), and Wreck_SantasSleigh.SpawnRandomDeers()proto native SoundOnVehicle CreateSoundOnObject(Object source, string sound_name, float distance, bool looped, bool create_local = false)Show 2 more
, Object.PlaySound(), and Object.PlaySoundLoop()proto native SoundWaveOnVehicle CreateSoundWaveOnObject(Object source, SoundObject soundObject, AbstractWave soundWave)Creates object of certain type
type- of objects to create
pos- position where to create object
iFlags- are used to setup object and/ or spawn behavior
iRotation- are used to setup object rotation on spawn (or default if not specified)
Returns: new Object
proto native void ObjectDelete(Object obj)Show 46 more
, ActionDigOutStash.OnFinishProgressServer(), AreaDamageManager.DestroyDamageTriggerEx(), BarbedWire.SoundBuzzLoopStop(), BarrelHoles_ColorBase.DestroyClutterCutter(), BaseBuildingBase.DestroyConstruction(), BaseBuildingBase.DestroyConstructionKit(), CombinationLock.DestroyLock(), Construction.DestroyCollisionTrigger(), Construction.DestroyMaterialsServer(), Construction.TakeMaterialsServer(), CTActor.SetHandsItem(), CTObjectFollower.DestroyFollowedObject(), DayZIntroScene.DayZIntroScene(), DayZIntroSceneXbox.~DayZIntroSceneXbox(), DayZPlayerInventory.ValidateDestroy(), EffectArea.EEDelete(), Fireplace.DestroyClutterCutter(), FlammableBase.EEDelete(), FlammableBase.OnWorkStop(), FlammableBase.TryTransformIntoStick(), GameInventory.LocalDestroyEntity(), GardenBase.CreatePlant(), GardenPlot.EEDelete(), GardenPlot.OnPlacementComplete(), HandActionDestroy.Action(), Hologram.~Hologram(), IntroSceneCharacter.CharacterUnload(), IntroSceneCharacter.SetAttachment(), ItemBase.ClearInventory(), MenuDefaultCharacterData.EquipDefaultCharacter(), ParticleTest.EEDelete(), PlantBase.OnStoreSave(), PlayerBase.ClearInventory(), PluginDayzPlayerDebug.PlayerSyncDelete(), PMTPlayback.CheckOnePlayingSA(), PMTPlayback.CheckStop(), PortableGasStove.DestroyFireplace(), Refridgerator.OnWorkStop(), SceneObject.~SceneObject(), SceneObject.RemoveAttachment(), ScriptedLightBase.DeleteLightNow(), SeedPackBase.EmptySeedPack(), Slot.~Slot(), TentBase.DestroyClutterCutter(), TrapBase.EEDelete(), and UIPropertyAttachment.OnClick()proto native void ObjectDeleteOnClient(Object obj)proto native void RemoteObjectDelete(Object obj)RemoteObjectDelete - deletes only remote object (unregisters from network). do not use if not sure what you do
proto native void RemoteObjectTreeDelete(Object obj)RemoteObjectDelete - deletes only remote object tree (unregisters from network). do not use if not sure what you do
proto native void RemoteObjectCreate(Object obj)RemoteObjectCreate - postponed registration of network object (and creation of remote object). do not use if not sure what you do
proto native void RemoteObjectTreeCreate(Object obj)RemoteObjectTreeCreate - postponed registration of network object tree (and creation of remote objects). do not use if not sure what you do
Show 5 more
, MoveEquipToExistingItemAndDestroyOldRootLambda.UndoRemoveNetworkObjectInfo(), PlayerBase.CreateCopyOfItemInInventory(), ReplaceItemWithNewLambdaBase.CreateNetworkObjectInfo(), ReplaceItemWithNewLambdaBase.UndoRemoveNetworkObjectInfo(), and TakeFireplaceFromBarrelLambda.CreateNetworkObjectInfo()returns true if player can access item's cargo/attachments (check only distance)
proto native void ReloadShape(Object obj)DIAG_DEVELOPERproto native Input GetInput()proto native vector GetCurrentCameraPosition()Show 21 more
, DeveloperTeleport.TeleportAtCursorEx(), DynamicMusicPlayer.DisplayStaticLocations(), EffBulletImpactBase.Event_OnStarted(), Hit_MeatBones.OnEnterCalculations(), Hologram.GetProjectionEntityPosition(), Hologram.IsClippingRoof(), IngameHud.RefreshPlayerTags(), PersonalLight.OnFrameLightSource(), PlayerBase.GetAimPosition(), PluginDayZCreatureAIDebug.Event_OnClick(), PluginDeveloper.GetCameraDirections(), PluginDiagMenuClient.GetPlayer(), PluginRemotePlayerDebugClient.UpdateDistanceWidget(), PluginTargetTemperature.GetTargetEntity(), Rangefinder.DoMeasurement(), SceneEditorMenu.OnClick(), ScriptConsoleItemsTab.OnClick(), ScriptConsoleItemsTab.OnDoubleClick(), ScriptConsoleVicinityTab.RenderList(), ScriptedLightBase.TryShadowOptimization(), and WeaponDebug.OnPostFrameUpdate()proto native vector GetCurrentCameraDirection()Show 25 more
, DayZPlayerImplementMeleeCombat.HitZoneSelection(), DayZPlayerImplementMeleeCombat.HitZoneSelectionRaycast(), DeveloperTeleport.TeleportAtCursor(), DeveloperTeleport.TeleportAtCursorEx(), Fence.IsFacingCamera(), HitDirectionEffectBase.CalculateArrowPosition(), Hologram.GetDefaultOrientation(), Hologram.GetProjectionEntityPosition(), Hologram.HideWhenClose(), IngameHud.RefreshPlayerTags(), PlayerBase.CommandHandler(), PlayerBase.GetAimPosition(), PluginDeveloper.GetCameraDirections(), PluginDiagMenuClient.GetPlayer(), PluginTargetTemperature.GetTargetEntity(), Rangefinder.DoMeasurement(), SceneEditorMenu.OnClick(), ScriptConsoleItemsTab.OnClick(), ScriptConsoleItemsTab.OnDoubleClick(), ScriptConsoleSoundsTab.UpdateMousePos(), ShelterSite.IsFacingCamera(), TerritoryFlag.IsFacingCamera(), Watchtower.IsFacingCamera(), Weapon_Base.LiftWeaponCheckEx(), and WeaponDebug.OnPostFrameUpdate()proto native AbstractSoundScene GetSoundScene()Show 16 more
, DayZPlayerImplement.PlaySound(), DayZPlayerImplement.SimulateDeath(), DynamicMusicPlayer.PlayTrack(), EffectSound.SoundPlayEx(), InventoryItem.PlaySound(), MainMenuVideo.OnHide(), MainMenuVideo.OnShow(), MissionGameplay.OnPlayerRespawned(), MissionMainMenu.PlayMusic(), OptionsMenuSounds.UpdateAudioLevel(), PlayerBase.OnUnconsciousStart(), PlayerBase.OnUnconsciousStop(), PlayerBase.SaySoundSet(), PluginSoundDebug.OnGUITimer(), SoundObjectBuilder.BuildSoundObject(), and VONManager.IsVoiceThresholdMinimum()proto native NoiseSystem GetNoiseSystem()Show 17 more
, ActionOpenFence.OnEndServer(), AlarmClock_ColorBase.Init(), CarScript.EEInit(), DayZCreatureAI.ProcessSoundEvent(), DayZCreatureAI.ProcessSoundVoiceEvent(), DayZGame.CloseCombatEffects(), DayZGame.ExplosionEffectsEx(), DayZGame.FirearmEffects(), DayZPlayerImplement.AddNoise(), DayZPlayerImplement.ProcessSoundEvent(), FireplaceBase.Heating(), KitchenTimer.Init(), MiscGameplayFunctions.GenerateAINoiseAtPosition(), SmokeGrenadeBase.OnWork(), SmokeGrenadeBase.OnWorkStart(), TrapSpawnBase.PlayCatchNoise(), and ZombieBase.ProcessSoundVoiceEvent()proto native bool AddInventoryJuncture(Man player, notnull EntityAI item, InventoryLocation dst, bool test_dst_occupancy, int timeout_ms, Managed userData = null)bool AddInventoryJunctureEx(Man player, notnull EntityAI item, InventoryLocation dst, bool test_dst_occupancy, int timeout_ms, Managed userData = null)Show 9 more
, ActionBase.AddActionJuncture(), ActionGetInTransport.AddActionJuncture(), ActionSwitchSeats.AddActionJuncture(), DayZPlayerInventory.SendServerHandEventViaJuncture(), DayZPlayerInventory.TakeToDst(), FirearmActionBase.AddActionJuncture(), FirearmActionDetachMagazine.OnStartServer(), Weapon_Base.AddJunctureToAttachedMagazine(), and WeaponManager.OnInputUserDataProcess()proto native bool HasInventoryJunctureDestination(Man player, notnull InventoryLocation dst)Show 2 more
, LogManager.IsInventoryReservationLogEnable(), and Class.ToString()Show 14 more
, HandAnimatedForceSwapping.OnAbort(), HandAnimatedForceSwapping.OnExit(), HandAnimatedForceSwapping_Inst.OnAbort(), HandAnimatedForceSwapping_Inst.OnExit(), HandAnimatedMoveToDst_W4T.OnEntry(), HandAnimatedMoveToDst_W4T_Basic.OnEntry(), HandAnimatedMovingToAtt.OnAbort(), HandAnimatedSwapping.OnAbort(), HandAnimatedTakingFromAtt.OnAbort(), HandForceSwappingAnimated_Show.OnEntry(), HandTakingAnimated_Show.OnEntry(), Weapon_Base.ClearJunctureToAttachedMagazine(), WeaponManager.OnInputUserDataProcess(), and WeaponManager.OnWeaponActionEnd()Delevoper only: Executes Enforce Script expression, if there is an error, is printed into the script console
proto native void DumpInstances(bool csvFormatting)Delevoper only: Dump all script allocations
proto native bool ScriptTest()proto native void GetDiagModeNames(out TStringArray diag_names)Get list of all debug modes
Set specific debug mode
Gets state of specific debug mode
proto native void GetDiagDrawModeNames(out TStringArray diag_names)Get list of all debug draw modes
proto native void SetDiagDrawMode(int diag_draw_mode)Set debug draw mode
proto native int GetDiagDrawMode()Gets current debug draw mode
proto native bool IsPhysicsExtrapolationEnabled()If physics extrapolation is enabled, always true on retail release builds
proto native int GizmoGetCount()Return the number of gizmos
Returned index is invalid if any other Gizmo function is called
proto native void GizmoClear(int index)Clear the gizmo
proto native void GizmoClearAll()Clear all gizmos
proto native void GizmoSelectObject(Object object)Applies impulses to set the position when dynamic, otherwise sets the transform in the physics scene
Tracker for 'GizmoFind' is the passed in object
proto native void GizmoSelectPhysics(Physics physics)proto native void GizmoSelectUser(Managed instance)Scripted controls, requires the following methods to be implemented in the class void Gizmo_SetWorldTransform(vector[4] transform, bool finalize) void Gizmo_GetWorldTransform(vector[4] transform)
Tracker for 'GizmoFind' is the passed in instance
proto native float GetFps()Returns average FPS of last 16 frames
Returns: fps in milliseconds
proto native float GetLastFPS()Returns current framerate.
Returns: Current framerate as frames per second.
Returns average framerate over last n frames.
nFrames- The number of frames to compute average of, up to 64.
Returns: Average frames per second over last n frames.
Returns minimum framerate over last n frames.
nFrames- The number of frames to find minimum of, up to 64.
Returns: Minimum frames per second over last 64 frames.
Returns maximum framerate over last n frames.
nFrames- The number of frames to find maximum of, up to 64.
Returns: Maximum frames per second over last n frames.
Outputs framerate statistics.
min- Outputs minimum framerate over last n frames in frames per second.
max- Outputs maximum framerate over last n frames in frames per second.
avg- Outputs average framerate over last n frames in frames per second.
nFrames- The number of frames to take into account, up to 64.
proto native float GetTickTime()Returns current time from start of the game
Returns: time in seconds
Show 21 more
, BleedingSourcesManagerRemote.AddBleedingSource(), BleedingSourcesManagerRemote.DisplayDebug(), EnProfilerTests.Sleep(), EnProfilerTests.StringConcat(), EnProfilerTests.StringFormat(), EntityAI.EEInventoryOut(), EntityAI.OnCEUpdate(), EPTHelperClass.DoEverything(), EPTHelperClass.Sleep2(), EPTHelperClass.SleepAgain(), InventoryItem.ProcessImpactSoundEx(), LoadingScreen.Inc(), LoadingScreen.SetProgress(), TemperatureAccessComponent.CheckAccessTimeout(), TemperatureAccessComponent.TryAccessSource(), TrapSpawnBase.ResetActiveProgress(), Trigger.AddInsider(), Trigger.UpdateInsiders(), UniversalTemperatureSourceLambdaBase.OnAfterExecute(), UniversalTemperatureSourceLambdaBase.OnBeforeExecute(), and Weapon_Base.SetSyncStable()proto void GetInventoryItemSize(InventoryItem item, out int width, out int height)Show 11 more
, CargoContainer.InitIconEx(), ClosableHeader.OnDragHeader(), ClosableHeader.UpdateFlip(), Icon.CreateWhiteBackground(), Icon.RevertToOriginalFlip(), Icon.SetItemSizeEx(), Icon.UpdateFlip(), Inventory.UpdateInterval(), SlotsIcon.OnIconDrag(), SlotsIcon.SetItemSize(), and TrapBase.SnapOnObject()proto native void GetObjectsAtPosition(vector pos, float radius, out array<Object> objects, out array<CargoBase> proxyCargos)Returns list of all objects in circle "radius" around position "pos"
posradiusobjects- output array
proto native void GetObjectsAtPosition3D(vector pos, float radius, out array<Object> objects, out array<CargoBase> proxyCargos)Returns list of all objects in sphere "radius" around position "pos"
posradiusobjects- output array
proto native World GetWorld()proto void GetWorldName(out string world_name)Show 11 more
, GetWorldName(), DayZIntroScene.DayZIntroScene(), EffectAreaLoader.CreateZones(), ItemMap.InitMapState(), MapMenu.Init(), MapNavigationBehaviour.OrderedPositionNumbersFromGridCoords(), MissionBase.InitialiseWorldData(), PluginConfigDebugProfile.CustomLocationsAdd(), PluginConfigDebugProfile.CustomLocationsRemove(), PluginConfigDebugProfile.GetLocationsData(), and UndergroundAreaLoader.GetData()string GetWorldName()Show 11 more
, GetWorldName(), DayZIntroScene.DayZIntroScene(), EffectAreaLoader.CreateZones(), ItemMap.InitMapState(), MapMenu.Init(), MapNavigationBehaviour.OrderedPositionNumbersFromGridCoords(), MissionBase.InitialiseWorldData(), PluginConfigDebugProfile.CustomLocationsAdd(), PluginConfigDebugProfile.CustomLocationsRemove(), PluginConfigDebugProfile.GetLocationsData(), and UndergroundAreaLoader.GetData()proto void GetVersion(out string version)Show 14 more
, HudDebugWinVersion.HudDebugWinVersion(), InGameMenu.SetGameVersion(), InGameMenuXbox.Init(), InGameMenuXbox.Refresh(), KeybindingsMenu.Init(), KeybindingsMenu.Refresh(), MainMenu.Init(), MainMenu.Refresh(), MainMenuConsole.Refresh(), OptionsMenu.Init(), OptionsMenu.Refresh(), ServerBrowserMenuNew.Init(), ServerBrowserMenuNew.Refresh(), and Watermark.Watermark()proto native UIManager GetUIManager()proto native DayZPlayer GetPlayer()DayZPlayer GetPlayerByIndex(int index = 0)proto native void StoreLoginData(ParamsWriteContext ctx)Stores login userdata as parameters which are sent to server
proto native vector GetPointerDirection()Returns the direction where the mouse points, from the camera view
Transforms position in world to position in screen in pixels as x, y component of vector, z parameter represents distance between camera and world_pos
Transforms position in world to position in screen in pixels as x, y component of vector, z parameter represents distance between camera and world_pos
Transforms position in world to position in screen in percentage (0.0 - 1.0) as x, y component of vector, z parameter represents distance between camera and world_pos
Show 1 more
, IngameHud.ShowPlayerTag()proto native MenuData GetMenuData()Return singleton of MenuData class - at main menu contains characters played with current profile.
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 server, RPC is executed on all clients
target- object on which remote procedure is called, when NULL, RPC is evaluated by CGame as global
rpc_type- user defined identification of RPC
params- custom params array
recipient- specified client to send RPC to. If NULL, RPC will be send to all clients (specifying recipient increase security and decrease network traffic)
const int RPC_LOW_BLOOD_PRESSURE_EFFECT = 0;
...
// on server side, after blood pressure of player is low...
Param1<float> p = new Param1<float>(m_blood_pressure);
array<param> params = new array<param>;
params.Insert(p);
g_Game.RPC(player, RPC_LOW_BLOOD_PRESSURE_EFFECT, params);
// or shortcut
g_Game.RPCSingleParam(player, RPC_LOW_BLOOD_PRESSURE_EFFECT, p);
...
// on client
class PlayerBase
{
// override OnRPC function
void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
{
// dont forget to propagate this call trough class hierarchy!
super.OnRPC(rpc_type, ctx);
switch(rpc_type)
{
case RPC_LOW_BLOOD_PRESSURE_EFFECT:
Param1<float> p = Param1<float>(0);
if (ctx.Read(p))
{
float blood_pressure = p.param1;
float effect_intensity = 1.0 - blood_pressure;
ShowFancyScreenEffect(effect_intensity);
}
break;
}
}
}Show 10 more
, Object.RPC(), PlayerBase.OnSelectPlayer(), PluginDeveloperSync.SendRPCAgents(), PluginDeveloperSync.SendRPCHealth(), PluginDeveloperSync.SendRPCLevels(), PluginDeveloperSync.SendRPCMods(), PluginDeveloperSync.SendRPCStats(), PluginDeveloperSync.SendRPCStomach(), PluginItemDiagnostic.SendRPC(), and SymptomManager.SendServerDebugToClient()proto native void RPCSingleParam(Object target, int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient = null)see CGame.RPC
Not actually an RPC, as it will send it only to yourself
proto native void ProfilerStart(string name)Use for profiling code from start to stop, they must match have same name, look wiki pages for more info: https://confluence.bistudio.com/display/EN/Profiler
proto native void ProfilerStop(string name)Use for profiling code from start to stop, they must match have same name, look wiki pages for more info: https://confluence.bistudio.com/display/EN/Profiler
Prints text into game chat.
text- to print
colorClass- ??
usage :
g_Game.Chat("Item splitted", "colorAction");proto native void ChatPlayer(string text)Mutes voice of source player to target player
muteUID- uid of player you want to mute
playerUID- uid of player that (doesnt't) want to hear muteUID
Mute all players for listenerId
listenerId- uid of player
mute- true, if player can not listen anybody. Otherwise false.
Enable/disable VoN for target player
player- in question
enable- sets if player can use VoN
Enable/disable VoN effect (only on server)
player- in question
voice- effect (VoiceEffectMumbling = 1, VoiceEffectExtortion = 2, VoiceEffectObstruction = 4)
enable- or disable effect
proto native void SetVoiceLevel(int level)Set voice level of VoN (only on client) (VoiceLevelWhisper = 0, VoiceLevelNormal = 1, VoiceLevelShout = 2)
level- of voice
Get voice level of VoN (on both client and server) (VoiceLevelWhisper = 0, VoiceLevelNormal = 1, VoiceLevelShout = 2)
proto native void EnableMicCapture(bool enable)Enable microphone to locally capture audio from user. Audio heard does NOT automatically get transmitted over network
enable- enables or disabled listening
proto native bool IsMicCapturing()Returns whether mic is currently capturing audio from user
proto native bool IsInPartyChat()Returns whether user is currently in a voice party (currently only supported on xbox)
proto native Mission GetMission()proto native void SetMission(Mission mission)proto native void StartRandomCutscene(string world)Starts intro
proto native void PlayMission(string path)Starts mission (equivalent for SQF playMission). You MUST use double slash \\
Show 2 more
, MissionLoader.OnClick(), and MissionLoader.OnDoubleClick()proto protected native void CreateMission(string path)Create only enforce script mission, used for mission script reloading
proto native void RestartMission()proto native void AbortMission()Returns to main menu, leave world empty for using last mission world
proto native void RespawnPlayer()proto native bool CanRespawnPlayer()proto native void SetLoginTimerFinished()proto native void SetMainMenuWorld(string world)proto native owned string GetMainMenuWorld()proto native void LogoutRequestTime()Logout methods
proto native void LogoutRequestCancel()proto native bool IsMultiplayer()proto native bool IsClient()proto native bool IsServer()proto native bool IsDedicatedServer()Robust check which is preferred than the above, as it is valid much sooner
Server config parsing. Returns 0 if not found.
proto native bool IsDebug()static bool IsDigitalCopy()void SetDebugMonitorEnabled(int value)bool IsDebugMonitor()proto native void GetPlayerIndentities(out array<PlayerIdentity> identities)proto native bool GetSurface(SurfaceDetectionParameters params, SurfaceDetectionResult result)API for surface detection
Show 19 more
, CfgPlayerRestrictedAreaHandler.DrawPolygonLinesDebug(), DayZIntroScene.DayZIntroScene(), DayZIntroScene.SnapToGround(), DayZIntroSceneXbox.DayZIntroSceneXbox(), DayZIntroSceneXbox.SnapToGround(), EffectArea.SpawnParticles(), FlareSimulation.FlareParticleUpdate(), Hit_MeatBones.BloodSplatGround(), MiscGameplayFunctions.TeleportCheck(), PlayerRestrictedAreaInstance.TranslateSafePositions(), PluginCharPlacement.CalculatePos(), ScriptConsoleGeneralTab.OnDoubleClick(), ScriptConsoleGeneralTab.OnMouseButtonDown(), ScriptConsoleGeneralTab.ProcessTeleportText(), ScriptConsoleGeneralTab.Teleport(), ScriptConsoleGeneralTab.UpdateMousePos(), ScriptConsoleSoundsTab.OnMouseButtonDown(), ScriptConsoleSoundsTab.UpdateMousePos(), and VolcanicTrigger.SpawnVaporEffect()proto native float SurfaceRoadY(float x, float z, RoadSurfaceDetection rsd = RoadSurfaceDetection.LEGACY)proto native float SurfaceRoadY3D(float x, float y, float z, RoadSurfaceDetection rsd)Returns: Y position the surface was found
Show 1 more
, HescoBox.CanBeFilledAtPosition()Y input: Maximum Y to trace down from; Returns: Y position the surface was found
proto void SurfaceUnderObjectEx(notnull Object object, out string type, out string impact, out int liquidType)proto void SurfaceUnderObjectByBone(notnull Object object, int boneType, out string type, out int liquidType)proto native float SurfaceGetSeaLevelMin()proto native float SurfaceGetSeaLevelMax()proto native float SurfaceGetSeaLevel()proto native float SurfaceGetSeaWaveMax()Get max sea wave height
proto native float SurfaceGetSeaWaveCurrent()Get current sea wave height
Get the nearest water or object surface under a point, ignoring land (without the fake wave that's on top of the real wave)
Get the nearest water or object surface under a point, ignoring land (with the fake wave that's on top of the real wave)
Returns the largest height difference between the given positions
Returns tilt of the ground on the given position in degrees, so you can use this value to rotate any item according to terrain.
Checks if the surface is digable
Checks if the surface is fertile
void UpdatePathgraphRegionByObject(Object object)Show 1 more
, Vector()proto native bool IsBoxColliding(vector center, vector orientation, vector edgeLength, array<Object> excludeObjects, array<Object> collidedObjects = NULL)Finds all objects that are in choosen oriented bounding box (OBB)
centervector,center of OBBorientationvector,direction (front vector), used for calculation of OBB rotationedgeLengthvector,sizes of whole boxexcludeObjectsarray<Object>,objects that should be excluded from collision checkcollidedObjectsarray<Object>,out parameter, objects that collided with OBB
Returns: bool, true if at least one object collided with OBB, false otherwise
vector pos = GetPosition();
vector orientation = GetOrientation();
vector size = "10 4 8";
array<Object> excluded_objects = new array<Object>;
excluded_objects.Insert(this);
array<Object> nearby_objects = new array<Object>;
if(g_Game.IsBoxColliding( pos, orientation, size, excluded_objects, nearby_objects))
{
for (int i = 0, c = nearby_objects.Count(); i < c; ++i)
{
PrintString("object " + i.ToString());
}
}proto native bool IsBoxCollidingGeometry(vector center, vector orientation, vector edgeLength, int iPrimaryType, int iSecondaryType, array<Object> excludeObjects, array<Object> collidedObjects = NULL)Finds all objects with geometry iType that are in choosen oriented bounding box (OBB)
centervector,center of OBBorientationvector,direction (front vector), used for calculation of OBB rotationedgeLengthvector,sizes of whole boxiPrimaryTypeint,type of intersection, possible values ObjIntersectFire(0), ObjIntersectView(1), ObjIntersectGeom(2), ObjIntersectIFire(3), ObjIntersectNone(4)iSecondaryTypeint,type of intersection, possible values ObjIntersectFire(0), ObjIntersectView(1), ObjIntersectGeom(2), ObjIntersectIFire(3), ObjIntersectNone(4)excludeObjectsarray<Object>,objects that should be excluded from collision checkcollidedObjectsarray<Object>,out parameter, objects that collided with OBB
Returns: bool, true if at least one object collided with OBB, false otherwise
vector pos = GetPosition();
vector orientation = GetOrientation();
vector size = "10 4 8";
array<Object> excluded_objects = new array<Object>;
excluded_objects.Insert(this);
array<Object> nearby_objects = new array<Object>;
if(g_Game.IsBoxCollidingGeometry( pos, orientation, size, ObjIntersectView, ObjIntersectGeom, excluded_objects, nearby_objects))
{
for (int i = 0, c = nearby_objects.Count(); i < c; ++i)
{
PrintString("object " + i.ToString());
}
}proto native bool IsBoxCollidingGeometryProxy(notnull BoxCollidingParams params, array<Object> excludeObjects, array<ref BoxCollidingResult> collidedObjects = NULL)proto native Weather GetWeather()Returns weather controller object.
proto native void SetEVUser(float value)Sets custom camera camera EV. range: -50.0..50.0? //TODO
proto native void OverrideDOF(bool enable, float focusDistance, float focusLength, float focusLengthNear, float blur, float focusDepthOffset)Show 1 more
, ScriptConsoleCameraTab.SetDOF()proto native void ResetPPMask()proto native void OverrideInventoryLights(vector diffuse, vector ambient, vector ground, vector dir)override inventory light
diffuse- directional light
ambient- ambient light
ground- ground light
dir- direction of light, Vector(0,0,1) is from camera
set night vission parameters (set to zero when to disable it)
lightIntensityMul- multiplicator of lights intensity
noiseIntensity- intensity of noise PP
proto native void OpenURL(string url)proto native void InitDamageEffects(Object effect)Initialization of damage effects
This function returns valid data only inside AfterLoad event. Do not use this in anywhere else.
Its main purpose is only for keep track on object connections after server restarts, all data related to this function are deleted when server initialization is done.
Returns is class name inherited from parent class name
cfg_class_nameConfigClass name ("Animal_CervusElaphus")cfg_parent_nameParentConfig Class name ("DZ_LightAI")
Returns: bool is class name inherited from parent class name
bool is_kind = g_Game.IsKindOf( "Animal_CervusElaphus", "DZ_LightAI");
PrintString(ToString(is_kind));
>> 1Show 2 more
, string.ToLower(), and string.ToLower()Show 16 more
, Barrel_ColorBase.BleachClothes(), DayZGame.DayZGame(), IntroSceneCharacter.LoadCharacterData(), PlayerBase.FindCargoByBaseType(), PlayerBase.SpawnAI(), PlayerBase.SpawnEntityOnGroundPos(), PluginDeveloper.SpawnAI(), PluginDeveloper.SpawnEntityInPlayerInventory(), PluginDeveloper.SpawnEntityOnGroundPos(), PluginLifespan.LoadFromCfg(), RecipeBase.CheckIngredientMatch(), RecipeBase.GetRecipeAnimationInfo(), RecipeBase.GetSoundCategory(), RecipeBase.InsertIngredientEx(), SceneObject.Init(), and ScriptConsoleItemsTab.SetPreviewObject()Returns is object inherited from parent class name
Returns: bool is object inherited from parent class name
bool is_kind = g_Game.IsKindOf( my_animal, "DZ_LightAI");
PrintString(ToString(is_kind));
>> 1Show 2 more
, string.ToLower(), and string.ToLower()Show 1 more
, Object.IsKindOf()Searches given config path (config_path) for the given member (searched_member) and returns its index. \nReturns -1 if not found.
usage:
int skinning_class_index = g_Game.ConfigFindClassIndex(cfgPath_animal, "Skinning");proto int GetTime()returns mission time in milliseconds
ScriptCallQueue GetCallQueue(int call_category)Returns CallQueue for certain category
call_category- call category, valid values are:
CALL_CATEGORY_SYSTEM - calls & timers in this queue are processed every time without any restrictions
CALL_CATEGORY_GUI - calls & timers in this queue are processed when GUI is enabled (even during pase game)
CALL_CATEGORY_GAMEPLAY - calls & timers in this queue are processed only during mission, when game is not paused
usage:
g_Game.GetCallQueue(CALL_CATEGORY_GUI).Call(this, "Refresh"); // calls "Refresh" function on "this" with no arguments
g_Game.GetCallQueue(CALL_CATEGORY_GUI).Call(this, "Show", new Param1<bool>(true)); // calls "Show" function on "this" with one bool argument
g_Game.GetCallQueue(CALL_CATEGORY_GUI).Call(this, "SetPos", new Param2<float, float>(0.2, 0.5)); // calls "SetPos" function on "this" with two float argumentsScriptInvoker GetUpdateQueue(int call_category)ScriptInvoker GetPostUpdateQueue(int call_category)TimerQueue GetTimerQueue(int call_category)Returns TimerQueue for certain category
call_category- call category, valid values are:
CALL_CATEGORY_SYSTEM - calls & timers in this queue are processed every time without any restrictions
CALL_CATEGORY_GUI - calls & timers in this queue are processed when GUI is enabled (even during pase game)
CALL_CATEGORY_GAMEPLAY - calls & timers in this queue are processed only during mission, when game is not paused
DragQueue GetDragQueue()Returns DragQueue. Callbacks are called on mouse move until mouse button is released, then the queue is cleaned.
string CreateDefaultPlayer()returns class name of first valid survivor (TODO address confusing naming?)
string CreateRandomPlayer()returns class name of random survivor (TODO address confusing naming?)
TStringArray ListAvailableCharacters()outputs array of all valid survivor class names
bool IsInventoryOpen()proto native BiosUserManager GetUserManager()Show 22 more
, DayZGame.DisconnectSessionEx(), DayZGame.GamepadCheck(), DayZGame.JoinLaunch(), DayZGame.MainMenuLaunch(), DayZGame.MissionLaunch(), DayZGame.OnEvent(), DayZGame.OnLoginTimeEvent(), DayZGame.PartyLaunch(), DayZGame.SelectGamepad(), DayZGame.SelectUser(), DayZIntroScene.GetSelectedUserName(), DayZIntroSceneXbox.UpdateSelectedUserName(), InGameMenuXbox.IsLocalPlayer(), Input.IsInactiveGamepadOrUserSelected(), Input.OnGamepadConnected(), IntroSceneCharacter.SetupPlayerName(), MainMenuConsole.ChangeAccount(), MainMenuConsole.Refresh(), OnlineServices.GetClientServices(), PlayerListEntryScriptedWidget.IsLocalPlayer(), ServerBrowserMenuNew.Refresh(), and TitleScreenMenu.Init()proto native ContentDLC GetContentDLCService()Return DLC service (service for entitlement keys for unlock content)
bool IsMissionMainMenu()Returns true when current mission is Main Menu
MenuDefaultCharacterData GetMenuDefaultCharacterData(bool fill_data = true)Show 1 more
, m_CharacterDataShow 17 more
, CharacterCreationMenu.ShoesChanged(), CharacterCreationMenu.TopChanged(), DayZGame.DeferredInit(), DayZGame.StoreLoginDataPrepare(), DayZIntroSceneXbox.SaveCharName(), InGameMenu.GameRespawn(), InGameMenuXbox.GameRetry(), IntroSceneCharacter.CreateDefaultCharacter(), IntroSceneCharacter.CreateNewCharacter(), IntroSceneCharacter.CreateNewCharacterByName(), IntroSceneCharacter.GetCharacterName(), IntroSceneCharacter.GetCharacterNameById(), IntroSceneCharacter.SaveCharName(), MenuData.GetMenuDefaultCharacterDataInstance(), MissionServer.OnClientNewEvent(), MissionServer.ProcessLoginData(), and PlayerBase.SetNewCharName()AnalyticsManagerServer GetAnalyticsServer()Show 3 more
, PlayerBase.EEHitBy(), PlayerBase.OnConnect(), and PlayerBase.OnDisconnect()AnalyticsManagerClient GetAnalyticsClient()proto native int GetLogoutAfterCancelTimeout()