Page 1 of 1

Interactive scripts.

Posted: 13.09.2003, 15:16
by Paolo
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

Posted: 14.09.2003, 23:49
by don
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.

Posted: 15.09.2003, 21:44
by chris
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

Posted: 15.09.2003, 23:24
by don
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.

Posted: 21.04.2004, 06:55
by don
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.