LSL Protocol/LockGuard/LockGuardItem

From Second Life Wiki
< LSL Protocol‎ | LockGuard
Revision as of 08:09, 10 November 2017 by Sei Lisa (talk | contribs) (fix section header)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
KBcaution.png Important: This page has been imported from a archived copy of LSL Wiki and may need cleaning up.


LockGuard V2 Items

At the heart of the LockGuard System is the LockGuard V2 Script which is used to define your LockGuard Items. The LockGuard V2 Script is actually a script library dedicated to the linking, unlinking, and maintenance of the particle chains. Any item which contains the LockGuard V2 Script instantly becomes LockGuard compatible, and can then have its properties defined in the LockGuard V2 Config notecard which tells the LockGuard Item what its for, the behavior of its particle chain, etc.

If you have any questions, comments, or suggestions for LockGuard then send me, Lillani Lowell, a message and I will try my best to assist you.

Return to LockGuard

LockGuard Item Creation

There are two steps to creating a unique LockGuard Item.

  1. Copy the LockGuard V2 Script and LockGuard V2 Config notecard into the prim of the object where the chain will connect from.
  2. Edit the LockGuard V2 Config notecard, and change the ID [name] field.

LockGuard V2 Config

LockGuard can be used to make more than the cuffs which are included with the package. LockGuard can be used to make anything..... cuffs, collar leashes, fences, spider webs, riggings on ships, or anything that needs a particle chain linking from one object to another. But, because of the configurability of LockGuard, the one thing you have to do right is edit the LockGuard V2 Config notecard and give it an ID, which is really easy to do, but you still need to get it right!

Here's an example of a minimal LockGuard V2 Config notecard.....

ID leftwrist
ID wrists
ID allfour

..... this notecard allows the LockGuard V2 Script to configure itself with the ID of leftwrist. So, when someone makes a request from that avatar for the leftwrist item, then this is the LockGuard Item that will respond. If you wanted a right wrist, you would change the ID to rightwrist. If you wanted to create a floating sphere called George which links a particle chain then you'd use ID floatingspheregeorge. In this example, we also use ID wrists and ID allfour because according to the LockGuard Standard Tags they are associated, which allows for simple calling of multiple chains in one call. LockGuard is *unlimited* in the sense that you can create any kind of item you want to create simply by editing the LockGuard V2 Config notecard. For attachments, there is a standard list of common ID tags to use.

LockGuard V2 Standard ID Tags

LockGuard allows you to identify particle chains by ID, and you can specify any kind of ID you want, even multiple IDs in a single configuration file. Through these IDs you can then call a chain by its ID, or even multiple chains if they share the same ID. However.....

If you are making LockGuard-enabled attachments for avatars which will interact with other LockGuard devices (cuffs, collars, restraints, etc) then you should use the following ID tags which relate to your attachment. It is very important to use the proper tag, as failure to do so will result in your attachment not functioning as it should when a LockGuard device attempts to generate a chain from your attachment.

Here is the set of LockGuard V2 Standard ID tags which you should use when you are creating LockGuard-enabled attachments.

=========================
    Attachment Points
            ..... Head, Neck, Collar
=========================

ID collarfrontloop                  (the front loop of the collar, usually what leashes are attached to)
ID collarbackloop
ID collarleftloop
ID collarrightloop
ID leftearring
ID rightearring
ID nosering
ID leftnosering
ID rightnosering
ID upperlipring
ID lowerlipring
ID tonguering
ID gag
ID leftgag
ID rightgag
ID topheadharness
ID frontheadharness
ID backheadharness
ID leftheadharness
ID rightheadharness

=========================
    Attachment Points
            ..... Wrists, Ankles
=========================

ID leftwrist
ID rightwrist
ID leftankle
ID rightankle

    If you use leftwrist or rightwrist, also include:
    
ID wrists
ID allfour
        
    If you use leftankle or rightankle, also include:
    
ID ankles
ID allfour
        
=========================
    Attachment Points
            ..... Torso
=========================

ID leftnipplering
ID rightnipplering
ID harnessfrontloop
ID harnessbackloop
ID harnessleftloopfront
ID harnessrightloopfront
ID harnessleftloopback
ID harnessrightloopback
ID harnessleftshoulderloop
ID harnessrightshoulderloop
ID frontbeltloop
ID backbeltloop
ID leftbeltloop
ID rightbeltloop
ID bellyring
ID clitring
ID leftlabia
ID rightlabia
ID cockring
ID ballring
ID buttplug

=========================
    Attachment Points
            ..... Misc
=========================

ID leftupperarm
ID rightupperarm
ID leftupperthigh
ID rightupperthigh
ID leftknee
ID rightknee

    If you use leftnipplering or rightnipplering also include:

ID nipples

    If you use leftupperarm or rightupperarm, also include:
    
ID arms

    If you use leftupperthigh or rightupperthigh, also include:

ID thighs

    If you use leftknee or rightknee, also include:
    
ID knees

Going into further detail about the LockGuard V2 Config notecard.....

id [tag]
texture [key]
size [#] [#]
life [#]
gravity [#]
speed [#]
color [#] [#] [#]

.....these are options you can use to define your particle chain with the LockGuard V2 Script. And they are defined in the same matter as the command line versions. Once loaded by the LockGuard Item Script, anything you define in the LockGuard V2 Config notecard becomes the item's default, and unless told otherwise through the commandline parse will use them as the defaults. If anything changes your particle chains through commands, the LockGuard V2 Script will restore the defaults you specified when it unlinks.

Command Variable Explaination
link key This command will inform LockGuard that it should create a particle chain and link it to the key provided, the key can be any valid object or avatar key.
unlink N/A This command will inform LockGuard to unlink its particle chain. No variables are required.
gravity #grav This command will change the effect gravity has on your particle chains.
life #sec Sending this command will tell LockGuard how long each particle chain link should live in seconds, or in other words, how fast it should move from origin to destination. For instance, a value of 1 will create a faster, tigher particle chain while a value of 5 would create a loose, slower particle chain. Chain life can be modified "on the fly" as needed.
color #r #g #b Sending this command will change the color or tint of your particle chain. The values are red, green, blue, and each one is a value between 0 and 1, with 0 being dark, 0.5 being middle, and 1 being bright.
size #x #y Sending this command will tell LockGuard how large each particle chain link should be. The smaller the value, the smaller the particle links, and the less visible they are from a distance.
texture UUID If you want your furniture to change the default particle chain texture of the LockGuard Library then simply send this command and LockGuard will obediently swap out textures for you. There are two default textures included with LockGuard. One is a chain, the other is a rope. You can choose either of these by sending "rope" or "chain" as the UUID and LockGuard will automatically assign the default UUID for the one you choose.