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

select
select { object  } 

Selects the specified object  in order to perform other commands on it.

CELX equivalent:

Based on the celestia:select method;


 * Find an object with name  which must be selected and store in "objectname".

objectname = celestia:find(  )


 * Use celestia:select method to select "objectname".

celestia:select(objectname)

Summarized:

objectname = celestia:find(  ) celestia:select(objectname)

Example-1: Select the star Aldebaran.

CEL:

select { object "Aldebaran" }

CELX with the celestia:select method:

aldebaran = celestia:find("Aldebaran") celestia:select(aldebaran)

Example-2: Select planet Mars when in our Solar System:

CEL:

select { object "Mars" }

CELX with the celestia:select method:

mars = celestia:find("Mars") celestia:select(mars)

Example-3: Select planet Mars when in or outside our Solar System:

CEL:

select { object "Sol/Mars" }

CELX with the celestia:select method:

mars = celestia:find("Sol/Mars") celestia:select(mars)

Back to CEL command index