[Solved] how to do Simulation and realtime visualization

Description: All about writing scripts for Celestia in Lua and the .cel system

Stuffer
Topic author
Stuffer
Topic author
Posts: 67
With us: 8 years 7 months
Location: Stuttgart, Germany

Simulation/realtime vis...celestia crash with settime()

#21by Stuffer » 11.03.2009, 08:48

Hi,

I have a question concerning the actual time-functions of celestia.

When simulating a s/c I'm usually not simulating at current time so I have to tell Celestia the time of the simulation.
Now I know that there's the function settime(number:time) which sets the (displayed) time in celestia.
And when I use this function in a celx-script the timesetting works fine.

But when I do the call to this function in a hook script Celestia crashes regularly. So is there a special point of celestia's running time when I can at first do this call?
Or can I / do I have to access the start.cel-file from within a hook script and change the starting time in there when running celestia?

Since the starting time of the simulation is likely to change several times it's not really sufficient to manually change the starting script before running Celestia. Though it would do if there's no other opportunity.

Thanks
Stuffer
Win XP Pro x Core2Duo 2,1GHz x 2 GB RAM x NVidia Quadro FX 1500 256 MB

Vincent
Vincent
Posts: 1356
With us: 12 years 6 months
Location: Nancy, France

Re: how to do Simulation and realtime visualization

#22by Vincent » 11.03.2009, 10:23

Stuffer wrote:Now I know that there's the function settime(number:time) which sets the (displayed) time in celestia.
And when I use this function in a celx-script the timesetting works fine.

But when I do the call to this function in a hook script Celestia crashes regularly. So is there a special point of celestia's running time when I can at first do this call?
Stuffer,

I've been using the settime function in the Lua Tools which are based on the Lua Hooks process.
It works great, and I've never had the kind of issue you've reported. Could you post the piece of
code that is causing the crash ?
@+
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

Stuffer
Topic author
Stuffer
Topic author
Posts: 67
With us: 8 years 7 months
Location: Stuttgart, Germany

Re: how to do Simulation and realtime visualization

#23by Stuffer » 11.03.2009, 11:18

Vincent,

thanks a lot for mentioning that it should work.
Now I figured out that my mistake was somewhere else.
I assume that it was never an actual crash but something like a timeout because the hookscript was stuck and that's why Celestia didn't do any further things.

Thanks
Stuffer
Win XP Pro x Core2Duo 2,1GHz x 2 GB RAM x NVidia Quadro FX 1500 256 MB

Vincent
Vincent
Posts: 1356
With us: 12 years 6 months
Location: Nancy, France

Re: how to do Simulation and realtime visualization

#24by Vincent » 11.03.2009, 11:29

Stuffer wrote:thanks a lot for mentioning that it should work.
Stuffer, you're welcome. Glad you've figured this out.
@+
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

Stuffer
Topic author
Stuffer
Topic author
Posts: 67
With us: 8 years 7 months
Location: Stuttgart, Germany

Re: how to do Simulation and realtime visualization

#25by Stuffer » 19.05.2009, 13:57

I'm glad so.

Me too.

My application is working properly :).

Thanks to all helping hands in here!

--Stuffer
Win XP Pro x Core2Duo 2,1GHz x 2 GB RAM x NVidia Quadro FX 1500 256 MB


Return to “Scripting”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest
Bots: Google [Bot]