ScriptBind_System

CreateDownload

System.CreateDownload()

LoadFont

Loads a font.

System.LoadFont(pszName)
ParameterDescription
pszNameFont name.

ExecuteCommand

Executes a command.

System.ExecuteCommand(szCmd)
ParameterDescription
szCmdCommand string.

LogToConsole

Logs a message to the console.

System.LogToConsole(sText)
ParameterDescription
sTextText to be logged.

ClearConsole

Clears the console.

System.ClearConsole()

Log

Logs a message.

System.Log(sText)
ParameterDescription
sTextText to be logged.

LogAlways

Logs important data that must be printed regardless verbosity.

System.LogAlways(sText)
ParameterDescription
sTextText to be logged.

Warning

Shows a message text with the warning severity.

System.Warning(sText)
ParameterDescription
sTextText to be logged.

Error

Shows a message text with the error severity.

System.Error(sText)
ParameterDescription
sTextText to be logged.

IsEditor

Checks if the system is the editor.

System.IsEditor()

IsEditing

Checks if the system is in pure editor mode, i.e. not editor game mode.

System.IsEditing()

GetCurrTime

Gets the current time.

System.GetCurrTime()

GetCurrAsyncTime

Gets the current asynchronous time.

System.GetCurrAsyncTime()

GetFrameTime

Gets the frame time.

System.GetFrameTime()

GetLocalOSTime

Gets the local operating system time.

System.GetLocalOSTime()

GetUserName

Gets the username on this machine.

System.GetUserName()

ShowConsole

Shows/hides the console.

System.ShowConsole(nParam)
ParameterDescription
nParam1 to show the console, 0 to hide.

CheckHeapValid

Checks the heap validity.

System.CheckHeapValid(name)
ParameterDescription
nameName string.

GetConfigSpec

Gets the config specification.

System.GetConfigSpec()

IsMultiplayer

Checks if the game is multiplayer.

System.IsMultiplayer()

GetEntity

Gets an entity from its ID.

System.GetEntity(entityId)
ParameterDescription
entityIdEntity identifier.

GetEntityClass

Gets an entity class from its ID.

System.GetEntityClass(entityId)
ParameterDescription
entityIdEntity identifier.

PrepareEntityFromPool

Prepares the given bookmarked entity from the pool, bringing it into existence.

System.PrepareEntityFromPool(entityId)
ParameterDescription
entityIdEntity identifier.
bPrepareNow(optional) Specifies whether the pooled entity shall be prepared immediately rather than queuing a request in case there is a preparation already in progress.

ReturnEntityToPool

System.ReturnEntityToPool(entityId)
Returns: the bookmarked entity to the pool, destroying it.
ParameterDescription
entityIdEntity identifier.

ResetPoolEntity

Resets the entity's bookmarked, which frees memory.

System.ResetPoolEntity(entityId)
ParameterDescription
entityIdEntity identifier.

GetEntities

Gets all the entities contained in the specific area of the level.

System.GetEntities(center, radius)
ParameterDescription
centerCenter position vector for the area where to get entities.
radiusRadius of the area.

GetEntitiesByClass

Gets all the entities of the specified class.

System.GetEntitiesByClass(EntityClass)
ParameterDescription
EntityClassEntity class name.

GetEntitiesInSphere

Gets all the entities contained into the specified sphere.

System.GetEntitiesInSphere( centre, radius )
ParameterDescription
centreCentre position vector for the sphere where to look at entities.
radiusRadius of the sphere.

GetEntitiesInSphereByClass

Gets all the entities contained into the specified sphere for the specific class name.

System.GetEntitiesInSphereByClass( centre, radius, EntityClass )
ParameterDescription
centreCentre position vector for the sphere where to look at entities.
radiusRadius of the sphere.
EntityClassEntity class name.

GetPhysicalEntitiesInBox

Gets all the entities contained into the specified area.

System.GetPhysicalEntitiesInBox( centre, radius )
ParameterDescription
centreCentre position vector for the area where to look at entities.
radiusRadius of the sphere.

GetPhysicalEntitiesInBoxByClass

Gets all the entities contained into the specified area for the specific class name.

System.GetPhysicalEntitiesInBoxByClass( centre, radius, className )
ParameterDescription
centreCentre position vector for the area where to look at entities.
radiusRadius of the sphere.
classNameEntity class name.

GetNearestEntityByClass

Gets the nearest entity with the specified class.

System.GetNearestEntityByClass( centre, radius, className )
ParameterDescription
centreCentre position vector for the area where to look at entities.
radiusRadius of the sphere.
classNameEntity class name.

GetEntityByName

Retrieve entity table for the first entity with specified name. If multiple entities with same name exist, first one found is returned.

System.GetEntityByName( sEntityName )
ParameterDescription
sEntityNameName of the entity to search.

GetEntityIdByName

Retrieve entity Id for the first entity with specified name. If multiple entities with same name exist, first one found is returned.

System.GetEntityIdByName( sEntityName )
ParameterDescription
sEntityNameName of the entity to search.

DrawLabel

Draws a label with the specified parameter.

System.DrawLabel( vPos, fSize, text [, r [, g [, b [, alpha]]]] )
ParameterDescription
vPosPosition vector.
fSizeSize for the label.
textText of the label.
rRed component for the label colour. Default is 1.
gGreen component for the label colour. Default is 1.
bBlue component for the label colour. Default is 1.
alphaAlpha component for the label colour. Default is 1.

DeformTerrain

Deforms the terrain.

System.DeformTerrain()

DeformTerrainUsingMat

Deforms the terrain using material.

System.DeformTerrainUsingMat()

ApplyForceToEnvironment

Applies a force to the environment.

System.ApplyForceToEnvironment( pos, force, radius)
ParameterDescription
posPosition of the force.
forceStrength of the force.
radiusArea where the force has effects.

ScreenToTexture

System.ScreenToTexture()

DrawTriStrip

Draws a triangle strip.

System.DrawTriStrip(handle, nMode, vtxs, r, g, b, alpha )
ParameterDescription
handle.
nMode.
vtx.
rRed component for the label color. Default is 1.
gGreen component for the label color. Default is 1.
bBlue component for the label color. Default is 1.
alphaAlpha component for the label color. Default is 1.

DrawLine

Draws a line.

System.DrawLine( p1, p2, r, g, b, alpha )
ParameterDescription
p1Start position of the line.
p2End position of the line.
rRed component for the label color. Default is 1.
gGreen component for the label color. Default is 1.
bBlue component for the label color. Default is 1.
alphaAlpha component for the label color. Default is 1.

Draw2DLine

Draws a 2D line.

System.Draw2DLine(p1x, p1y, p2x, p2y, r, g, b, alpha )
ParameterDescription
p1xX value of the start point of the line.
p1yY value of the start point of the line.
p2xX value of the end point of the line.
p2yY value of the end point of the line.
rRed component for the label color. Default is 1.
gGreen component for the label color. Default is 1.
bBlue component for the label color. Default is 1.
alphaAlpha component for the label color. Default is 1.

DrawText

Draws text.

System.DrawText( x, y, text, font, size, p2y, r, g, b, alpha )
ParameterDescription
xX position for the text.
yY position for the text.
textText to be displayed.
fontFont name.
sizeText size.
rRed component for the label color. Default is 1.
gGreen component for the label color. Default is 1.
bBlue component for the label color. Default is 1.
alphaAlpha component for the label color. Default is 1.

SetGammaDelta

Sets the gamma/delta value.

System.SetGammaDelta( fDelta )
ParameterDescription
fDeltaDelta value.

SetPostProcessFxParam

Sets a post processing effect parameter value.

System.SetPostProcessFxParam( pszEffectParam, value )
ParameterDescription
pszEffectParamParameter for the post processing effect.
valueValue for the parameter.

GetPostProcessFxParam

Gets a post processing effect parameter value.

System.GetPostProcessFxParam( pszEffectParam, value )
ParameterDescription
pszEffectParamParameter for the post processing effect.
valueValue for the parameter.

SetScreenFx

Sets a post processing effect parameter value.

System.SetScreenFx( pszEffectParam, value )
ParameterDescription
pszEffectParamParameter for the post processing effect.
valueValue for the parameter.

GetScreenFx

Gets a post processing effect parameter value.

System.GetScreenFx( pszEffectParam, value )
ParameterDescription
pszEffectParamParameter for the post processing effect.
valueValue for the parameter.

SetCVar

Sets the value of a CVariable.

System.SetCVar( sCVarName, value )
ParameterDescription
sCVarNameName of the variable.
valueValue of the variable.

GetCVar

Gets the value of a CVariable.

System.GetCVar( sCVarName)
ParameterDescription
sCVarNameName of the variable.

AddCCommand

Adds a C command to the system.

System.AddCCommand( sCCommandName, sCommand, sHelp)
ParameterDescription
sCCommandNameC command name.
sCommandCommand string.
sHelpHelp for the command usage.

SetScissor

Sets scissor info.

System.SetScissor( x, y, w, h )
ParameterDescription
xX position.

GetSystemMem

Gets the amount of the memory for the system.

System.GetSystemMem()

IsPS20Supported

Checks if the PS20 is supported.

System.IsPS20Supported()

IsHDRSupported

Checks if the HDR is supported.

System.IsHDRSupported()

SetBudget

Sets system budget.

System.SetBudget(sysMemLimitInMB, videoMemLimitInMB, frameTimeLimitInMS, soundChannelsPlayingLimit, soundMemLimitInMB, numDrawCallsLimit )
ParameterDescription
sysMemLimitInMBLimit of the system memory in MB.
videoMemLimitInMBLimit of the video memory in MB.
frameTimeLimitInMSLimit in the frame time in MS.
soundChannelsPlayingLimitLimit of the sound channels playing.
soundMemLimitInMBLimit of the sound memory in MB.
numDrawCallsLimitLimit of the draw calls.

SetVolumetricFogModifiers

Sets the volumetric fog modifiers.

System.SetVolumetricFogModifiers( gobalDensityModifier, atmosphereHeightModifier )
ParameterDescription
gobalDensityModifierModifier for the global density.
atmosphereHeightModifierModifier for the atmosphere height.

SetWind

Sets the wind direction.

System.SetWind( vWind )
ParameterDescription
vWindWind direction.

GetWind

Gets the wind direction.

System.SetWind()

GetSurfaceTypeIdByName

Gets the surface type identifier by its name.

System.GetSurfaceTypeIdByName( surfaceName )
ParameterDescription
surfaceNameSurface name.

GetSurfaceTypeNameById

Gets the surface type name by its identifier.

System.GetSurfaceTypeNameById( surfaceId )
ParameterDescription
surfaceIdSurface identifier.

RemoveEntity

Removes the specified entity.

System.RemoveEntity( entityId )
ParameterDescription
entityIdEntity identifier.

SpawnEntity

Spawns an entity.

System.SpawnEntity( params )
ParameterDescription
paramsEntity parameters.

ActivateLight

NOT SUPPORTED ANYMORE.

System.ActivateLight(name, activate)

SetWaterVolumeOffset

SetWaterLevel is not supported by 3dengine for now.

System.SetWaterVolumeOffset()

IsValidMapPos

Checks if the position is a valid map position.

System.IsValidMapPos( v )
ParameterDescription
vPosition vector.

EnableMainView

Feature unimplemented.

System.EnableMainView()

EnableOceanRendering

Enables/disables ocean rendering.

System.EnableOceanRendering()
ParameterDescription
bOceanTrue to activate the ocean rendering, false to deactivate it.

ScanDirectory

Scans a directory.

System.ScanDirectory( pszFolderName, nScanMode )
ParameterDescription
pszFolderNameFolder name.
nScanModeScan mode for the folder. Can be: SCANDIR_ALL SCANDIR_FILES SCANDIR_SUBDIRS

DebugStats

System.DebugStats( cp )

ViewDistanceSet

Sets the view distance.

System.ViewDistanceSet( fViewDist )
ParameterDescription
fViewDistView distance.

ViewDistanceGet

Gets the view distance.

System.ViewDistanceSet()

GetOutdoorAmbientColor

Gets the outdoor ambient color.

System.GetOutdoorAmbientColor()

SetOutdoorAmbientColor

Sets the outdoor ambient color.

System.GetOutdoorAmbientColor( v3Color )
ParameterDescription
v3ColorOutdoor ambient color value.

GetTerrainElevation

Gets the terrain elevation of the specified position.

System.GetTerrainElevation( v3Pos )
ParameterDescription
v3PosPosition of the terraint to be checked.

ActivatePortal

Activates/deactivates a portal.

System.ActivatePortal( vPos, bActivate, nID )
ParameterDescription
vPosPosition vector.
bActivateTrue to activate the portal, false to deactivate.
nIDEntity identifier.

DumpMMStats

Dumps the MM statistics.

System.DumpMMStats()

EnumAAFormats

Enumerates the AA formats.

System.EnumAAFormats( m_Width, m_Height, m_BPP )

EnumDisplayFormats

Enumerates display formats.

System.EnumDisplayFormats()

IsPointIndoors

Checks if a point is indoors.

System.IsPointIndoors( vPos )
ParameterDescription
vPosPosition vector.

SetConsoleImage

Sets the console image.

System.SetConsoleImage( pszName, bRemoveCurrent )
ParameterDescription
pszNameTexture image.
bRemoveCurrentTrue to remove the current image, false otherwise.

ProjectToScreen

Projects to the screen (not guaranteed to work if used outside Renderer).

System.ProjectToScreen( vec )
ParameterDescription
vecPosition vector.

EnableHeatVision

Is not supported anymore.

System.EnableHeatVision()

ShowDebugger

Shows the debugger.

System.ShowDebugger()

DumpMemStats

Dumps memory statistics.

System.DumpMemStats( bUseKB )
ParameterDescription
bUseKBTrue to use KB, false otherwise.

DumpMemoryCoverage

Dumps memory coverage.

System.DumpMemoryCoverage( bUseKB )

ApplicationTest

Test the application with the specified parameters.

System.ApplicationTest( pszParam )
ParameterDescription
pszParamParameters.

QuitInNSeconds

Quits the application in the specified number of seconds.

System.QuitInNSeconds( fInNSeconds )
ParameterDescription
fInNSecondsNumber of seconds before quitting.

DumpWinHeaps

Dumps windows heaps.

System.DumpWinHeaps()

Break

Breaks the application with a fatal error message.

System.Break()

SetViewCameraFov

Sets the view camera fov.

System.SetViewCameraFov( fov )

GetViewCameraFov

Gets the view camera fov.

System.GetViewCameraFov()

IsPointVisible

Checks if the specified point is visible.

System.IsPointVisible( point )
ParameterDescription
pointPoint vector.

GetViewCameraPos

Gets the view camera position.

System.GetViewCameraPos()

GetViewCameraDir

Gets the view camera direction.

System.GetViewCameraDir()

GetViewCameraUpDir

Gets the view camera up-direction.

System.GetViewCameraUpDir()

GetViewCameraAngles

Gets the view camera angles.

System.GetViewCameraAngles()

RayWorldIntersection

Shots rays into the world.

System.RayWorldIntersection(vPos, vDir, nMaxHits, iEntTypes)
ParameterDescription
vPosPosition vector.
vDirDirection vector.
nMaxHitsMaximum number of hits.
iEntTypes.

RayTraceCheck

System.RayTraceCheck(src, dst, skipId1, skipId2)

BrowseURL

Browses a URL address.

System.BrowseURL(szURL)
ParameterDescription
szURLURL string.

IsDevModeEnable

Checks if game is running in dev mode (cheat mode) to check if we are allowed to enable certain scripts function facilities (god mode, fly mode etc.).

System.IsDevModeEnable()

SaveConfiguration

Saves the configuration.

System.SaveConfiguration()

Quit

Quits the program.

System.Quit()

GetHDRDynamicMultiplier

Gets the HDR dynamic multiplier.

System.GetHDRDynamicMultiplier()

SetHDRDynamicMultiplier

Sets the HDR dynamic multiplier.

System.SetHDRDynamicMultiplier( fMul )
ParameterDescription
fMulDynamic multiplier value.

GetFrameID

Gets the frame identifier.

System.GetFrameID()

ClearKeyState

Clear the key state.

System.ClearKeyState()

SetSunColor

Set color of the sun, only relevant outdoors.

System.SetSunColor( vColor )
ParameterDescription
vColorSun Color as an {x,y,z} vector (x=r,y=g,z=b).

GetSunColor

Retrieve color of the sun outdoors.

Vec3 System.GetSunColor()
Returns: Sun Color as an {x,y,z} vector (x=r,y=g,z=b).

SetSkyColor

Set color of the sky (outdoors ambient color).

System.SetSkyColor( vColor )
ParameterDescription
vColorSky Color as an {x,y,z} vector (x=r,y=g,z=b).

GetSkyColor

Retrieve color of the sky (outdoor ambient color).

Vec3 System.GetSkyColor()
Returns: Sky Color as an {x,y,z} vector (x=r,y=g,z=b).

SetSkyHighlight

Set Sky highlighing parameters. Highligh Params Meaning <hruler /> size Sky highlight scale. color Sky highlight color. direction Direction of the sky highlight in world space. pod Position of the sky highlight in world space.

System.SetSkyHighlight( params )
ParameterDescription
paramsTable with Sky highlighing parameters.

GetSkyHighlight

Retrieves Sky highlighing parameters. see SetSkyHighlight for parameters description.

System.SetSkyHighlight( params )

LoadLocalizationXml

Loads Excel exported xml file with text and dialog localization data.

System.LoadLocalizationXml( filename )