MOAB Universal

Modified: 12/8/2016 5:32 PM
Recently changed articles You can subscribe to this wiki article using an RSS feed reader.

MOAB Universal Slider

A script to slide any rotated prim in any direction.
By Antonius Frentis. Copyright MiceOnABeam 2014-2016.
PERMISSIONS: Copy/Transfer
You may not resell the MOABUniversalSlider script by itself; it may only be resold as part of another product with the MOABUniversalSlider script's Next Owner Transfer permission disabled & with a product price greater than $L199.

- Works at ANY rotation. Can be linked or unlinked!
- Fully configurable slide direction & distance;
- Can slide multi-prim builds!
- Automatic close after configurable timeout;
- Lock/Unlock the prim in the closed or opened position;
- Chat or link message command interface to control prim;
- Synchronize the sliding of multiple prims;
- Optional sounds on open & close at start & end of movement;
- Optional chat message on slide open;
- Access can be optionally limited to owner only;
- Disable all error or status messages;
- All easily configured via notecard also including speed, smoothness & command channel;
- Options can also be configured on-the-fly via link message!
- Sequential slides using link messages;
- Save & restore prim's position;
- *NEW* Optional looping of opening & closing sounds for duration of the slide!

- Use the provided cube prim or create your own sliding prim as follows:

1) Create a cube prim with length, width, height along the Y, X and Z axes respectively.
2) Copy/move the MOABUniversalSlider script along with the SliderOptions notecard to your prim's inventory.

3) Edit the notecard named SliderOptions in your prim's inventory setting the values of the various options.
     As specified by the XSLIDE, YSLIDE & ZSLIDE options, the prim will slide towards of one of the
     following sides: Left, Center, Right, Front, Back, Top or Bottom or towards any of the cube edges or vertices.

4) Position, resize & rotate your prim to it's desired closed position.

5) The prim may be unlinked, or linked as a child prim to a root prim which MUST be stationary.

6) Touch the prim or send it a command to slide open or close.
   Multi-Prim Builds
  - For multi-prim builds each of it's linked component prims must have its object name
     set to one of the names set in the MultiPrimName option.
  - DO NOT change the names of any of the scripts or notecards!
  - In case of any difficulties,  chat: /99 reset
    (If you changed the CHANNEL option use that number instead.)

CONFIGURED OPTIONS (See the SliderOptions notecard for full details.)
- XSLIDE,YSLIDE,ZSLIDE:   Select the side or edge towards which the prim will slide:
                          One of: Left, Center, Right, Front, Back, Top or Bottom sides,  their edges or cube vertices.
- SLIDE:               Enter the percentage of the prim's length along the selected direction for the prim to SLIDE.
- TIME:                 Enter the time to take to open/close.
- RTIME:               Select whether to automatically adjust TIME to compensate for lag.
- TIMEOUT:           Enter the timeout after which to automatically close.
- SMOOTH:          Enter the smoothness factor for the prim's movement.
- CHANNEL:          Enter the chat channel for commands. Enter a negative channel to synchronize the
                          movement of all sliders with that channel.
- CMDLINKMSG:    Enter a non-zero integer id to validate commands received via link message. Commands will only be
                           recognized from a prim with the same owner. This value should be assigned to the integer parameter
                           of the llMessageLinked call. The command should be sent in the string parameter.
- MULTIPRIMNAME:   Enter a list of object names, separated by commas, for component prims on a multi-prim build.
- MESSAGE:         Enter the message to chat on opening.
- TITLE:                Enter the message to display above the prim.
- OPENSOUND:   Enter the sound to be played before opening the prim.
- OPENSOUNDEND:   Enter the sound to be played after opening the prim.
- CLOSESOUND: Enter the sound to be played before closing the prim.
- CLOSESOUNDEND: Enter the sound to be played after closing the prim.
- NOMSG:          Enter 1 to disable all error or status messages. Otherwise leave blank. Note that this will not affect the TITLE or MESSAGE options.
- OWNERONLY:    Enter 1 to only permit the owner of the prim to open/close it. Otherwise leave blank.
- SILENTCMD:     Enter 1 to silence any sounds when prim open/closed via chat or link message command.
- LOOPSOUND:   Enter 1 for OPENSOUND and CLOSESOUND to be looped till completion of slide. Otherwise leave blank.

One or more options can be reconfigured on-the-fly by sending a link message to the script. Each option must be a string exactly as defined in the SliderOptions notecard. One or more of these option strings, separated by ampersands, can be sent as follows:      llMessageLinked(Link_Designation,CMDLINKMSG,"option1=value1&option2=value2",NULL_KEY)
where CMDLINKMSG has been previously configured via the notecard.

*NOTE* On-The-Fly Configuration is not permanent. Any configuration changes made through this feature will be reset to the values specified in the SliderOptions notecard on any event which results in a reset of the script, including changed links, changed inventory or a "reset" command.

You can send multiple "open" and "close" commands via link messages to the script in any order! In conjunction with On-The-Fly Configuration, this means you can slide the prim incrementally in the same direction, and then switch direction. As well, at any time you can send the following two commands via link message:
- save:         Save the current position of the prim. The prim can be restored to this position at a later time through the "softreset" command.
- softreset:   Set the prim to its initial position. By default this is the position saved when the script was last reset, or, the position saved at the last "save" command.

 Chat "/99 aCommand aParm".
  (If you change the command listen CHANNEL use that number instead.)
   OR:  llMessageLinked(Link_Designation,CMDLINKMSG,"aCommand",NULL_KEY)
- reset:     Resets the prim setting it's current position as closed;
- lock:       Locks the prim in it's current state;
- unlock:   Unlocks the prim;
- open:     Tell the prim to slide open;
- close:    Tell the prim to slide closed;
- version: Displays the version number of the script.
- help:      Displays the command list;

Home: MOAB Universal Copyright © 2010-2018 MiceOnABeam Software