Disabling Orbit Flags in .cel Scripts

All about writing scripts for Celestia in Lua and the .cel system
Topic author
starforce84
Posts: 9
Joined: 02.04.2007
With us: 17 years 7 months

Disabling Orbit Flags in .cel Scripts

Post #1by starforce84 » 04.05.2007, 16:58

Probably a stupid question, but ...

I have a .cel script I've written, and I want to show the planet orbits but not the orbits of spacecraft, comets, and asteroids.

I can manually go into View Options and turn on and off the orbits I want displayed. I can do

Code: Select all

renderflags {clear "orbits"}
to clear ALL of the orbits and "set" to turn back on the ones I have selected in View Options, and I can clear labels with the

Code: Select all

labels {clear ""}
command.

But is there a way, within a .cel script, to turn off individual orbit options like you can manually do in the View Options window?

Thank you!

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 10 months
Location: Nancy, France

Post #2by Vincent » 04.05.2007, 17:58

As an example, you can use the following code to display orbits for planets and moons in a CEL script:

Code: Select all

{
orbitflags { set "Planet|Moon" }
}


Here are all the orbitflags that are currently available:
Planet
Moon
Asteroid
Comet
Spacecraft
Invisible
Unknown
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Topic author
starforce84
Posts: 9
Joined: 02.04.2007
With us: 17 years 7 months

Post #3by starforce84 » 04.05.2007, 18:40

I'd never heard of that flag, nor had I seen it anywhere in any of the "help" I read. That's exactly what I was after, though.

Thank you!


Return to “Scripting”