My First script for use in displaying Galactic Treasures.

All about writing scripts for Celestia in Lua and the .cel system
Topic author
Bob Hegwood
Posts: 1048
Joined: 19.10.2003
With us: 20 years 8 months
Location: Germantown, Ohio - USA

My First script for use in displaying Galactic Treasures.

Post #1by Bob Hegwood » 19.10.2003, 06:00

The following is a large script, only because it's use is to display some (a lot) of the great galactic treasures you people have made available to me via the net. Since I don't have a URL for use in downloading the script, I just thought I'd copy it here and let you criticize it, copy it, modify it and whatever else you'd like to do to it. Simply select the script and copy it via notepad to your pc.

Please be aware that I'm using Windows XP at an 800x 600 resolution since I don't see very well. Also, keep in mind that this script will *NOT* work if you do not have the appropriate textures, models, dsc and stc files etc. in the appropriate Celestia directories. Please be aware also that I'm using Celestia 1.3.0 on my system.

Please be kind. This is my FIRST script, and I love watching this show on my PC. Many, many thanks to Chris Laurel, Fridger Schremp, Rassilon, Grant Hutchison, and Mike M for the original textures, models, etc.

#--------------------------------------------------------------------
# Display Collected Nebulae/Objects in a Galactic Tour.
#--------------------------------------------------------------------
#
# Written by Bob Hegwood on 4 Oct 03 - BobHegwood@earthlink.net
#
# The purpose of this script is to display some of the interesting
# Galactic objects I've collected from the Net so far.
#
#--------------------------------------------------------------------
# Setup the Celestia Environment for 800x600 screen resolution.
#--------------------------------------------------------------------
{
renderflags {set "stars|galaxies"}
set {name "FOV" value 25.0}
timerate {rate 1.0}

#--------------------------------------------------------------------
# Display M1
#--------------------------------------------------------------------

select {object "M1"}
print {text "M1 selected" row -3 column 1}
goto {time 10 distance 2.5}
wait {duration 10.0}
print {text "M1 selected
This is the Crab Nebula" row -3 column 1}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display M57
#--------------------------------------------------------------------

select {object "M57"}
print {text "M57 selected" row -3 column 1}
goto {time 10 distance 2.5}
wait {duration 10.0}
print {text "M57 selected
This is the Ring Nebula" row -3 column 1}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display M42
#--------------------------------------------------------------------

select {object "M42"}
print {text "M42 selected" row -3 column 1}
goto {time 10 distance 3.5}
wait {duration 10.0}
print {text "M42 selected
This is the Orion Nebula" row -3 column 1}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display NGC2237
#--------------------------------------------------------------------

select {object "NGC2237"}
print {text "NGC2237 selected
" row -3 column 1}
goto {time 10 distance 3.0}
wait {duration 10.0}
print {text "NGC2237 selected
This is the Rosetta Nebula." row -3 column 1}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display IC434
#--------------------------------------------------------------------

select {object "IC434"}
print {text "IC434 selected
" row -3 column 1}
goto {time 10 distance 3.5}
wait {duration 10.0}
print {text "IC434 selected
Can you see the Horsehead?" row -3 column 1}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display IC4406
#--------------------------------------------------------------------

select {object "IC4406"}
print {text "IC4406 selected
" row -3 column 1}
goto {time 10 distance 2.0}
wait {duration 10.0}
print {text "IC4406 selected
This is the Retina Nebula" row -3 column 1}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display M8
#--------------------------------------------------------------------

select {object "M8"}
print {text "M8 selected "
row -3 column 1}
goto {time 10 distance 3.0}
wait {duration 10.0}
print {text "M8 selected
This is the Lagoon Nebula." row -3 column 1}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display NGC1977
#--------------------------------------------------------------------

select {object "NGC1977"}
print {text "NGC1977 selected" row -3 column 1}
goto {time 10 distance 2.0}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display M16
#--------------------------------------------------------------------

select {object "M16"}
print {text "M16 selected "
row -3 column 1}
goto {time 10 distance 4.0}
wait {duration 10.0}
print {text "M16 selected
This is the Eagle Nebula." row -3 column 1}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display NGC3132
#--------------------------------------------------------------------

select {object "NGC3132"}
print {text "NGC3132 selected "
row -3 column 1}
goto {time 10 distance 2.0}
wait {duration 10.0}
print {text "NGC3132 selected
This is the Antlia Nebula." row -3 column 1}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display M17
#--------------------------------------------------------------------

select {object "M17"}
print {text "M17 selected "
row -3 column 1}
goto {time 10 distance 3.0}
wait {duration 10.0}
print {text "M17 selected
This is the Omega Nebula." row -3 column 1}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display NGC2392
#--------------------------------------------------------------------

select {object "NGC2392"}
print {text "NGC2392 selected "
row -3 column 1}
goto {time 10 distance 6.5}
wait {duration 10.0}
print {text "NGC2392 selected
This is the Eskimo Nebula." row -3 column 1}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display M4 Globular Cluster
#--------------------------------------------------------------------

select {object "M4"}
print {text "M4 selected "
row -3 column 1}
goto {time 10 distance 3.0}
wait {duration 10.0}
print {text "M4 selected
This is a large globular cluster." row -3 column 1}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display PSR1257
#--------------------------------------------------------------------

select {object "PSR1257"}
print {text "PSR1257 selected "
row -3 column 1}
goto {time 10 distance 15.0}
wait {duration 10.0}
print {text "PSR1257 selected
This is a rotating Pulsar." row -3 column 1}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display M20
#--------------------------------------------------------------------

select {object "M20"}
print {text "M20 selected "
row -3 column 1}
goto {time 10 distance 3.0}
wait {duration 10.0}
print {text "M20 selected
This is the Trifid Nebula." row -3 column 1}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display M27
#--------------------------------------------------------------------

select {object "M27"}
print {text "M20 selected "
row -3 column 1}
goto {time 10 distance 2.5}
wait {duration 10.0}
print {text "M27 selected
This is the Dumbbell Nebula." row -3 column 1}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display M81
#--------------------------------------------------------------------

select {object "M81"}
print {text "M81 selected "
row -3 column 1}
goto {time 10 distance 3.0}
wait {duration 10.0}
print {text "M81 selected
This is Bode's Galaxy." row -3 column 1}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display M97
#--------------------------------------------------------------------

select {object "M97"}
print {text "M97 selected "
row -3 column 1}
goto {time 10 distance 5.5}
wait {duration 10.0}
print {text "M97 selected
This is the Owl Nebula." row -3 column 1}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display NGC7293
#--------------------------------------------------------------------

select {object "NGC7293"}
print {text "NGC7293 selected "
row -3 column 1}
goto {time 10 distance 3.0}
wait {duration 10.0}
print {text "NGC7293 selected
This is the Helix Nebula." row -3 column 1}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display NGC1499
#--------------------------------------------------------------------

select {object "NGC1499"}
print {text "NGC1499 selected "
row -3 column 1}
goto {time 10 distance 3.0}
wait {duration 10.0}
print {text "NGC1499 selected
This is the California Nebula." row -3 column 1}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display 61 Cyg A
#--------------------------------------------------------------------

select {object "61 Cyg A"}
print {text "61 Cyg A selected
" row -3 column 1}
goto {time 10 distance 25.0}
wait {duration 10.0}
print { text "61 Cyg A selected
Why are we here? So we can see..." row -3 column 1}
wait {duration 5.0}

#--------------------------------------------------------------------
# Display the Black Hole.
#--------------------------------------------------------------------

select {object "Black Hole"}
print {text "The Black Hole" row -3 column 1}
goto {time 10 distance 3.5}
wait {duration 20.0}

#--------------------------------------------------------------------
# Display our Home planet before ending.
#--------------------------------------------------------------------

select {object "Sol/Earth"}
print {text "Time to go home." row -3 column 1}
goto {time 10 distance 5.0}

#--------------------------------------------------------------------
# End of Script - Let the user know the script is finished.
#--------------------------------------------------------------------

wait {duration 10.0}
print {text "End of the Galactic Tour." row -3 column 1}
wait {duration 5.0}

#--------------------------------------------------------------------
# Refresh Celestia's Viewing options & other data for normal display.
#--------------------------------------------------------------------

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

don
Posts: 1709
Joined: 12.07.2003
With us: 20 years 11 months
Location: Colorado, USA (7000 ft)

Post #2by don » 23.10.2003, 16:25

Howdy Bob,

Wow, you sure have a lot of add-ons :)!

Your script looks like a fun trip, and it is encouraging me to add some of the nebula add-ons, little by little. Thanks for writing this trip script and for sharing it with us :D !

-Don G.

Guest

Post #3by Guest » 24.10.2003, 07:02

Bob Hegwood wrote: Thanks Don. I'm glad to be able to contribute *something* to the thread. I'm still new to Celestial scripts, SSC's, STC's, DSC's, etc... But I'm having a real blast entertaining myself with this *stunning* resource.

Many thanks for the reply. I'll be adding some further scripts as I get the hang of writing them to ENTERTAIN the user.

By the way, most all of the addons came from you great folks here on the forum, so THANK YOU ALL for the textures, models, etc.

Take care, Bob.


Return to “Scripting”