Celestia/Celx Scripting/CELX Lua Methods/CEL command print

print
print { text  origin  duration  row  column  } 

The print command allows you to display text in Celestia's display window, defining where the text is positioned and for how long it should be displayed.

You must follow the print command with a wait command of a duration equal to or greater than the specified  is required.

Beware: If the text you want printed is longer than the width of the user's window, it will run off the right edge of the window.

CELX equivalent-1:

Based on the celestia:flash method.

Note: This method has no ability to position the text on a specific position on the screen. The celestia:print method should be used instead (see CELX equivalent-2 )


 * Print text on screen, similar to print.  A string containing the message to be printed. The string can contain newlines "\n" to break lines, or many special characters encoded in UTF-8.  is the number of seconds the text is shown. Default is 5.0 sec.

celestia:flash( ,  )

CELX equivalent-2:

Based on the celestia:print method.


 * Print text on screen. Celestia supports UTF-8 encoded text strings for showing non-ASCII characters.  is a string containing the message to be printed. The string can contain newlines "\n" to break lines, or many special characters encoded in UTF-8.  is the number of seconds the text is shown. Default is 5.0 sec.  is the horizontal origin of text: -1 is left, 0 center, 1 right.  is the vertical origin of text, -1 is bottom, 0 center, 1 top.  is the horizontal offset relative to the horizontal origin.  is the vertical offset relative to the vertical origin.

celestia:print( <textstring>, <duration>, <horig>, <vorig>, <hoffset>, <voffset> )

Example: This example prints the message "Hello Universe!" three rows up from the bottom of the display screen, starting two columns from the left edge:

CEL:

print { text "Hello Universe!" row -3 column 2 } wait { duration 5 }

CELX with the celestia:flash method:

celestia:flash("Hello Universe!", 5.0) wait(5.0)

CELX with the celestia:print method:

celestia:print( "Hello Universe!", 5.0, -1, -1, 3, 2) wait(5.0)

Back to CEL command index