demo scripting

General discussion about Celestia that doesn't fit into other forums.
Topic author
billybob884
Posts: 986
Joined: 16.08.2002
With us: 22 years 3 months
Location: USA, East Coast

demo scripting

Post #1by billybob884 » 08.08.2003, 21:28

Has the text string changed? I cant get it to work.
Mike M.

TacoTopia!

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 3 months
Location: NY, USA

Post #2by selden » 08.08.2003, 22:14

"It works fine for me!" in Celestia v1.3.1pre9.

You'll have to provide a copy of what you've written.
Selden

Topic author
billybob884
Posts: 986
Joined: 16.08.2002
With us: 22 years 3 months
Location: USA, East Coast

Post #3by billybob884 » 09.08.2003, 00:40

I even tried a simple little thing like:

Code: Select all

{
   print { text "Beginning tour...    Press the ESC key to cancel." }
}


doesn't work. I've got celestia pre 6, 768mb ram, geforce2, win me.
Mike M.



TacoTopia!

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

Post #4by don » 09.08.2003, 06:13

Howdy Mike,

You may want to take a look at Chris' demo.cel that comes with Celestia for some example code.

Here is how he begins his demo:

Code: Select all

   print { text "Beginning demo . . .\nPress ESC to end." origin "center" duration 2 }
   wait { duration 2.0 }

In Celestia's .CEL scripting, certain commands require one or more parameters to be used. With the print command, you need to tell it where to display the text and for how long. This is done via the origin and duration parameters.

Then, if you want the user to see the text, you need to code a wait command after the print command that has a duration equal to or greater than the duration specified in the print command -- just like Chris' lines above shows.

Hope this helps!
-Don G.
My Celestia Scripting Resources page

Avatar: Total Lunar Eclipse from our back yard, Oct 2004. Panasonic FZ1 digital camera (no telescope), 36X digital zoom, 8 second exposure at f6.5.

Topic author
billybob884
Posts: 986
Joined: 16.08.2002
With us: 22 years 3 months
Location: USA, East Coast

Post #5by billybob884 » 09.08.2003, 23:49

it helps a little, but not enough. i played chris's demo and it works fine, but when i copied the print and wait code into mine (i put it right at the top) it still didnt show anything.
Mike M.



TacoTopia!

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

Post #6by don » 10.08.2003, 02:06

Mike,

If you post your script, or at least several commands before and after your print command, maybe we can help.
-Don G.

My Celestia Scripting Resources page



Avatar: Total Lunar Eclipse from our back yard, Oct 2004. Panasonic FZ1 digital camera (no telescope), 36X digital zoom, 8 second exposure at f6.5.

Topic author
billybob884
Posts: 986
Joined: 16.08.2002
With us: 22 years 3 months
Location: USA, East Coast

Post #7by billybob884 » 10.08.2003, 07:43

Well, after a bit of tinkering, I got it to work. I just had to change every single text string before it would work, but it's fixed now.
Mike M.



TacoTopia!

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

Post #8by don » 10.08.2003, 07:57

Congratulations Mike! Glad to hear you got it to work.

If you're interested, I posted a "template" script over in the Celestia Scripting forum (http://ennui.shatters.net/forum/viewtopic.php?t=2961).
-Don G.

My Celestia Scripting Resources page



Avatar: Total Lunar Eclipse from our back yard, Oct 2004. Panasonic FZ1 digital camera (no telescope), 36X digital zoom, 8 second exposure at f6.5.


Return to “Celestia Users”