Page 1 of 1

Script Doctor, help! I know it's imple but?€¦

Posted: 26.01.2007, 23:16
by MonsieurMeus
Hi evreyone!

I'm quiet new in wrting scripts so I'm biginning with something very simple. I spend a lot of time in readins forum and testing scripts to understand how it works but I can't do what I'd like to. Coud somebody help me?
The idea is simple: we're watching the earth (orbit around) go to Hubble, look the machine and then go down to Marseilles/France as close as possible. Easy isn't it? I'm always having "jumps" or can't fin Hubble anymore or can't get closer. It's getting late here and I tried and tried, when I find something, something else is going wrong?€¦ Could somebody help me?
thanks in advance

sam

{
# INITIALIZATION
cancel {}
cls {}
renderflags { clear "automag|boundaries|comettails|constellations|grid|orbits|markers"}
renderflags { set "atmospheres|cloudmaps|galaxies" }
labels { clear "asteroids|comets|constellations|galaxies|moons|planets|spacecraft|stars"}
unmarkall {}

set { name "AmbientLightLevel" value 0.30 }

set { name "FOV" value 30.0 }

timerate { rate 1000.0 }

time { utc "2007-06-21T06:00:00.0000" }

# ------------------
# Earth
# ------------------

# Select the Earth

select { object "Sol/Earth" }
track {time 5 }
follow {time 5 }

goto{
time 5
distance 15
upframe "chase"
}

orbit{duration 19
rate 20
axis [0 1 0]
}

timerate { rate 100.0 }

gotolonglat { time 20
distance 5
longitude 5.22580
latitude 43.174 }


print { text "Now Tracking Earth."
row -3
column 25
duration 3 }
wait { duration 10 }


# ------------------
# Hubble
# ------------------

# Select Hubble

select { object "Hubble" }


goto { time 20
distance 7
upframe "chase"
}
center {time 5}


wait {duration 10}
changedistance {duration 11 rate -3}

wait {duration 10}



# ------------------
# Earth / Marseille
# ------------------

# Select the Cours Ju...

select { object "Sol/Earth" }
track {time 10 }

goto{
time 5
distance 5
upframe "chase"
}
gotolonglat { time 20
distance 2
longitude 5.22580
latitude 43.174 }
track {time 5 }
follow {time 5 }

print { text "Now Tracking Marseilles"
row -3
column 25
duration 3 }
wait { duration 20 }


print { text "The script is finished."
row -3
column 25
duration 5 }
wait { duration 5 }

}

Posted: 27.01.2007, 12:35
by selden
1. to select Hubble you must use its full path:

Code: Select all

"Sol/Earth/Hubble"


2. Your script needs many more wait commands. You must specify

Code: Select all

wait {duration ... } # replace ... with an appropriate number of seconds
after an operation so that it has time to finish. Then you can tell Celestia to do something different. If it is not told to wait, Celestia will immediately start obeying the next command before the previous command has finished. Sometimes that will be what you want, but often it is not.

usefull but another problem: track

Posted: 27.01.2007, 15:25
by MonsieurMeus
Hi!
Thanks for your help! Looks much better now! But a problem still remains. I always have "jumps" when I'm passing from one track { } to antother track { } untrack is not working in my script (Celstia 1.4.1), is there something else to have more smooth changement of orientation? maybe not using track? any idea?

Posted: 27.01.2007, 15:39
by selden
center { time ...}
follow {}

might work better for you.

Hurra!

Posted: 27.01.2007, 15:54
by MonsieurMeus
Thanks so much! Your help is a delivrance for me! I Love you!

have a wonderful day!

sam

Posted: 29.01.2007, 11:12
by Adirondack
RTFM! :wink:

http://www.celestiamotherlode.net/catalog/documentation.html -> SSC Scripting Guide

Adirondack