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

setradius
setradius { object  radius   } 

Set the new radius of an object.

CELX equivalent:

Based on the object:setradius method.


 * Find the object with name  and store in object

object = celestia:find()


 * Set the radius of object to  km.

object:setradius()

Summarized:

object = celestia:find() object:setradius()

Example: Make the radius of the Earth 20 times bigger and then make the radius of the Moon as big as the new radius of Earth.

CEL:

setradius { object "Sol/Earth" radius 127562 } setradius { object "Sol/Earth/Moon" radius 127562 }

CELX:

object1 = celestia:find("Sol/Earth") robject1 = object1:radius object2 = celestia:find("Sol/Earth/Moon") object1:setradius(20*robject1) robject1 = object1:radius object2:setradius(robject1)

Back to CEL command index