Analog Clock

[Black Tulip] Analog Clock (Script for Designers)

(c) 2015, Auryn Beorn and Sei Lisa

Analog Clock script in Marketplace.

Thank you for having considered this script to enhance the quality of your products. Please read the following instructions carefully, especially the ones explaining which permissions to apply to the scripts for the next owner. Failure to complete this task INVALIDATES the license governing your use of this set of scripts. Should you have problems, please fill the scripts assistance form, explaining what you did and what happened, and I'll get back to you.

IMPORTANT!
The script contains a check to prevent accidental give-aways. If you haven't set permissions correctly in your inventory, then the script will self delete when you try to use it. The best way to ensure you set permissions correctly is by doing it NOW in your inventory.

TABLE OF CONTENTS



IMPORTANT ABOUT THIS SCRIPT


There's a sample object included, containing all the features, already set, and another sample, ready to setup, to help you learn how to set up your own clock. If you have doubts about how to setup your own items, please DO CHECK the sample object in the first place, to compare with your own object.


FEATURES


You can setup and control all this with one script:

  • The clock Hours, minutes and seconds hands. Seconds hand is optional, and it can be placed in a separate place than hours and minutes. There's a tool to help setting up the hands, so they rotate as you want them.
  • You can define all the timezones you need, and there's an option to turn on/off daylight saving.
  • Tick-tock sound. It can be turned on/off.
  • Up to five extra buttons that you can setup to call other scripts.
  • Final user can change access to owner only/everybody/group
  • Menu can be integrated into tools such as MLPv2, AVsitter... (AVsitter version 2 works too!)


SET UP: WHAT SCRIPT TO USE?


There are two copy/no modify/transfer scripts contained in your folder:

[Black Tulip] Analog Clock - Basic Edition
[Black Tulip] Analog Clock - Basic Edition [MODULE]

We need to use ONLY ONE of them in a given product.

Which one? How to choose?

The [MODULE] version, as explained in the THE MAIN SCRIPT, AS A MODULE YOU CAN USE FROM ANOTHER SCRIPT section, will allow you to use this script integrated with other scripts that allow sending linked messages, such as the Multi Love Pose (MLP) or AVSitter for multiavatar, multianimation devices.

So, depending on what we need, we'll use the following script as main one:

Normal use - We want the menu to show when the object is clicked:
[Black Tulip] Analog Clock - Basic Edition

The menu should show up after clicking a button from another script, like MLP, AVSitter:
[Black Tulip] Analog Clock - Basic Edition [MODULE]

Once we've chosen the right main script, we have to set some descriptions in the primitives of the object, following the instructions below.


SETUP: CHANGE PERMISSIONS FOR NEXT OWNER


Check the following section on this page, knowing that each [Black Tulip] ASSET refers to the following scripts:

[Black Tulip] Analog Clock - Basic Edition
[Black Tulip] Analog Clock - Basic Edition [MODULE]


SETUP: EXAMINING THE SAMPLE OBJECT


With this script, you may control the following:

  • The clock Hours, minutes and seconds hands. Seconds hand is optional, and it can be placed in a separate place than hours and minutes. There's a tool to help setting up the hands, so they rotate as you want them.
  • You can define all the timezones you need, and there's an option to turn on/off daylight saving.
  • Tick-tock sound. It can be turned on/off.
  • Up to five extra buttons that you can setup to call other scripts.
  • Final user can change access to owner only/everybody/group
  • Menu can be integrated into tools such as MLPv2, AVsitter... (AVsitter version 2 works too!)

We'll understand better what this means by examining the [Black Tulip] Analog Clock - FINISHED SAMPLE object. Rez it, and let's follow this explanation.

Before anything, right click the object to edit, then click the Content tab. When we do this, we're inspecting the contents of the ROOT PRIM. You should see the [Black Tulip] Analog Clock - Basic Edition script, the [Black Tulip] Analog Clock ~CFG~ configuration notecard, several sound clips and another script (to demonstrate the extra buttons feature).

What does this mean?
That the script, configuration notecard and sound clips, if any, have to be dropped into the ROOT PRIM. This is the default when we simply right click an object, then select Edit from the menu.

Having this clear, now let's examine the sample object in detail. It consists of several linked prims: The clock base and the clock hands. The clock hands need that we type specific descriptions in them, to later use an auxiliary tool. Other options are configured in the notecard.

This is a complex tool, so take the time to setup one feature at a time.

Click on the object to get a menu. Get familiar first with all the options this script offers. Once you see all the script does, then continue reading, to learn how to setup each one of the features.


SETTING UP THE CLOCK HANDS


Follow this link for the documentation on the Hands Clock auxiliary tool. Screenshots are taken with the grandfather clock, but hands are setup exactly the same way for this Analog Clock script, and for the Grandfather Clock script. The only difference is that the sample object, for you to setup following the directions in this case, is [Black Tulip] Analog Clock - SAMPLE TO SETUP.


DEFINING WHICH TIMEZONES TO INCLUDE


Click here for the related documentation.


SETTING UP THE SOUND EFFECTS


Click here for the related documentation.


ADDING UP TO FIVE EXTRA BUTTONS


This is set up in the [Black Tulip] Analog Clock ~CFG~ configuration notecard. Each button we want to add to the menu, means that we have to write a line with the following format in the notecard:

button = button_label|link_msg_number|link_prim|text_to_send|show_menu_again

Click here for the related documentation.


SETUP: THE MAIN SCRIPT, AS A MODULE YOU CAN USE FROM ANOTHER SCRIPT

Check the following section on this page, knowing that:

[Black Tulip] ***Script Name*** [MODULE] refers to [Black Tulip] Analog Clock - Basic Edition [MODULE]
CODE_NUMBER is -37640982
NAME_ON_MENU is Clock

AVSitter line looks like: BUTTON Clock|-37640982
MLP line looks like: LINKMSG Clock | 1,-4,-37640982,fromMLP

You have example AVpos and .MENUITEMS notecards with your purchase. Remember that this works too with AVSitter 2.