|
Enfusion Script API
|
Public Member Functions | |
| proto external ref WeatherState | GetCurrentWeatherState () |
| proto external float | GetDayDuration () |
| Retrieves in-game day duration as realtime seconds. | |
| proto external bool | SetDayDuration (float realtimeSeconds) |
| Sets in-game day duration as realtime seconds. | |
| proto external bool | SetIsDayAutoAdvanced (bool autoAdvanced) |
| Enables or disabled automatic daytime advancement. | |
| proto external bool | GetIsDayAutoAdvanced () |
| Retrieves whether automatic time advancement is enabled or not. | |
| proto external bool | SetCurrentLongitude (float longitude) |
| Sets longitude as <-180, +180>. | |
| proto external float | GetCurrentLongitude () |
| Returns current longitude. | |
| proto external float | GetCurrentLatitude () |
| Returns current latitude. | |
| proto external bool | SetCurrentLatitude (float latitude) |
| Sets latitude as <-90, +90>. | |
| proto external float | GetTimeZoneOffset () |
| Returns time zone offset (in hours) | |
| proto external bool | SetTimeZoneOffset (float utcTimeZone) |
| Sets time zone offset (in hours) in range <-12.0, +14.0> | |
| proto external float | GetDSTOffset () |
| Gets DST offset (in hours) | |
| proto external bool | SetDSTOffset (float dstOffsetHours) |
| Sets DST Offset (in hours). | |
| proto external bool | IsDSTEnabled () |
| Retrieves whether DST (daylight savings time) is enabled. | |
| proto external bool | SetDSTEnabled (bool enabled) |
| Sets whether DST (daylight savings time) is enabled or disabled. | |
| proto external bool | SetWindSpeedOverride (bool doOverride, float windSpeed=0) |
| Sets in-game wind speed in meters per second. | |
| proto external float | GetWindSpeed () |
| Retrieves in-game wind speed in meters per second. | |
| proto external bool | SetWindDirectionOverride (bool doOverride, float windDirection=0) |
| Sets in-game wind direction angle in degrees. | |
| proto external float | GetWindDirection () |
| Retrieves in-game wind direction angle in degrees. | |
| proto external bool | IsWindSpeedOverridden () |
| proto external bool | IsWindDirectionOverridden () |
| proto external bool | SetRainIntensityOverride (bool doOverride, float rainIntensity=0) |
| Sets current rain intensity override (in range <0.0, 1.0>) Can only be set by the authority (server, singleplayer...) | |
| proto external float | GetRainIntensity () |
| proto external bool | IsRainIntensityOverridden () |
| proto external bool | SetFogAmountOverride (bool doOverride, float fog=0) |
| Sets current fog override (in range <0.0, 1.0>) Can only be set by the authority (server, singleplayer...) | |
| proto external bool | SetFogHeightDensityOverride (bool doOverride, float heightDensity=0) |
| proto external float | GetFogAmount () |
| proto external bool | IsFogAmountOverridden () |
| proto external float | GetFogHeightDensity () |
| proto external bool | IsFogHeightDensityOverridden () |
| proto external bool | SetCurrentWetness (float wetness) |
| proto external float | GetCurrentWetness () |
| proto external bool | SetCurrentWaterAccumulation (float waterAccumulationCracks, float waterAccumulationPuddles) |
| proto external float | GetCurrentWaterAccumulationCracks () |
| proto external float | GetCurrentWaterAccumulationPuddles () |
| proto external void | AddLightning (WeatherLightning lightning) |
| proto BaseWeatherStateTransitionManager | GetTransitionManager () |
| Get weather state transition manager. | |
| proto float | GetMoonPhaseForDate (int year, int month, int day, float timeOfTheDay24, float timezone, float dstOffset) |
| Gets moon phase for supplied date, geo location is not needed but timezone yes in order to calculate UTC correctly. | |
| proto void | GetCurrentSunMoonDirAndPhase (out vector outSunDir, out vector outMoonDir, out float outMoonPhase01) |
| Retrieve current sun direction, moon direction and moon phase. | |
| proto bool | GetSunriseHour (out float hour24) |
| Gets sunrise hour in 24 hour format e.g. | |
| proto bool | GetSunsetHour (out float hour24) |
| Gets sunset hour in 24 hour format e.g. | |
| proto bool | GetSunriseHourForDate (int year, int month, int day, float latitude, float longitude, float timezone, float dstOffset, out float hour24) |
| Gets sunrise hour in 24 hour format e.g. | |
| proto bool | GetSunsetHourForDate (int year, int month, int day, float latitude, float longitude, float timezone, float dstOffset, out float hour24) |
| Gets sunset hour in 24 hour format e.g. | |
| proto external float | GetTimeOfTheDay () |
| Retrieves the current time of the day. | |
| proto external bool | SetTimeOfTheDay (float hours24, bool immediateChange=false) |
| Sets the current time of the day. | |
| proto external bool | SetHoursMinutesSeconds (int hours, int minutes, int seconds, bool immediateChange=false) |
| Sets the current time of the day. | |
| proto external int | GetYear () |
| Returns current in-game year. | |
| proto external int | GetMonth () |
| Returns current in-game month of the year (Range 1-12) | |
| proto external int | GetDay () |
| Returns current in-game day of the month (Range 1-31) | |
| proto external int | GetDayInYear () |
| Returns the in-game day. | |
| proto external bool | SetDate (int year, int month, int day, bool immediateChange=false) |
| Sets the current in-game date (year/month/day). | |
| proto void | GetDate (out int year, out int month, out int day) |
| Retrieves the current date (Year, Month in 1-12 range, Day in 1-31 range). | |
| proto void | GetHoursMinutesSeconds (out int hours, out int minutes, out int seconds) |
| Retrieves the current time of the day. | |
| proto external int | GetWeekDay () |
| Returns current in-game week day in range [0-6], starts at Monday=0. | |
| proto external int | GetWeekDayForDate (int year, int month, int day) |
| Returns week day in range [0-6], starts at Monday=0, for the supplied date. | |
| proto external float | GetEngineTime () |
| Retrieves the current engine time (synchronized between clients), this value is not affected by time multiplier nor automatic time advancement attributes. | |
| proto external void | GetWeatherStatesList (out notnull array< ref WeatherState > outStates) |
| Gets all Weather States. | |
| proto external float | GetMoonPhase (float timeOfTheDay24) |
| Gets moon phase for supplied time of the day. | |
| proto external bool | SetOverrideSunIrradiance (bool doOverride) |
| Sets if Sun irradiance override is enabled. | |
| proto external bool | GetOverrideSunIrradiance () |
| Gets if Sun irradience override is enabled. | |
| proto external bool | SetSunIrradianceOverrideValues (float sunIrradianceMin, float sunIrradianceMax) |
| Sets values for Sun Irradiance override (values are for min/max during the day) | |
| proto external float | GetSunIrradianceMinOverride () |
| Gets value for Sun Irradiance Min override. | |
| proto external float | GetSunIrradianceMaxOverride () |
| Gets value for Sun Irradiance Max override. | |
| proto external bool | SetOverrideTemperature (bool doOverride) |
| Sets if temperature override is enabled. | |
| proto external bool | GetOverrideTemperature () |
| Gets if temperature override is enabled. | |
| proto external bool | SetTemperatureOverrideValues (float temperatureAirMin, float temperatureAirMax, float temperatureSkyMin, float temperatureSkyMax, float temperatureWaterMin, float temperatureWaterMax) |
| Sets values for temperature override (in degrees Celsius). | |
| proto external float | GetTemperatureAirMinOverride () |
| Gets value for Temperature Air Min override (in degrees Celsius). | |
| proto external float | GetTemperatureAirMaxOverride () |
| Gets value for Temperature Air Max override (in degrees Celsius). | |
| proto external float | GetTemperatureWaterMinOverride () |
| Gets value for Temperature Water Min override (in degrees Celsius). | |
| proto external float | GetTemperatureWaterMaxOverride () |
| Gets value for Temperature Water Max override (in degrees Celsius). | |
| proto external float | GetTemperatureSkyMinOverride () |
| Gets value for Temperature Sky Min override (in degrees Celsius). | |
| proto external float | GetTemperatureSkyMaxOverride () |
| Gets value for Temperature Sky Max override (in degrees Celsius). | |
| proto external bool | ForceTemperatureTableRecompute () |
| Forces complete recomputation of temperature table based on current min/max temperatures and sun irradiance. | |
| proto external bool | CheckValidDate (int year, int month, int day) |
| Checks if date is valid (checks for leap years and correct day of the month) | |
| proto external void | UpdateWeather (float timeSlice, bool advanceSimulation=true) |
| update weather by selected timeSlice | |
Public Member Functions inherited from GenericEntity | |
| proto external void | Activate () |
| Activate entity events. | |
| proto external void | Deactivate () |
| Deactivate entity events. | |
| proto external void | Show (bool show) |
| proto external WorldEditorAPI | _WB_GetEditorAPI () |
| This returns world editor API, which is safe to use from editor events bellow. | |
| proto external void | OnTransformReset (bool isCorrection=false, vector newVelocity=vector.Zero) |
| Notifies the entity that its transformation has been discontinuously changed. | |
| IEntity | _WB_GetEditableOwner () |
| Editor needs to know if there is any entity which manages this one and is editable. | |
| void | _WB_MakeVisible (IEntitySource src, bool visible) |
| Editor needs to have entity visible or not. Do not call editor API here! | |
| void | _WB_SetTransform (inout vector mat[4], IEntitySource src) |
| Editor changed transformation matrix source. This is the place to apply it on entity. Do not call editor API here! | |
| void | _WB_OnInit (inout vector mat[4], IEntitySource src) |
| Called always after entity creation. It's purpose is to prepare entity for editing. Do not edit anything through editor API here because it's too early for undoable actions! Use plain BaseContainer API for changes through src parameter if needed! | |
| bool | _WB_CanDelete (IEntitySource src) |
| Editor needs to know if this entity can to be deleted. Do not call editor API here! | |
| bool | _WB_CanRename (IEntitySource src) |
| Editor needs to know if this entity can to be renamed. Do not call editor API here! | |
| bool | _WB_CanCopy (IEntitySource src) |
| Editor needs to know if this entity can be copied. Do not call editor API here! | |
| bool | _WB_CanSelect (IEntitySource src) |
| Editor needs to know whether this entity can be selected in scene window or not. | |
| int | _WB_GetAnchorCount (IEntitySource src) |
| Returns how many anchor points does this entity have at this time. | |
| void | _WB_GetAnchor (inout vector position, IEntitySource src, int index) |
Fills position of anchor at index index to anchorPosition | |
| void | _WB_OnAnchorSnapped (IEntitySource thisSrc, int thisAnchor, IEntitySource otherSrc, int otherAnchor, bool isReceiver) |
| Called when two entities are snapped together. | |
| bool | _WB_CanAnchorSnap (IEntitySource thisSrc, int thisAnchor, IEntitySource otherSrc, int otherAnchor, bool isReceiver) |
| void | _WB_GetBoundBox (inout vector min, inout vector max, IEntitySource src) |
| Editor needs to know a bound box of entity (For ray-casting, visualizers etc.). You can return any custom size you need. Do not call editor API here! | |
| bool | _WB_ShouldShowBoundBox (IEntitySource src) |
| Returns true if bound box should be visible when entity is hovered/selected in WB. | |
| void | _WB_SetExtraVisualiser (EntityVisualizerType type, IEntitySource src) |
| If entity needs to have a special visualizer instead of default one, here is the place where you can implement it. Do not call editor API here! | |
| array< ref WB_UIMenuItem > | _WB_GetContextMenuItems () |
| An opportunity to append items into editor's "Entity" context menu. Do not call editor API here! | |
| bool | _WB_OnPhysSimulPlacementBegin (IEntitySource src) |
| Does this entity support editing transformation using physics simulation? Do not call editor API here! | |
| bool | _WB_EnablePhysics (IEntitySource src, bool physics) |
| Prepare to edit transformation using physics simulation. Return previous status. Do not call editor API here! | |
| array< ref ParamEnum > | _WB_GetUserEnums (string varName, IEntitySource src) |
| Possibility to get variable value choices dynamically. Do not call editor API here! | |
| bool | _WB_OnKeyChanged (BaseContainer src, string key, BaseContainerList ownerContainers, IEntity parent) |
| Any property value has been changed. You can use editor API here and do some additional edit actions which will be part of the same "key changed" action. | |
| bool | _WB_GetKeySpaceMatrixWorld (BaseContainer src, string key, BaseContainerList ownerContainers, IEntity parent, out vector transformSpaceWorld[4]) |
| Some "coords" or "angles" vector property is being to be edited. Entity can provide a world matrix which represents their local space and which is needed by editor to edit the key by a gizmo. | |
| void | _WB_AfterWorldUpdate (float timeSlice) |
| Called after updating world in Workbench. The entity must be visible in frustum, selected or named. You can use editor API here and do some edit actions if needed. | |
| int | _WB_GetAfterWorldUpdateSpecs (IEntitySource src) |
| Called after _WB_OnInit or also later when editor needs to know whether _WB_AfterWorldUpdate needs to be called and when. Return value can be either 0 (event will not be called at all) or any combination of EEntityFrameUpdateSpecs. Avoid CALL_ALWAYS flag whenever possible to prevent performance issues. | |
| void | _WB_OnContextMenu (int id) |
| User has chosen any of your menu item from editor's "Entity" menu which you have recently provided in WB_GetContextMenuItems(). You can use editor API here and do some edit actions. | |
| void | _WB_OnKeyDown (int keyCode) |
| User pressed a key and this entity is main member of entity selection. You can use editor API here and do some edit actions which will be undoable. | |
| void | _WB_OnCreate (IEntitySource src) |
| Called after entity gets created in map during editing or when deleted entity gets restored after undo action. This event isn't called by loading map!!! If you need an event that is being called after every entity creation then use WB_OnInit instead it. You can use editor API here and do some additional edit actions which will be part of the same "create entity" action. | |
| void | _WB_OnParentChange (IEntitySource src, IEntitySource prevParentSrc) |
| Parent entity has been changed ( it's available through src->GetParent() ). prevParentSrc is a pointer to a previous parent (if any) | |
| void | _WB_OnDelete (IEntitySource src) |
| This entity is going to be deleted. You can use editor API here and do some additional edit actions which will be part of the same "entity delete" action. | |
| void | _WB_OnRename (IEntitySource src, string oldName) |
| This entity has been renamed. You can use editor API here and do some additional edit actions which will be part of the same "entity rename" action. | |
Public Member Functions inherited from IEntity | |
| proto external EntityID | GetID () |
| Return unique entity ID. | |
| proto external IEntity | GetParent () |
| Returns parent of this entity (entity on upper level of hierarchy). | |
| proto external IEntity | GetRootParent () |
| Returns top-parent of this entity. | |
| proto external IEntity | GetChildren () |
| Returns first child from this level of hierarchy if there is any. | |
| proto external IEntity | GetSibling () |
| Returns next sibling of this entity (next entity on this level of hierarchy). | |
| proto external VObject | GetVObject () |
| Returns visual object set to this Entity. No reference is added. | |
| proto external EntityPrefabData | GetPrefabData () |
| proto external EntityComponentPrefabData | FindComponentData (TypeName typeName) |
| proto external BaseWorld | GetWorld () |
| proto external void | SetFixedLOD (int lod) |
| Set fixed LOD. Use -1 for non-fixed LOD. | |
| proto external void | GetTransform (out vector mat[]) |
| Returns world transformation of Entity. | |
| proto external void | GetWorldTransform (out vector mat[]) |
| See IEntity.GetTransform. | |
| proto external void | GetLocalTransform (out vector mat[]) |
| See IEntity.GetTransform. | |
| proto external void | ComputeLocalTransform (out vector mat[]) |
| Returns combined local transformation of parent's pivot attachment and local transform. | |
| proto external vector | VectorToParent (vector vec) |
| Transforms local vector to parent(world) space. | |
| proto external vector | CoordToParent (vector coord) |
| Transforms local position to parent(world) space. | |
| proto external vector | VectorToLocal (vector vec) |
| Transforms world space vector to local space. | |
| proto external vector | CoordToLocal (vector coord) |
| Transforms world space position to local space. | |
| proto external vector | GetYawPitchRoll () |
| Returns orientation of Entity in world space (Yaw, Pitch, Roll). | |
| proto external void | SetYawPitchRoll (vector angles) |
| Sets angles for entity (Yaw, Pitch, Roll). | |
| proto external vector | GetWorldTransformAxis (int axis) |
| See IEntity.GetTransformAxis. | |
| proto external vector | GetTransformAxis (int axis) |
| See IEntity.GetTransformAxis. | |
| proto external vector | GetLocalTransformAxis (int axis) |
| See IEntity.GetTransformAxis. | |
| proto external bool | SetLocalTransform (vector mat[4]) |
See IEntity.SetTransform. Returns false, if there is no change in transformation. | |
| proto external bool | SetWorldTransform (vector mat[4]) |
See IEntity.SetTransform. Returns false, if there is no change in transformation. | |
| proto external TNodeId | GetPivot () |
| Returns pivot ID from hierarchy component. | |
| proto external bool | SetTransform (vector mat[4]) |
| Sets entity world transformation. | |
| proto external vector | GetLocalAngles () |
| Same as GetLocalYawPitchRoll(), but returns rotation vector around X, Y and Z axis. | |
| proto external vector | GetLocalYawPitchRoll () |
| Returns local orientation when it's in hierarchy (Yaw, Pitch, Roll). | |
| proto external vector | GetAngles () |
| Same as GetYawPitchRoll(), but returns rotation vector around X, Y and Z axis. | |
| proto external void | SetAngles (vector angles) |
| Same as SetYawPitchRoll(), but sets rotation around X, Y and Z axis. | |
| proto external vector | GetOrigin () |
| Returns origin of Entity. | |
| proto external void | SetOrigin (vector orig) |
| Sets origin for entity. | |
| proto external void | SetScale (float scale) |
| proto external float | GetScale () |
| proto external void | GetBounds (out vector mins, out vector maxs) |
| Returns local bounding box of model on Entity. | |
| proto external void | GetWorldBounds (out vector mins, out vector maxs) |
| Returns quantized world-bound-box of Entity. | |
| proto external volatile void | SendEvent (notnull IEntity actor, EntityEvent e, void extra) |
Dynamic event invocation. Parameters are the same as in IEntity::EOnXXXX() methods. | |
| proto external string | GetName () |
| proto external int | SetVComponentFlags (VCFlags flags) |
| Sets component flags. | |
| proto external void | SetObject (VObject object, string options) |
| Sets the visual object to this entity. | |
| proto external EntityFlags | SetFlags (EntityFlags flags, bool recursively=false) |
| Sets Entity flags. | |
| proto external EntityFlags | ClearFlags (EntityFlags flags, bool recursively=false) |
| Clear Entity flags. | |
| proto external EntityFlags | GetFlags () |
| Returns Entity flags. | |
| proto external EntityEvent | SetEventMask (EntityEvent e) |
| Sets event mask. | |
| proto external EntityEvent | ClearEventMask (EntityEvent e) |
| Clears event mask. | |
| proto external EntityEvent | GetEventMask () |
| Returns current event mask. | |
| proto external bool | IsLoaded () |
| proto external bool | IsDeleted () |
| proto external int | Update () |
| Updates entity state/position. | |
| proto external int | AddChild (notnull IEntity child, TNodeId pivot, EAddChildFlags flags=EAddChildFlags.AUTO_TRANSFORM) |
| Add Entity to hierarchy. Pivot is pivot index, or -1 for center of parent. | |
| proto external void | RemoveChild (notnull IEntity child, bool keepTransform=false) |
| Remove Entity from hierarchy. | |
| proto external void | SetName (string name) |
| proto external int | SetCameraMask (int mask) |
| Sets visibility mask for cameras, where Entity will be rendered. | |
| proto external Physics | GetPhysics () |
| proto external Particles | GetParticles () |
| proto external Animation | GetAnimation () |
| proto external int | Animate (float speed, int loop) |
| Updates animation (either xob, or particle, whatever). | |
| proto external int | AnimateEx (float speed, int loop, out vector lin, out vector ang) |
| Updates animation (either xob, or particle, whatever). | |
| proto external void | SetBone (TNodeId bone, vector angles, vector trans, float scale) |
| proto external bool | SetBoneMatrix (TNodeId bone, vector mat[4]) |
| proto external bool | GetBoneMatrix (TNodeId bone, out vector mat[4]) |
| proto external TNodeId | GetBoneIndex (string boneName) |
| proto external void | GetBoneNames (out notnull array< string > boneNames) |
| proto external bool | GetBoneLocalMatrix (TNodeId bone, out vector mat[4]) |
| proto external Managed | FindComponent (TypeName typeName) |
| Finds first occurance of the coresponding component. | |
| proto external int | FindComponents (TypeName typeName, notnull array< Managed > outComponents) |
| Finds all occurances of the coresponding component. | |
Public Member Functions inherited from Managed | |
| proto external ref Managed | Clone () |
| Return shallow copy of object, or null if it is not allowed (not public constructor) | |
Static Public Member Functions | |
| static proto void | TimeToHoursMinutesSeconds (float hours24, out int hours, out int minutes, out int seconds) |
| static proto float | HoursMinutesSecondsToTime (int hours, int minutes, int seconds) |
Static Public Member Functions inherited from GenericEntity | |
| static bool | Preload (IEntitySource src) |
| static proto void | GetMatrixFromSource (BaseWorld world, IEntitySource src, bool withScale, out vector mat[4]) |
Additional Inherited Members | |
Protected Member Functions inherited from GenericEntity | |
| bool | RplLoad (ScriptBitReader reader) |
| Called when Item is initialized from replication stream. | |
| bool | RplSave (ScriptBitWriter writer) |
| Called when Item is getting replicated from Master to Slave connection. | |
| proto void | Rpc (func method, void p0=NULL, void p1=NULL, void p2=NULL, void p3=NULL, void p4=NULL, void p5=NULL, void p6=NULL, void p7=NULL) |
| Attempts to run a remote procedure call (RPC) of this instance with parameters specified in method RplRpc attribute. | |
| proto external void | ConnectToDiagSystem () |
| proto external void | DisconnectFromDiagSystem () |
| void | EOnDiag (IEntity owner, float timeSlice) |
| void | EOnActivate (IEntity owner) |
| Event when entity is activated. | |
| void | EOnDeactivate (IEntity owner) |
| Event when entity is deactivated. | |
| void | OnTransformResetImpl (TransformResetParams params) |
| Script-side implementation of OnTransformReset. | |
Protected Member Functions inherited from IEntity | |
| void | EOnTouch (IEntity owner, IEntity other, int touchTypesMask) |
| Event when touched by other entity. | |
| void | EOnInit (IEntity owner) |
| Event after entity is allocated and initialized. | |
| void | EOnVisible (IEntity owner, int frameNumber) |
| Event when we are visible. | |
| void | EOnFrame (IEntity owner, float timeSlice) |
| Event every frame. | |
| void | EOnPostFrame (IEntity owner, float timeSlice) |
| Event after physics update. | |
| void | EOnAnimEvent (IEntity owner, int type, int slot) |
| Event from animation system. | |
| void | EOnSimulate (IEntity owner, float timeSlice) |
| Event before every physics fixed step (can be multiple calls per engine update) | |
| void | EOnPostSimulate (IEntity owner, float timeSlice) |
| Event after every physics fixed step (can be multiple calls per engine update) | |
| void | EOnJointBreak (IEntity owner, IEntity other) |
| Event when joint attached to RigidBody of this entity is broken. | |
| void | EOnPhysicsMove (IEntity owner) |
| Event when physics engine has moved with this Entity. | |
| void | EOnContact (IEntity owner, IEntity other, Contact contact) |
| Event when physics engine registered contact with other RigidBody. | |
| void | EOnPhysicsActive (IEntity owner, bool activeState) |
| Event when a RigidBody active state is changed between consecutive fixed steps. | |
| void | EOnFixedFrame (IEntity owner, float timeSlice) |
| Event every fixed frame. | |
| void | EOnFixedPostFrame (IEntity owner, float timeSlice) |
| Event after physics update every fixed frame. | |
| void | EOnUser0 (IEntity other, int extra) |
| EntityEvent.EV_USER+0. | |
| void | EOnUser1 (IEntity other, int extra) |
| EntityEvent.EV_USER+1. | |
| void | EOnUser2 (IEntity other, int extra) |
| EntityEvent.EV_USER+2. | |
| void | EOnUser3 (IEntity other, int extra) |
| EntityEvent.EV_USER+3. | |
| void | EOnUser4 (IEntity other, int extra) |
| EntityEvent.EV_USER+4. | |
| void | IEntity (IEntitySource src, IEntity parent) |
| protected script Constructor | |
| proto external void BaseWeatherManagerEntity.AddLightning | ( | WeatherLightning | lightning | ) |
Checks if date is valid (checks for leap years and correct day of the month)
| year | Year |
| month | Month (in 1-12 range) |
| day | Day (in 1-31 range) |
| proto external bool BaseWeatherManagerEntity.ForceTemperatureTableRecompute | ( | ) |
Forces complete recomputation of temperature table based on current min/max temperatures and sun irradiance.
This needs to be called if you change some min/max temperature settings and want to immediately change temperatures of all objects based on these settings. Beware! This is performance heavy so use only when really needed (for example when changing temperature settings and you want to see immediate effect of the changes).
| proto external float BaseWeatherManagerEntity.GetCurrentLatitude | ( | ) |
Returns current latitude.
| proto external float BaseWeatherManagerEntity.GetCurrentLongitude | ( | ) |
Returns current longitude.
| proto void BaseWeatherManagerEntity.GetCurrentSunMoonDirAndPhase | ( | out vector | outSunDir, |
| out vector | outMoonDir, | ||
| out float | outMoonPhase01 ) |
Retrieve current sun direction, moon direction and moon phase.
| outSunDir | Current sun direction |
| outMoonDir | Current moon direction |
| outMoonPhase01 | Moon phase (0 = new moon, 1 = full moon) |
| proto external float BaseWeatherManagerEntity.GetCurrentWaterAccumulationCracks | ( | ) |
| proto external float BaseWeatherManagerEntity.GetCurrentWaterAccumulationPuddles | ( | ) |
| proto external ref WeatherState BaseWeatherManagerEntity.GetCurrentWeatherState | ( | ) |
| proto external float BaseWeatherManagerEntity.GetCurrentWetness | ( | ) |
Retrieves the current date (Year, Month in 1-12 range, Day in 1-31 range).
| proto external int BaseWeatherManagerEntity.GetDay | ( | ) |
Returns current in-game day of the month (Range 1-31)
| proto external float BaseWeatherManagerEntity.GetDayDuration | ( | ) |
Retrieves in-game day duration as realtime seconds.
| proto external int BaseWeatherManagerEntity.GetDayInYear | ( | ) |
Returns the in-game day.
| proto external float BaseWeatherManagerEntity.GetDSTOffset | ( | ) |
Gets DST offset (in hours)
| proto external float BaseWeatherManagerEntity.GetEngineTime | ( | ) |
Retrieves the current engine time (synchronized between clients), this value is not affected by time multiplier nor automatic time advancement attributes.
| proto external float BaseWeatherManagerEntity.GetFogAmount | ( | ) |
| proto external float BaseWeatherManagerEntity.GetFogHeightDensity | ( | ) |
| proto void BaseWeatherManagerEntity.GetHoursMinutesSeconds | ( | out int | hours, |
| out int | minutes, | ||
| out int | seconds ) |
Retrieves the current time of the day.
Example:
| proto external bool BaseWeatherManagerEntity.GetIsDayAutoAdvanced | ( | ) |
Retrieves whether automatic time advancement is enabled or not.
| proto external int BaseWeatherManagerEntity.GetMonth | ( | ) |
Returns current in-game month of the year (Range 1-12)
Gets moon phase for supplied time of the day.
| proto float BaseWeatherManagerEntity.GetMoonPhaseForDate | ( | int | year, |
| int | month, | ||
| int | day, | ||
| float | timeOfTheDay24, | ||
| float | timezone, | ||
| float | dstOffset ) |
Gets moon phase for supplied date, geo location is not needed but timezone yes in order to calculate UTC correctly.
| year | Year. |
| month | Month in range <1, 12> |
| day | Day in range <1, 31> |
| timeOfTheDay24 | Time of the day in 24 hour floating point format. |
| timezone | TimeZone Offset in hours ranging <-12, +14> |
| dstOffset | DST (daylight savings time) offset, must be 0.0 or positive value. |
| proto external bool BaseWeatherManagerEntity.GetOverrideSunIrradiance | ( | ) |
Gets if Sun irradience override is enabled.
| proto external bool BaseWeatherManagerEntity.GetOverrideTemperature | ( | ) |
Gets if temperature override is enabled.
| proto external float BaseWeatherManagerEntity.GetRainIntensity | ( | ) |
| proto external float BaseWeatherManagerEntity.GetSunIrradianceMaxOverride | ( | ) |
Gets value for Sun Irradiance Max override.
Value represents maximal Sun irradiance during the day
| proto external float BaseWeatherManagerEntity.GetSunIrradianceMinOverride | ( | ) |
Gets value for Sun Irradiance Min override.
Value represents minimal Sun irradiance during the day
Gets sunrise hour in 24 hour format e.g.
12.50 is 12:30 A.M
| proto bool BaseWeatherManagerEntity.GetSunriseHourForDate | ( | int | year, |
| int | month, | ||
| int | day, | ||
| float | latitude, | ||
| float | longitude, | ||
| float | timezone, | ||
| float | dstOffset, | ||
| out float | hour24 ) |
Gets sunrise hour in 24 hour format e.g.
12.50 is 12:30 A.M. For specific date, geolocation, timezone and DST.
| year | Year. |
| month | Month in range <1, 12> |
| day | Day in range <1, 31> |
| latitude | Latitude in range <-90, 90> where +90 equals north pole, 0 equator and -90.0 south pole |
| longitude | Longitude in range <-180.0, 180.0> where 0 equals (almost) greenwich meridian. |
| timezone | TimeZone Offset in hours ranging <-12, +14> |
| dstOffset | DST (daylight savings time) offset, must be 0.0 or positive value. |
Gets sunset hour in 24 hour format e.g.
12.50 is 12:30 A.M
| proto bool BaseWeatherManagerEntity.GetSunsetHourForDate | ( | int | year, |
| int | month, | ||
| int | day, | ||
| float | latitude, | ||
| float | longitude, | ||
| float | timezone, | ||
| float | dstOffset, | ||
| out float | hour24 ) |
Gets sunset hour in 24 hour format e.g.
12.50 is 12:30 A.M for specific date.
| proto external float BaseWeatherManagerEntity.GetTemperatureAirMaxOverride | ( | ) |
Gets value for Temperature Air Max override (in degrees Celsius).
Value represents maximal air temperature during the day
| proto external float BaseWeatherManagerEntity.GetTemperatureAirMinOverride | ( | ) |
Gets value for Temperature Air Min override (in degrees Celsius).
Value represents minimal air temperature during the day
| proto external float BaseWeatherManagerEntity.GetTemperatureSkyMaxOverride | ( | ) |
Gets value for Temperature Sky Max override (in degrees Celsius).
Value represents maximal sky temperature during the day
| proto external float BaseWeatherManagerEntity.GetTemperatureSkyMinOverride | ( | ) |
Gets value for Temperature Sky Min override (in degrees Celsius).
Value represents minimal sky temperature during the day
| proto external float BaseWeatherManagerEntity.GetTemperatureWaterMaxOverride | ( | ) |
Gets value for Temperature Water Max override (in degrees Celsius).
Value represents maximal water temperature during the day
| proto external float BaseWeatherManagerEntity.GetTemperatureWaterMinOverride | ( | ) |
Gets value for Temperature Water Min override (in degrees Celsius).
Value represents minimal water temperature during the day
| proto external float BaseWeatherManagerEntity.GetTimeOfTheDay | ( | ) |
Retrieves the current time of the day.
| proto external float BaseWeatherManagerEntity.GetTimeZoneOffset | ( | ) |
Returns time zone offset (in hours)
| proto BaseWeatherStateTransitionManager BaseWeatherManagerEntity.GetTransitionManager | ( | ) |
Get weather state transition manager.
| proto external void BaseWeatherManagerEntity.GetWeatherStatesList | ( | out notnull array< ref WeatherState > | outStates | ) |
Gets all Weather States.
| proto external int BaseWeatherManagerEntity.GetWeekDay | ( | ) |
Returns current in-game week day in range [0-6], starts at Monday=0.
Returns week day in range [0-6], starts at Monday=0, for the supplied date.
| year | Year. |
| month | Month in range <1, 12> |
| day | Day in range <1, 31> |
| proto external float BaseWeatherManagerEntity.GetWindDirection | ( | ) |
Retrieves in-game wind direction angle in degrees.
| proto external float BaseWeatherManagerEntity.GetWindSpeed | ( | ) |
Retrieves in-game wind speed in meters per second.
| proto external int BaseWeatherManagerEntity.GetYear | ( | ) |
Returns current in-game year.
|
static |
| proto external bool BaseWeatherManagerEntity.IsDSTEnabled | ( | ) |
Retrieves whether DST (daylight savings time) is enabled.
| proto external bool BaseWeatherManagerEntity.IsFogAmountOverridden | ( | ) |
| proto external bool BaseWeatherManagerEntity.IsFogHeightDensityOverridden | ( | ) |
| proto external bool BaseWeatherManagerEntity.IsRainIntensityOverridden | ( | ) |
| proto external bool BaseWeatherManagerEntity.IsWindDirectionOverridden | ( | ) |
| proto external bool BaseWeatherManagerEntity.IsWindSpeedOverridden | ( | ) |
Sets latitude as <-90, +90>.
Can only be set by the authority (server, singleplayer...)
Sets longitude as <-180, +180>.
Can only be set by the authority (server, singleplayer...)
| proto external bool BaseWeatherManagerEntity.SetCurrentWaterAccumulation | ( | float | waterAccumulationCracks, |
| float | waterAccumulationPuddles ) |
| proto external bool BaseWeatherManagerEntity.SetDate | ( | int | year, |
| int | month, | ||
| int | day, | ||
| bool | immediateChange = false ) |
Sets the current in-game date (year/month/day).
Only issuable by the authority. Automatically broadcast to all clients. You may check date validity prior to this call with CheckValidDate method.
| year | Year |
| month | Month (in 1-12 range) |
| day | Day (in 1-31 range) |
| immediateChange | Whether change should be applied immediately, forcing recomputation. This should be true only in case of editor and similar items. |
Sets in-game day duration as realtime seconds.
Only issuable by the authority. Automatically broadcast to all clients.
| realtimeSeconds | Seconds in real time one ingame day will take. |
Sets whether DST (daylight savings time) is enabled or disabled.
Sets DST Offset (in hours).
Can only be set by authority.
| proto external bool BaseWeatherManagerEntity.SetFogAmountOverride | ( | bool | doOverride, |
| float | fog = 0 ) |
Sets current fog override (in range <0.0, 1.0>) Can only be set by the authority (server, singleplayer...)
| proto external bool BaseWeatherManagerEntity.SetFogHeightDensityOverride | ( | bool | doOverride, |
| float | heightDensity = 0 ) |
| proto external bool BaseWeatherManagerEntity.SetHoursMinutesSeconds | ( | int | hours, |
| int | minutes, | ||
| int | seconds, | ||
| bool | immediateChange = false ) |
Sets the current time of the day.
Only issuable by the authority. Automatically broadcast to all clients.
| hours | Hours <0,24> |
| minutes | Minutes <0,60> |
| seconds | Seconds <0,60> |
| immediateChange | Whether change should be applied immediately, forcing recomputation. This should be true only in case of editor and similar items. |
Enables or disabled automatic daytime advancement.
Only issuable by the authority. Automatically broadcast to all clients.
| autoAdvanced | True to enable, false to disable. |
Sets if Sun irradiance override is enabled.
Sets if temperature override is enabled.
| proto external bool BaseWeatherManagerEntity.SetRainIntensityOverride | ( | bool | doOverride, |
| float | rainIntensity = 0 ) |
Sets current rain intensity override (in range <0.0, 1.0>) Can only be set by the authority (server, singleplayer...)
| proto external bool BaseWeatherManagerEntity.SetSunIrradianceOverrideValues | ( | float | sunIrradianceMin, |
| float | sunIrradianceMax ) |
Sets values for Sun Irradiance override (values are for min/max during the day)
| proto external bool BaseWeatherManagerEntity.SetTemperatureOverrideValues | ( | float | temperatureAirMin, |
| float | temperatureAirMax, | ||
| float | temperatureSkyMin, | ||
| float | temperatureSkyMax, | ||
| float | temperatureWaterMin, | ||
| float | temperatureWaterMax ) |
Sets values for temperature override (in degrees Celsius).
Values are for min/max during the day.
| proto external bool BaseWeatherManagerEntity.SetTimeOfTheDay | ( | float | hours24, |
| bool | immediateChange = false ) |
Sets the current time of the day.
Only issuable by the authority. Automatically broadcast to all clients.
| hours24 | Time fraction in hours <0.0, 24.0> |
| immediateChange | Whether change should be applied immediately, forcing recomputation. This should be true only in case of editor and similar items. |
Sets time zone offset (in hours) in range <-12.0, +14.0>
| proto external bool BaseWeatherManagerEntity.SetWindDirectionOverride | ( | bool | doOverride, |
| float | windDirection = 0 ) |
Sets in-game wind direction angle in degrees.
Only issuable by the authority. Automatically broadcast to all clients.
| windDirection | Wind direction angle in degrees <0, 360.0> |
| proto external bool BaseWeatherManagerEntity.SetWindSpeedOverride | ( | bool | doOverride, |
| float | windSpeed = 0 ) |
Sets in-game wind speed in meters per second.
Only issuable by the authority. Automatically broadcast to all clients.
| windSpeed | Wind speed in m/s. |
|
static |
| proto external void BaseWeatherManagerEntity.UpdateWeather | ( | float | timeSlice, |
| bool | advanceSimulation = true ) |
update weather by selected timeSlice
| timeSlice | timeslice |
| advanceSimulation | advance simulation time by the timeslice value, if false, only weather is updated |