scene

 Function Name  Parameter  Return  Explain
getBkColor None dword  
setBkColor dword None  
getBkImage None number  
setBkImage number None  
getAmbientColor None dword  
setAmbientColor dword None  
exposeLightmap number expose,
[number brightr]
None expose: Control the lighting data conversion from FLOAT to BYTE.
brightr: Brightness rectification, adjust the lightmap images brightness.
see: Light Map Options
remark: you should check Save Float Data in Light Map Options to use this function.
getFogColor None dword  
setFogColor dword None  
getFogMode None number Retrieves the fog mode.

Return Values

FOG_NONE : No fog effect
FOG_EXP : Fog effect intensifies exponentially
FOG_EXP2 : Fog effect intensifies exponentially with the square of the distance
FOG_LINEAR : Fog effect intensifies linearly between the start and end points

setFogMode number None  
getFogParams None number
start, end, density
 
setFogParams number
start, end, density
None  
getVPScale None number
xscale, yscale,
VPScale = (window size) / (stand viewport size)
       
createLight None light return nil if failed
deleteLight light boolean  
getLightsHead None dword  
getLightsNext dword light light
dword
pos
 
       
createMobile string filename mobile load a model file (.tri) and create mobile object. return nil if failed
createSkinMesh string filename skinmesh load a model file (.tri) and create skinmesh object.
return nil if failed
createCloth None cloth create cloth object. return nil if failed
deleteMobile movable boolean you cann't delete fixed mobile; because it's static.
getMobilesHead None dword  
getMobilesNext dword movable mov
dword pos
string type
if type is 'mobile', then mov is mobile
if type is 'skinmesh' then mov is skinmesh
if type is 'cloth' then mov is cloth
if type is 'group' then mov is movgroup
       
createText2D None text2d return nil if failed
createImage2D None image2d return nil if failed
deleteOverlay overlay boolean  
getOverlaysHead None dword  
getOverlaysNext dword overlay over
dword pos
string type
if type is 'text2d', then over is text2d
if type is 'image2d' then over is image2d
       
createBillboard None billboard return nil if failed
createParticles None particles return nil if failed
buildSpot surface surf,
vec vOfs,
number fRadius,
dword
dwColor,
boolean bLightmap
number fEmboss
spot build a spot on surface. return nil if failed.

Parameters

surf: surface object
vOfs: offset to surface's lightmap origin, determine spot's position
fRadius: determine spot's size
dwColor: spot's color
bLightmap: whether turn on lightmap for spot
fEmboss: offset along surface's normal

deleteEffect effect boolean  
getEffectsHead None dword  
getEffectsNext dword effect eff
dword pos
string type
if type is 'billboard', then eff is billboard
if type is 'particles' then eff is particles
if type is 'spot' then eff is spot
       
getStaticMeshHead None dword  
getStaticMeshNext dword staticmesh smesh
dword
pos
 
       
getSurfacesHead None dword  
getSurfacesNext dword surface surf
dword
pos
 
       
createTerrain None terrain return nil if failed
getTerrainsHead None dword  
getTerrainsNext dword terrain ter
dword
pos
 
       
createOcean None ocean return nil if failed
getOceansHead None dword  
getOceansNext dword ocean ocean
dword
pos
 
       
createMaterial [ string name ] material return nil if failed
deleteMaterial material boolean  
getMaterialsHead None dword  
getMaterialsNext dword material mater
dword
pos
 
       
createBonesAni string filename bonesani load a bones animation file (.ani) and create bonesani object.
return nil if failed
deleteBonesAni bonesani boolean  
getBonesAniHead None dword  
getBonesAniNext dword bonesani ba
dword
pos
 
       
createTexturePlay None textureplay return nil if failed
deleteTexturePlay textureplay boolean  
getTexturePlayHead None dword  
getTexturePlayNext dword textureplay tp
dword
pos
 
       
createMovTar None movtar return nil if failed
deleteMovTar movtar boolean  
getMovTarHead None dword  
getMovTarNext dword movtar mt
dword
pos
 
trace trace None  
       
createPost [ string name ] post create a post
deletePost post boolean  
getPostsHead None dword  
getPostsNext dword post post
dword
pos
 
       
createShot [ string name ] shot create a shot
getShotsHead None dword  
getShotsNext dword shot shot
dword
pos
 

Remark

Example : list all movable objects

print('type','name')
print('--------------------')
local pos=scene.getMobilesHead()
while (pos) do
    local mov,typename
    mov,pos,typename=scene.getMobilesNext(pos)
    if (mov) then
        print(typename,mov.getName())
    end
end