Celestia/Celx 指令碼/CELX Lua 方法/CEL 命令 select
外觀
select { object <string> }
選擇指定的物體 <string> 以便對其執行其他命令。
引數
- object <string>
- 行星、衛星、小行星、彗星、星系、航天器等的名稱。無預設值。
如果您當前的位置在太陽系 **之外**,並且想要選擇太陽系 **內部** 的物體,
您必須在 <string> 中包含 “Sol/”(我們太陽的名稱)。
CELX 等效
基於 celestia:select() 方法;
- 找到名稱為 <string> 的物體,該物體必須被選中並存儲在 "objectname" 中。
objectname = celestia:find( <string> )
- 使用 celestia:select() 方法選擇 "objectname"。
celestia:select(objectname)
總結
objectname = celestia:find( <string> ) celestia:select(objectname)
示例-1
選擇恆星畢宿五。
CEL
select { object "Aldebaran" }
CELX 與 celestia:select() 方法
aldebaran = celestia:find("Aldebaran")
celestia:select(aldebaran)
示例-2
在 **太陽系** **內** 選擇行星火星
CEL
select { object "Mars" }
CELX 與 celestia:select() 方法
mars = celestia:find("Mars")
celestia:select(mars)
示例-3
在 **太陽系** **內** 或 **外** 選擇行星火星
CEL
select { object "Sol/Mars" }
CELX 與 celestia:select() 方法
mars = celestia:find("Sol/Mars")
celestia:select(mars)