press any key to continue :-)

General discussion about Celestia that doesn't fit into other forums.
Topic author
titof13

press any key to continue :-)

Post #1by titof13 » 15.11.2003, 18:59

Hi every body, hi Antoine :D

This is titof 13 behind the keyboard :D

actualy, is it possible to stop a script while the user press any key ?
I try to explain in another way, what i want to do.

I want to do a presentation of our solar system, but i want to show step by step each planet with one script. the user step juste if he press a key on the keyboard.

Is it possible ?


Thanks for your responses

Titof 13 and his poor english 8)

ElPelado
Posts: 862
Joined: 07.04.2003
With us: 21 years 8 months
Location: Born in Argentina
Contact:

Post #2by ElPelado » 15.11.2003, 20:53

If you know exactly how much time you want to stop it, you can use a delay, but i dont think that you want to do it that way...
---------X---------
EL XENTENARIO
1905-2005

My page:
http://www.urielpelado.com.ar
My Gallery:
http://www.celestiaproject.net/gallery/view_al ... y-Universe

titof 13
Posts: 2
Joined: 12.11.2003
With us: 21 years 1 month
Location: Arles France

Post #3by titof 13 » 15.11.2003, 21:54

hello Elpelado

unfortunatly, the solution that i want to reach is not in this way.
I do a script based on the delays

wait { duration xxx }.

but now i search a more interractiv solution .....

bye
I'm sorry for my poor english.
I was a bad student when i was young :-)))

Harry
Posts: 559
Joined: 05.09.2003
With us: 21 years 3 months
Location: Germany

Post #4by Harry » 15.11.2003, 23:00

Waiting for (or even reading) keypresses is currently not possible. If you were using Lua-scripts, you could use a dirty hack and repeatedly poll for something like the currently selected object, and continue the scripts if the selected object changes (this can be done by the user even while the scripts is running).

But I recommond not to use this, as there are many problems. The user must press exactly the right key, otherwise he won't make the changes the script is waiting for. And Lua-scripting is not yet complete, though it will improve somewhat in 1.3.1.

I have been thinking about adding keyboard-input for Lua-scripting, but AFAICS this would require some changes in the UI-code for some platforms, so maybe in 1.3.2 :)

Harald


Return to “Celestia Users”