I need help making an interactive tutorial

All about writing scripts for Celestia in Lua and the .cel system
Topic author
k2aka111
Posts: 1
Joined: 27.11.2007
With us: 16 years 11 months

I need help making an interactive tutorial

Post #1by k2aka111 » 27.11.2007, 18:49

KEEP NOTE: i am very new to programming

I am working on an astronomy project where I want to make an interactive tutorial of celestia. All I really need to do is say that if someone presses "g" and it goes to that spot and the next part of the script starts, but not until they press that command.

EXT

"press g to continue"
(you press g)
keeps on going.

But I want it to pause on a certian until a certian key is pressed is, but I also what that key to complete its fucntion is that possible? I have just recently started scripting in celestia so don't make fun of me if I sound like an idiot.

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

Post #2by selden » 27.11.2007, 19:51

k2aka111,

What may not be obvious is that in order to do exactly what you describe, you have to use a .CELX script, which is written in the Lua programming language, and not a .CEL script. CEL scripts can be composed only of sequential Celestia commands, while Lua, as used in CELX scripts, is a programming language with many features.

The scripting FAQ at the top of the forum should help some. Some additional scripts and links to more documentation pages are available in the Celestia WikiBook at http://en.wikibooks.org/wiki/Celestia
Selden


Return to “Scripting”