Celestia/Celx Scripting/CELX Lua Methods/CEL command setsurface

setsurface
setsurface { name  } 

Allows you to define an alternate surface texture for the currently selected object. An alternate texture must first be defined in the solarsys.ssc file for the object in question.

For example, if you want to create an alternate surface texture for Earth, called "Earth-2", and it's related texture filename is earth2.jpg, you would add the following entry to the solarsys.ssc file, after the closing brace for the ' "Earth" "Sol" ' entry:

AltSurface "Earth-2" "Sol/Earth" { Texture "earth2.jpg" }

CELX equivalent:

Based on the observer:setsurface method.


 * Get observer instance of the active view and set the currently used surface.  is the name of the surface to be used.

obs = celestia:getobserver obs:setsurface(  )

Example: To use the built-in Celestia "limit of knowledge" textures, instead of the interpretive ones, use:

CEL:

setsurface { name "limit of knowledge" }

CELX: with the observer:setsurface method.

obs = celestia:getobserver obs:setsurface("limit of knowledge")

Example: To use the "Earth-2" texture, as mentioned above, use:

CEL:

setsurface { name "Earth-2" }

CELX: with the observer:setsurface method.

obs = celestia:getobserver obs:setsurface("Earth-2")

Back to CEL command index