Newbie question - looping

All about writing scripts for Celestia in Lua and the .cel system
Topic author
AstronomyLibrarian
Posts: 1
Joined: 21.06.2007
With us: 17 years 5 months

Newbie question - looping

Post #1by AstronomyLibrarian » 09.07.2007, 18:04

Hello all,

I feel a bit stupid, but I can't find any documentation on this.

Is there any way to have a script loop back to the beginning after it's done? I'm trying to set up a "demo mode" on a computer that will not be touched by the observers, so I'd like to have a way to run a script, (or multiple scripts) and then loop back to the beginning.

Thanks,
Arun

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

Post #2by selden » 09.07.2007, 18:50

.CEL scripts have no loop or conditional constructs at all. They can only contain a sequential list of commands.

.CELX scripts are written in Lua, which is a full-featured programming language.

Please take a look at the "Preliminary Scripting FAQ" which is a sticky near the top of this Scripting Forum.
Selden


Return to “Scripting”