Non-preloading standard clients

Overview

The two standard client scripts covered in this section are meant to be very simple full-perm clients that are both useable and and example of how a client script for the Theme-O-Matic can work. These scripts have not evolved much since version 1.0 and are, most notably, not using preloaders.

If speed is a concern you should consider the preloading standard client scripts instead.

T-O-M-SC SimpleCycle

Usage

The T-O-M-SC SimpleCycle client scans for available notecards in the prim's inventory that have the required prefix. Then every time someone touches the object the "next" theme is activated.

This is a great way to customize for example textures on furniture without bothering the user with a full-blown menu.

Configuration

The T-O-M-SC SimpleCycle has only one parameter:

string prefix="Theme-";

Here you can specify the prefix notecard names must have to be recognized as themes. If you do not want a prefix just set it to the empty string (""). Note that the prefix is case sensitive ("theme" is not equal to "Theme", for example), and of course spaces matter.

T-O-M-SC AutoMenu

Usage

Like the T-O-M-SC SimpleCycle, the T-O-M-SC Automenu will start by looking for notecards in the prim's inventory whose names has the required prefix. Then, every time someone touches the object, a menu opens with the list of theme names (truncated to 12 letters - SL limitation) for them to pick.

Pagination buttons ◄Prev and Next ► appear as required to organize the menu in pages of 9 themes. You also get a special button you can use to display specific information when the user clicks on it.

Configuration

Several parameters are grouped at the beginning of the script, ranging from prefix selection to menu labels to menu timeout and such.

string prefix="Theme-";

Again the prefix parameter is the prefix by which notecard names must start to be recognized as themes. Use the empty string ("") for no prefix.

integer menu_channel=-7712;

The menu_channel setting is the channel used for menu communication. There is no point in changing it really, except for preventing a very improbable channel collision with another script.

float menu_timeout=30.0;

This is the number of seconds after which the menu stops responding, as an anti-lag measure. You can set it to 0.0 if you do not want a timeout, but it’s not recommended.

string menu_timeout_msg="Menu timeout, please touch again to get the menu.";

This is the message whispered in the local chat when timeout happens.

string menu_prompt="Available themes:";

This is the menu prompt, appearing in the dialog presented to the user with the list of themes.

string label_next="Next ►";
string label_prev="◄ Prev";
string label_placeholder=" - ";

These three settings are obviously labels used for the menu pagination into pages of 9 themes. If a ◄ Prev or Next ► button must not appear it is replaced with the placeholder.

string label_about="- About -";

This is a button appearing at the bottom of the menu that you can use to display information to the user.

string about_msg="Theme-O-Matic by Oggy's Scripted Items. Visit http://oggysscripteditems.blogspot.com for latest news.";

This is the message whispered in local chat when the user clicks on the previously mentioned – About – button.