Page 1 of 1

press any key to continue :-)

Posted: 15.11.2003, 18:59
by titof13
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)

Posted: 15.11.2003, 20:53
by ElPelado
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...

Posted: 15.11.2003, 21:54
by titof 13
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

Posted: 15.11.2003, 23:00
by Harry
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