arange a celestial body...

All about writing scripts for Celestia in Lua and the .cel system
Topic author
rifl
Posts: 13
Joined: 12.02.2005
With us: 19 years 9 months
Location: Europa, Austria, the Tyrol, Ebbs
Contact:

arange a celestial body...

Post #1by rifl » 18.02.2005, 15:07

Hi, I've a question (once more :D)

Also... fore example I write in a celscript this:

select { object "Sol/Mercury" }
follow { }
gotoloc { time 3 position [ 0 0 20000 ] xrot 0 yrot 0 zrot 0 }
print { text "Watch the sun, while we orbiting mercury" origin "bottomleft" row -3 column 0 duration 3 }
orbit { axis [ 0 1 0 ] rate 30 duration 16 }
wait { duration 2 }


so the planet is in center Is it possible to move the planet for example in the right or left corner? (ore somewhere else)

Please write me the commands -. i think its possible with setposition(), but thats time based, i think - when im in another year I wouldn't found the planet....

Propably its the gotoloc() command, but i didn't know how to use it. right....

And... when I want to use the setposition(), how can I find out my actual position in celestia to use it then in the script??

Please help, thanks rifl
every computer is only as stupid as his user ;) :D

Bob Hegwood
Posts: 1048
Joined: 19.10.2003
With us: 21 years
Location: Germantown, Ohio - USA

Post #2by Bob Hegwood » 19.02.2005, 03:54

rifl,

My computer's acting *really* strange of late, but the following code is
what you want, I think...

Play around with the "xrot" value until you see the Sun revolving around
Mercury while you're orbiting it.

I had this working fine, but I'm afraid that my computer is just about to
die now, so I can't be certain that this will work on your system.

Also, if you'd like a better description of the cel scripting commands, you
can find very helpful manuals on the Motherlode.

Hope this helps.

Take care, Bob

{
select {object "Sol/Mercury"}
goto {time 5.0 distance 10.0}
wait {duration 5.0}
follow {}
gotoloc {time 10.0 position [12440 12440 12440] xrot 36 yrot -55 zrot -35}
wait {duration 10.0}
follow {}
print {text "Watch the sun, while we're orbiting Mercury" row -3 column 1 duration 4.0}
wait {duration 4.0}
orbit {axis [ 0 1 0 ] rate 30 duration 25.0}
wait {duration 25.0}
timerate {rate 1.0}
}
Bob Hegwood
Windows XP-SP2, 256Meg 1024x768 Resolution
Intel Celeron 1400 MHz CPU
Intel 82815 Graphics Controller
OpenGL Version: 1.1.2 - Build 4.13.01.3196
Celestia 1.4.0 Pre6 FT1

DoubleAught
Posts: 4
Joined: 01.03.2005
With us: 19 years 8 months

Post #3by DoubleAught » 05.03.2005, 04:49

Thanks Mr. Hegwood.
I don't know if it was what the original poster was looking to for,
but it certainly helped me.
I'm struggling with scripting, and in absence of a VERY high
programming language or GUI .....(yes, I'm a 'drag & drop' imbecile)
I am reduced to 'cut, copy and pasting' bits and pieces of other people's
scripts, taking no credit for their creation of course.
AutoPilot is a respectable effort but seems to be fixated on the horizon
whenever movement is involved. CtrlCScript is a little unwieldy, but still infinitely better than anything I could ever come up with.
In the meantime.......
thanks again

Bob Hegwood
Posts: 1048
Joined: 19.10.2003
With us: 21 years
Location: Germantown, Ohio - USA

Post #4by Bob Hegwood » 05.03.2005, 15:37

Well, I'm glad it helped somebody...

Thanks for the thanks. :wink:

Take care, Bob
Bob Hegwood

Windows XP-SP2, 256Meg 1024x768 Resolution

Intel Celeron 1400 MHz CPU

Intel 82815 Graphics Controller

OpenGL Version: 1.1.2 - Build 4.13.01.3196

Celestia 1.4.0 Pre6 FT1


Return to “Scripting”