Problem with scripts

Report bugs, bug fixes and workarounds here.
Topic author
MBV
Posts: 4
Joined: 19.07.2008
With us: 16 years 4 months

Problem with scripts

Post #1by MBV » 19.07.2008, 18:41

I selected the "Mark Local Group Galaxies" and "Show redshifts of galaxies" cripts, to see how it worked, and now a red dot always appears in any object I select. And I don't have a dark side in the planets, its as if light was comming from everywhere.

Please, how do I solve this???

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 17 years 1 month

Re: Problem with scripts

Post #2by BobHegwood » 19.07.2008, 19:17

MBV wrote:I selected the "Mark Local Group Galaxies" and "Show redshifts of galaxies" cripts, to see how it worked, and now a red dot always appears in any object I select. And I don't have a dark side in the planets, its as if light was comming from everywhere.

Please, how do I solve this???
Have you tried pressing CTRL and the letter K at the same time?
This is the command to remove the marker from your display.

Don't know if this is what you mean or not, but that's what I'm thinking from your description.
Thanks, Brain-Dead Bob
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN

Topic author
MBV
Posts: 4
Joined: 19.07.2008
With us: 16 years 4 months

Re: Problem with scripts

Post #3by MBV » 19.07.2008, 19:43

BobHegwood wrote:
MBV wrote:I selected the "Mark Local Group Galaxies" and "Show redshifts of galaxies" cripts, to see how it worked, and now a red dot always appears in any object I select. And I don't have a dark side in the planets, its as if light was comming from everywhere.

Please, how do I solve this???
Have you tried pressing CTRL and the letter K at the same time?
This is the command to remove the marker from your display.

Don't know if this is what you mean or not, but that's what I'm thinking from your description.
Thanks, Brain-Dead Bob

Thank you, that solved the problem with de markers. But what about the light, can you help me? The shadows are barely noticeble.

BobHegwood
Posts: 1803
Joined: 12.10.2007
With us: 17 years 1 month

Re: Problem with scripts

Post #4by BobHegwood » 19.07.2008, 22:45

MBV wrote:Thank you, that solved the problem with de markers. But what about the light, can you help me? The shadows are barely noticeble.
First, do yourself a favor, and go to my web page HERE. Then, click on the "Files" link and download my latest version of the Modified Start CEL script. Simply place it in the main Celestia directory (after you have backed up your current start.cel file) and then run it to start Celestia.
With this installed, you can look at the file via notepad, and learn what controls what your Celestia program displays and how. Use it to start Celestia, and see if your problems don't all disappear. If not, you can play with the settings inside the script, and you'll see that they are ALL documented so that you can understand what they do.

Whenever a script or some other add-on changes any of the features as I like to have them set up, I simply restart Celestia using the Modified Start CEL script you'll find on my homepage. It sets ALL of the Celestia settings that can be changed so that I don't have to do it manually each time I start Celestia.

Take a look, and see if this fixes your lighting problem. If not, then you will have to read the descriptions of the "controls" which are available under the Celestia Help Menu.
Hope this helps, Bob
Brain-Dead Geezer Bob is now using...
Windows Vista Home Premium, 64-bit on a
Gateway Pentium Dual-Core CPU E5200, 2.5GHz
7 GB RAM, 500 GB hard disk, Nvidia GeForce 7100
Nvidia nForce 630i, 1680x1050 screen, Latest SVN

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

Re: Problem with scripts

Post #5by Vincent » 20.07.2008, 09:33

The following code can be added at the beginning of any celx script.
It will save user's initial settings, and restore them when the script is
terminated - end of the script or ESC key pressed.

This is quite a long piece of code, so we might consider adding the
celestia:savesettings() and celestia:restoresettings() methods to celx scripting...

Code: Select all

--------------------------------------------------
-- Get initial settings
--------------------------------------------------
   iSel = celestia:getselection()
   iObs = celestia:getobserver()
   iObsPos = iObs:getposition()
   iObsOrientation = iObs:getorientation()
   iTime = celestia:gettime()
   iTimescale = celestia:gettimescale()
   iAmbient = celestia:getambient()
   iLabelflags = celestia:getlabelflags()
   iRenderflags = celestia:getrenderflags()
   iOrbitflags = celestia:getorbitflags()
   iFov = iObs:getfov()
   iSpeed = iObs:getspeed()
   iVisibility = celestia:getfaintestvisible()
   iMinorbitsize = celestia:getminorbitsize()
   iStartdist = celestia:getstardistancelimit()
   iStarstyle = celestia:getstarstyle()
   iMinfeatures = celestia:getminfeaturesize()
   iOverlayelements = celestia:getoverlayelements()

--------------------------------------------------
-- Define function to restore initial settings.
--------------------------------------------------
function restore_settings()
   obs = celestia:getobserver()
   if iSel then
      celestia:select(iSel)
      obs:follow(iSel)
   end
   obs:setposition(iObsPos)
   obs:setorientation(iObsOrientation)
   obs:setfov(iFov)
   obs:setspeed(iSpeed)
   script_time = celestia:getscripttime()
   celestia:settime(iTime + (script_time/86400))
   celestia:settimescale(iTimescale)
   celestia:setambient(iAmbient)
   celestia:setlabelflags(iLabelflags)
   celestia:setrenderflags(iRenderflags)
   celestia:setorbitflags(iOrbitflags)
   celestia:setfaintestvisible(iVisibility)
   celestia:setminorbitsize(iMinorbitsize)
   celestia:setstardistancelimit(iStartdist)
   celestia:setstarstyle(iStarstyle)
   celestia:setminfeaturesize(iMinfeatures)
   celestia:setoverlayelements(iOverlayelements)
end

--------------------------------------------------
-- Restore initial settings when script is terminated
--------------------------------------------------
function celestia_cleanup_callback()
   restore_settings()
end
@+
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


Return to “Bugs”