int Map_GetTimeStamp()
This gets the number of ticks (60/second is default) since start of map.
float Map_GetElapsedTime(int alTimeStamp)
Gets how long time it has elapsed since the time step was retrieved.
void Map_SetDisplayNameEntry(const tString &in asNameEntry)
Sets the displayed name of the current map.
void Map_SetSkyBoxActive(bool abX)
Activates or deactivates the skybox of the current map
void Map_SetSkyBoxTexture(const tString &in asTexture)
Sets the texture of the skybox in the current map
void Map_SetSkyBoxColor(const cColor &in acColor)
Sets the color of the skybox in the current map
void Map_SetFogActive(bool abX)
Activates or deactivates fog in the current map
void Map_SetFogProperties(float afStart, float afEnd, float afFalloffExp, const cColor &in acColor, bool abCulling)
Sets the properties of the fog in the current map
void Map_SetSecondaryFogActive(bool abX)
Activates or deactivates the secondary fog
void Map_SetSecondaryFogProperties(float afStart, float afEnd, float afFalloffExp, const cColor &in acColor)
Sets the properties of the secondary fog, both the primary and secondary fog will be applied, these are order independent
void Map_FadeFogStart(float afTarget, float afTime)
void Map_FadeFogEnd(float afTarget, float afTime)
void Map_FadeFogColor(const cColor &in aTarget, float afTime)
void Map_FadeFogFalloffExp(float afTarget, float afTime)
void Map_SetEnvironmentParticlesActive(bool abState)
array < cEnvironmentParticles @> Map_GetEnvironmentParticles(tString asName, array< cEnvironmentParticles @> &inout avParticles)
Get all env particles that match name
void Map_SetEnvironmentParticleVisible(tString asName, bool abVisible)
Toggle visiblity for specific layer
void Map_SetEnvironmentParticleGravityVelocity(tString asName, const cVector3f &in avVelocity)
Sets the gravity of the env particles
void Map_SetEnvironmentParticleRotateVelocity(tString asName, const cVector3f &in avVelocity)
Sets the rotation of the env particles
void Map_SetEnvironmentParticleWindVelocity(tString asName, const cVector3f &in avVelocity)
Sets the wind of the env particles
void Map_FadeEnvironmentParticleWindVelocity(tString asName, const cVector3f &in avVelocity, float afTime)
Fade the wind velocity of all env particles over time
void Map_FadeEnvironmentParticleColor(tString asName, const cColor &in aColor, float afTime)
Fade the color of the env particle
void Map_FadeEnvironmentParticleBrightness(tString asName, float afBrightness, float afTime)
Fade the brightness of the env particle
void Map_SetEnvironmentParticleColor(tString asName, const cColor &in aColor)
Fade the color of the env particle
void Map_SetEnvironmentParticleFadeOut(tString asName, float afStart, float afEnd)
Set the fade out settings for the environment particles.
void Map_SetEnvironmentParticleFadeIn(tString asName, float afStart, float afEnd)
Set the fade in settings for the environment particles.
void Map_AddEnvironmentParticleClipArea(tString asName, tString asClipSourceEntity, bool abAdditive=true)
Sets the wind of the env particles
void Map_RemoveEnvironmentParticleClipArea(tString asName, tString asClipSourceEntity)
Sets the wind of the env particles
void Map_SetEnvironmentParticlesSpotLight(tString asName, cLightSpot @apLight, float afMul=1.0f)
Set flashlight to affect particles
void Map_SetPlayerTerrainCollision(bool abX)
If player should collide with the terrain or not.
void Map_SetEnvironmentParticleGravityVelocity(const cVector3f &in avVelocity)
void Map_SetEnvironmentParticleRotateVelocity(const cVector3f &in avVelocity)
void Map_SetEnvironmentParticleWindVelocity(const cVector3f &in avVelocity)
void Map_FadeEnvironmentParticleWindVelocity(const cVector3f &in avVelocity, float afTime)
void Map_Preset_SetupFog(tString asName, bool abActive, float afStart=0, float afEnd=0, float afFalloffExp=1, cColor aColor=1, float afBrightness=1, bool abUnderwater=false, bool abSkybox=false)
Setup fog for the specified preset
void Map_Preset_SetupSecondaryFog(tString asName, bool abActive, float afStart=0, float afEnd=0, float afFalloffExp=1, cColor aColor=1, float afBrightness=1)
Setup secondary fog for the specified preset
void Map_Preset_SetupDepthOfField(tString asName, bool abActive, float afStart=0, float afEnd=0, float afFalloff=1)
Setup depth of field for specified preset
void Map_Preset_SetupBloom(tString asName, float afWidth, float afBrightPass, float afFalloff, cColor aTint)
Setup bloom for specified preset
void Map_Preset_SetupDirLight(tString asName, bool abActive, cColor aDiffuseColor, float afBrightness, cVector3f avDirection, cColor aGroundColor, cColor aSkyColor)
Setup Direcitonal light for specified preset
void Map_Preset_SetupToneMapping(tString asName, float afToneMappingKey, float afToneMappingExposure, float afToneMappingWhiteCut)
Setup tonemapping for specified preset
void Map_Preset_SetupColorGrading(tString asName, tString asColorGrading)
Setup color grading for specified preset
void Map_Preset_SetupSkybox(tString asName, const cColor &in aColor, float afBrightness)
Setup skybox for specified preset
void Map_Preset_Fade(tString asName, float afFadeTime)
Fade in the preset
bool Map_CopyGlobalSettings(cLuxMap @apMap, float afFadeTime)
Copies and fades in settings of another map
void Map_SetDistanceCullingRange(float afRange, float afRandomSize=0)
Actives distance culling and sets the min and max range to the value. Any objects further away then that range will get culled Only use this function on maps that dont have distance culling active from the .map file
void Map_DisableDistanceCulling()
Disables distance culling
void Map_SetUnderwater(bool abX, bool abUseStartAndEndEffects=false)
Sets if the map is underwater or not, and the correct properties for the state.
bool Map_GetUnderwater()
Gets if the map is under water or not.
Returns: true if the map is underwater.
void Map_AddTimer(const tString &in asName, float afTime, const tString &in asFunction)
Syntax for callback function, void FunctionName(const tString &in asTimer). syntax for the callback function code snippet, clbTimer.
void Map_RemoveTimer(const tString &in asName)
Remove a created timer.
float Map_GetTimerTime(const tString &in asName)
Get the current time of a created timer.
bool Map_TimerExists(const tString &in asName)
Get if the specified timer exists.
Returns: bool, true if the timer exists.
void Map_SetTimerPaused(const tString &in asName, bool abX)
Pause/unpause a created timer.
bool Map_TimeHasPassed(const tString &in asName, float afTime)
Checks if a timer with the specified name has reached 0, and if so recreates the timer with the specified time and returns true. Use in if-cases to limit how often the script within the case can run.
Returns: bool, true if the time has passed and a new timer was created, otherwise false.
void Map_RestartCurrentTimer(float afNewTime=-1)
If used inside a timer callback it will restart that the timer that issued that callback.
void Map_SetTimerUserVarFloat(const tString &in asName, float afX)
void Map_SetTimerUserVarInt(const tString &in asName, int alX)
void Map_SetTimerUserVarString(const tString &in asName, const tString &in asX)
float Map_GetTimerUserVarFloat(const tString &in asName)
int Map_GetTimerUserVarInt(const tString &in asName)
tString Map_GetTimerUserVarString(const tString &in asName)
float Map_IncTimerUserVarFloat(const tString &in asName, int afX)
int Map_IncTimerUserVarInt(const tString &in asName, int alX)
iLuxEntity Map_GetEntity(const tString &in asName, eLuxEntityType aType=eLuxEntityType_LastEnum, const tString &in asClass="")
Returns the entity with the given name.
Returns: iLuxEntity @, the requested entity, or null if the entity was not found.
bool Map_GetEntityArray(const tString &in asName, array< iLuxEntity @> &inout avOutEntities, eLuxEntityType aEntityType=eLuxEntityType_LastEnum)
Returns an array of entities with a given name.
Returns: true if any entities found
cLuxProp Map_GetProp(const tString &in asName, const tString &in asClass="")
Returns the prop with the given name.
Returns: cLuxProp @, the requested prop, or null if the prop was not found.
iLight Map_GetLight(const tString &in asName)
Returns a light with the given name.
Returns: iLight @, the requested light
array < cSoundEntity @> Map_GetSoundEntityArray(const tString &in asName, array< cSoundEntity @> &inout avOutSoundEntities)
Creates an array of sound entities with a given name.
Returns: array< cSoundEntity >, array of sound entities found.
tID Map_GetEntityID(const tString &in asName, eLuxEntityType aType=eLuxEntityType_LastEnum, const tString &in asClass="")
Returns the entity with the given name.
Returns: tID , the id to the prop, tID_Invalid returned if not found
tID Map_GetPropID(const tString &in asName, const tString &in asClass="")
Returns the prop with the given name.
Returns: tID , the id to the prop, tID_Invalid returned if not found
array < tID > Map_GetLensFlareIDArray(const tString &in asName, array< tID > &inout avOutLensFlares)
Creates an array of lens flares with a given name.
Returns: array<tID>, array of id to lens flares found.
array < tID > Map_GetSoundEntityIDArray(const tString &in asName, array< tID > &inout avOutSoundEntities)
Creates an array of sound entities with a given name.
Returns: array<tID>, array of id to sound entities found.
array < tID > Map_GetParticleSystemIDArray(const tString &in asName, array< tID > &inout avOutParticles)
Creates an array of particle systems with a given name.
Returns: array<tID>, array of id to particle systems found.
void Map_ChangeMap(const tString &in asMapName, const tString &in asStartPos, const tString &in asStartSound, const tString &in asEndSound)
Changes the active map to the one specified.
void Map_ChangeMap(const tString &in asMapName, const tString &in asStartPos, const tString &in asTransferArea, const tString &in asStartSound, const tString &in asEndSound)
Changes the active map to the one specified.
void Map_Preload(const tString &in asMapName, eWorldStreamPriority aPrio=eWorldStreamPriority_Normal)
Starts loading in assets for the next map
void Map_SetPreloadPriority(eWorldStreamPriority aPrio)
Prioirty of background download thread
cLuxMap Map_GetPreloadMap()
Returns the map that is currently being preloaded
void Map_Deload(const tString &in asTransferArea="")
Deloads the objects in the current map
void Map_FadeOut(float afTime)
Fades out the screen and all the sounds. Should be called some second before calling change map
bool Map_IsChanging()
Returns if a map change is occuring
bool Map_IsPreloading()
Returns if a map is being streamed in
bool Map_IsPreloadCompleted()
Returns if the map has been fully preloaded
void Map_SetInteractionWhiteListActive(bool abActive, bool abClearList)
Disables interaction on all entities that are not on the white list
void Map_AddEntityToInteractionWhiteList(const tString &in asName)
Adds an entity to the white list, meaning that is can be intereacted with
void Map_CheckLineOfSight(const tString &in asCallbackFunc, const cVector3f &in avStart, const cVector3f &in avEnd, bool abCheckOnlyShadowCasters, bool abCheckOnlyStatic)
Checks if the line of sight between two positions is clear
void Map_GetClosestEntity(const tString &in asCallbackFunc, const cVector3f &in avStart, const cVector3f &in avDir, float afRayLength, int alInteractType, bool abCheckLineOfSight)
Returns the closest entity in direction
void Map_GetClosestBody(const tString &in asCallbackFunc, const cVector3f &in avStart, const cVector3f &in avDir, float afRayLength)
Returns the closest body in direction
void Map_GetClosestCharCollider(const tString &in asCallbackFunc, const cVector3f &in avStart, const cVector3f &in avDir, float afRayLength, bool abCheckDynamic)
Returns the closest physics body that can collide with a character
void Map_GetLightLevelAtPos(const tString &in asCallbackFunc, const cVector3f &in avPos, iLight @apSkipLight=null, float afRadiusAdd=0.25)
Get how bright the position of the map is
void Visibility_SetAreaActive(const tString &in asName, bool abActive)
Set if visibility area is active (visible) or not.
void Visibility_SetMainActive(bool abActive)
Set if the main visiblity area should be active
void Visibility_SetTerrainActive(bool abActive)
Set if the terrain should be visible area should be active
void Decal_SetVisibleInArea(bool abVisible, const cVector3f &in avMin, const cVector3f &in avMax, array< tString > avMaterials)
Sets visiblity of all decals with material in the area
void Decal_SetVisibleInArea(bool abVisible, const tString &in asArea, array< tString > avMaterials)
Sets visiblity of all decals with material in the area
void Decal_SetVisibleInArea(bool abVisible, const tString &in asArea, tString asMaterial)
Sets visiblity of all decals with material in the area