Hi,
I suggest having the two versions of your spacecraft in your stc file.
First and default version with the declaration
Visible trueand the second version with the declaration
Visible falseThis way only one is visible at the same time.
Now a simple script can switch the visibility of the two objects.
This relies on the object methods visible() and setvisible() available for celestia version 1.6 and later.
for example:
Code: Select all
spacecraft1=celestia:find("Sol/Earth/Spacedock/USS Enterprise")
spacecraft2=celestia:find("Sol/Earth/Spacedock/USS Enterprise2")
spacecraft1:setvisible(not spacecraft1:visible())
spacecraft2:setvisible(not spacecraft2:visible())