Interactive scripts.

All about writing scripts for Celestia in Lua and the .cel system
Topic author
Paolo
Posts: 502
Joined: 23.09.2002
With us: 22 years 2 months
Location: Pordenone/Italy

Interactive scripts.

Post #1by Paolo » 13.09.2003, 15:16

I was preparing some old style scripts and in some occasions I would like to have a feature that permits to prompt to the user a simple question like: Do you want to continue? [Y]es [N]o.

So my request is to have a script command that stops the script execution waiting for simple user's input.

Another drawbak of interactive scripts applied to new LUA style should allow to prompt to the user a questione like: Choose your language: [E]nglish, [I]taliano, [F]rancais etc.

[added 14/09/03]
Testing the answer result the user should choose between different pre-defined behavior of the script.
[/added]

What do you think?
Is it feasible?

Bye - Paolo
Remember: Time always flows, it is the most precious thing that we have.
My Celestia - Celui

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

Post #2by don » 14.09.2003, 23:49

Howdy Paolo,

It sure would be nice to have this kind of script control, and I think it might be fairly easy to do in Lua, with the proper hooks in Celestia.

However, it looks like we need some more programmers because there are more good ideas of things to add to Celestia than there are programmers to add them <frown>! I am a little surprised that of the thousands of people who use Celestia, that there are not more people willing to offer some programming help. Oh well. Steady as she goes!

-Don G.

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #3by chris » 15.09.2003, 21:44

Some sort of interactive capability is important for scripts, and it's definitely feasible. There will be an easy-to-use multiple choice input function, but I'm not sure at this point what the underlying primitive functions should look like.

--Chris

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

Post #4by don » 15.09.2003, 23:24

Howdy Chris, it's great to hear from you!
chris wrote:I'm not sure at this point what the underlying primitive functions should look like.

Well, since they are primative functions, they should probably look like cavepeople, right? R R R R R :lol:

Seriously, thank you for your message Chris. If I had a bunch more money, I'd hire a programmer or three to help you out. 8)

-Don G.

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

Post #5by don » 21.04.2004, 06:55

For anyone interested in a follow-up on this topic (limited to Celx scripting) ...

* See http://shatters.net/forum/viewtopic.php?t=4882 for a function that allows the user to enter a full line of text.

* See http://shatters.net/forum/viewtopic.php?t=4560 for a function that pauses a script waiting for the user to press the spacebar.

* See http://shatters.net/forum/viewtopic.php?t=4559 for an example of how to create a "menu", whereby the user presses a key to do something.
-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 “Scripting”