class WorldSource
World › Managed
All members, including inherited
Constants 1
const int DM_GAME_WORLD_SIMUL_ACCELERATIONDIAG_DEVELOPERMethods 49
proto native void SetTimeMultiplier(float timeMultiplier)Sets the world time acceleration, overriding config. Mostly used for debug purposes.
timeMultiplier- 0-64 acceleration value, -1 to reset back
Get actual ingame world time
yearmonth- in range <1, 12>
day- in range <1, 31>
hour- in range <0, 23>
minute- in range <0, 59>
int year, month, day, hour, minute;
g_Game.GetWorld().GetDate(year, month, day, hour, minute);Show 13 more
, ClockBase.GetAlarmInMin(), ClockBase.SetAlarmInXMins(), EnochData.CalculateVolFog(), EnochData.WeatherOnBeforeChange(), PluginConfigScene.LoadSceneSettings(), SakhalData.WeatherOnBeforeChange(), ScriptConsoleGeneralTab.Init(), UIPopupScriptSceneManager.OnOpen(), UIPopupScriptSceneManager.ResetSliders(), UIPopupScriptSceneSettings.OnOpen(), UIPopupScriptSceneSettings.ResetSliders(), WorldData.GetDaytime(), and WorldData.UpdateBaseEnvTemperature()Sets actual ingame world time
yearmonth- in range <1, 12>
day- in range <1, 31>
hour- in range <0, 23>
minute- in range <0, 59>
int year = 2016;
int month = 5;
int day = 4;
int hour = 14;
int minute = 57;
g_Game.GetWorld().SetDate(year, month, day, hour, minute);Show 9 more
, SceneData.SetInitHour(), SceneData.SetInitMinute(), SceneData.SetInitMonth(), SceneData.SetInitYear(), ScriptConsoleGeneralTab.UpdateTime(), UIPopupScriptSceneManager.OnChange(), UIPopupScriptSceneManager.OnClick(), UIPopupScriptSceneSettings.OnChange(), and UIPopupScriptSceneSettings.OnClose()proto native float GetLatitude()proto native float GetLongitude()proto native float GetMoonIntensity()proto native float GetSunOrMoon()proto native bool IsNight()proto native float GetEyeAccom()proto native void SetEyeAccom(float eyeAccom)proto native void SetBuldozerWaterEnabled(bool enable)proto native void SetPreferredViewDistance(float distance)Sets preferred view distance, which persists between game sessions
distance
proto native void SetViewDistance(float distance)proto native void SetObjectViewDistance(float distance)Affects env sound controller value 'Shooting'
sound- position
relative- value (0..1) - how much should be value decreased
proto int GetWorldSize()Translates world coordinates to a grid coordinates(map grid)
possize- of grid in meters
x- grid position result [out]
z- grid position result [out]
int x,z;
g_Game.GetWorld().GetGridCoords(g_Game.GetPlayer().GetPosition(), 100, x, z);proto native void LoadNewLightingCfg(string path)load light config
load user light config (just first item is used)
proto native void SetUserLightingLerp(float val)set lerp to user lighting cfg
proto native void UpdatePathgraphDoorByAnimationSourceName(notnull Object object, string animSourceName)For entities that aren't a house, any animation source that contains "door" is treated as a door by the pathgraph. Using the phase value where 0=CLOSED, 1=OPENED, we can update the state of the door without regenerating the tile
proto native void MarkObjectForPathgraphUpdate(Object object)proto native void ProcessMarkedObjectsForPathgraphUpdate()Material matColors = g_Game.GetWorld().GetMaterial("postprocess/glow");
SetMaterialParam(matColors, "Saturation", 0.8);
float color[4];
color[0] = 0.5;
color[1] = 0.8;
color[2] = 0.7;
color[3] = 0.6;
SetMaterialParam(matColors, "OverlayColor", color);Show 2 more
, PPEffects.SetBlur(), and PPEffects.SetNVParams()proto native void SetCameraPostProcessEffect(int cam, int ppEffect, string effectName, string materialName)set new PP effect and its material
camera- number of camera
effectIndex- index of effect
effectName- name of effect
matName- name of material
void SetAperture(float invDiameter)proto native bool Is3rdPersonDisabled()checks if 3rd person camera is disabled from server
proto native bool IsCrosshairDisabled()checks if crosshair is disabled from server
proto native bool IsMouseAndKeyboardEnabledOnServer()checks if mouse and keyboard is enabled from server (only on console)
proto native int GetPingWarningThreshold()Returns the value set in server config for notifying high ping
proto native int GetPingCriticalThreshold()Returns the value set in server config for notifying high ping
proto native float GetServerFpsWarningThreshold()Returns the value set in server config for notifying low server fps
proto native float GetServerFpsCriticalThreshold()Returns the value set in server config for notifying low server fps
proto native void DisableTransmitVoN(bool disable)enable/disable transmiting voice over network globally
disable- if true, then VoN is no more usable for transmiting voice
enable/disable receiving all voice over network globally
disable- if true, then player is not able listen any voice from VoN
Returns: true if mute request was sent successfully to server. If false, then was problem with sent request or missing player idendity.
proto native bool IsDisabledTransmitingVoN()Returns: true if transmiting voice over network is disabled, so player can not talking
proto native bool IsDisabledReceivingVoN()Returns: true, if receiving voice over network is disabled, so player can not listen anybody
enables/disables player's voice communication
listening- enable or disable microphone
toggled- enable or disable PTT/Voice activation
proto native void FlattenGrassSphere(float x, float z, float radius, float centerLerp01, float timeDown01, float maxHeight01)create sphere
worldX- world X of touch with ground
worldZ- world X of touch with ground
radius- radius
centerLerp01- lerp of values inside rasterization
timeDown01- relative speed of going down, 1 is usually 0.5secs
maxHeight01- maximum relative height of flattening, 0 = no flatten
proto native void FlattenGrassEllipse(float x, float z, float sideX, float sideZ, float offset, float angleRAD, float centerLerp01, float timeDown01, float maxHeight01)create ellipse
worldX- world X of touch with ground
worldZ- world X of touch with ground
radiusX- radius in X coord before rotate
radiusZ- radius in Z coord before rotate
offset- offset, 0 = default center, <-1, 1>
angleRAD- rotation
centerLerp01- lerp of values inside rasterization
timeDown01- relative speed of going down, 1 is usually 0.5secs
maxHeight01- maximum relative height of flattening, 0 = no flatten
proto native void FlattenGrassBox(float x, float z, float side, float angleRAD, float centerLerp01, float timeDown01, float maxHeight01)create box
worldX- world X of touch with ground
worldZ- world X of touch with ground
sideSize- size of side
angleRAD- rotation
centerLerp01- lerp of values inside rasterization
timeDown01- relative speed of going down, 1 is usually 0.5secs
maxHeight01- maximum relative height of flattening, 0 = no flatten
proto native void FlattenGrassRect(float x, float z, float sideX, float sideZ, float offset, float angleRAD, float centerLerp01, float timeDown01, float maxHeight01)create rectangle
worldX- world X of touch with ground
worldZ- world X of touch with ground
sideXSize- size of side in X
sideZSize- size of side in Z
offset- offset, 0 = default center, <-1, 1>
angleRAD- rotation
centerLerp01- lerp of values inside rasterization
timeDown01- relative speed of going down, 1 is usually 0.5secs
maxHeight01- maximum relative height of flattening, 0 = no flatten