Marking an object in CELX

All about writing scripts for Celestia in Lua and the .cel system
Topic author
rickindy
Posts: 22
Joined: 21.02.2003
With us: 21 years 9 months

Marking an object in CELX

Post #1by rickindy » 27.11.2005, 14:13

I know I've missed something covered by the docs, but I'm having problems marking an object. Here's the code I have:

observer = celestia:getobserver()
mars = celestia:find("Sol/Mars")
observer:center(mars)
wait(6)
mars:mark("#FFFF00", "x", 20 )
mars:unmark()

Mars gets selected and centerered.
I have tried what I think are all the combinations of color strings and marking symbols, but Mars doesn't get marked.

What have I missed?

Thanks in advance for the help!
Few problems in life can't be solved by chocolate

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #2by selden » 27.11.2005, 14:26

I think you need to insert a "wait" between the mark and unmark calls. As it is, you're immediately removing the mark before Celestia has had a chance to update the screen even once.
Selden

Topic author
rickindy
Posts: 22
Joined: 21.02.2003
With us: 21 years 9 months

Post #3by rickindy » 27.11.2005, 14:55

I am such a DOOFUS!

I knew that if you suggested something, it should work (I am aware of your reputation). I put in the wait and still no marker.

I looked at the rendering options and I had markers turned off.

(smacks forehead)

Thanks so much!
Few problems in life can't be solved by chocolate


Return to “Scripting”