Jump to content

Creating RLV enabled items


DulceDiva
 Share

You are about to reply to a thread that has been inactive for 388 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi.I create original meshes and would like to make some of them RLV enabled. What kind of script do you put it and where exactly do you get it from? Also, how do you add specific RLV functions (like talking,detaching item etc.)?

Any kind of advice is aporeciated 😁

Link to comment
Share on other sites

Generally speaking, to make something "RLV enabled," it needs an RLV relay in it.

The way RLV works, is the viewer is responding to commands from llOwnerSay (a normal LSL function). This means that only the owner's viewer can apply restrictions only to itself. So, if someone else wants to prevent you sitting, they need to send a command to your relay, so that your RLV relay will repeat the command to yourself.

OpenCollar is probably still the most widespread system (I don't remember the specifics of their drama), so you can get their relay from their sim. Other relays might be compatible.

Edited by Wulfie Reanimator
Link to comment
Share on other sites

12 hours ago, Wulfie Reanimator said:

Generally speaking, to make something "RLV enabled," it needs an RLV relay in it.

No. Do not put a RLV relay in anything that is not a dedicated RLV relay, or maybe a collar. Do not put opencollar scripts in an object that is not a collar, without a rigorous understanding of how those scripts will interact if someone is also wearing an opencollar as well as your object.

To make a 'RLV item' you have to consider whether the object is intended to be worn by the user, or is rezzed out like a piece of furniture.

Worn:

For worn items, all you have to do is add 'RLV command' statements to a script, like llOwnerSay("@detach=n"); the RLV API spec can be found here: LSL Protocol/RestrainedLoveAPI - Second Life Wiki  . The RLV system usually works on the model of 'restrictions'. You generally add a restriction with llOwnerSay("@restriction:parameter=n") and remove it with llOwnerSay("@restriction:parameter=y"); or llOwnerSay("@clear"); to reset everything your item may have restricted. It's a good idea to play around with the RLV console in your viewer to get a feeling for what each RLV restriction you might want to use does, and to be familiar with other RLV products and what restrictions they use (you can list all RLV restrictions you're under in the RLV menu 'RLV->RLV Status...')

Furniture:

Furniture is a bit different in that it needs to communicate with a RLV Relay via the RLV Relay Protocol: LSL Protocol/Restrained Love Relay/Specification - Second Life Wiki

It's not too complicated on the furniture side, you do not need to implement a RLV relay, just expect the user to have one, or direct them to a free one to use, such as the one I posted a few days ago or the DEM relay It can be a bit challenging getting everything correct on your first try though. It's not as straight forward as it is with a worn item. Everything you need to know is in the spec, but as an example, here's a basic 'RLV Volume' which adds restrictions when someone enters the 'phantom'(llVolumeDetect) object, releases them when they leave, and correctly responds to ping requests from the relay:

string restrict= 
    "@tploc=n|@tplm=n|@tplocal=n|@camdistmax:5=n|@fartouch:3=n|@showloc=n|@showminimap=n|@sittp=n";
default
{
    state_entry()
    {   llVolumeDetect(TRUE);
        llListen(-1812221819,"","","ping,"+(string)llGetKey()+",ping,ping");
    }
    listen(integer Channel, string Name, key ID, string Text)
    {   llSay(-1812221819,"ping,"+(string)llGetOwnerKey(ID)+",!pong");
    }
    collision_start(integer n)
    {   while(~--n)
        {   key ID = llDetectedKey(n);
            if(ID!=llGetOwner())
            {   llRegionSayTo(ID,-1812221819,"RLV Volume,"+(string)(ID)+","+restrict);
            }
        }
    }
    collision_end(integer n)
    {   while(~--n)
        {   key ID = llDetectedKey(n);
            llRegionSayTo(ID,-1812221819,"RLV Volume,"+(string)(ID)+",!release");
        }
    }
}

I should also mention AVsitter has some RLV plugins (I don't know where you'd buy them). On the consumer-side of AVsitter+RLV objects, I find them much less desirable than objects that were hand-scripted with RLV in-mind, but it is an option.

Edited by Quistess Alpha
  • Thanks 3
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 388 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...