Jump to content

Automatic Sit on Prim


KiondraeLoc
 Share

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

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

Recommended Posts

The only way for an avatar to automatically sit on anything is with an RLV command.

http://wiki.secondlife.com/wiki/LSL_Protocol/RestrainedLoveAPI

Quote

Force sit on an object : @sit:<UUID>=force (*)
Implemented in v1.10

Does not work if the user is prevented from sit-tping and further than 1.5 meters away, or when prevented from unsitting.

BEWARE: genuine RLV viewers (Cool VL Viewer v1.26.20.28 and newer excepted) require that the seat got a sit-target defined (llSitTarget() LSL function), else the force-sit fails with a "No suitable surface to sit on" error message from SL server. RLVa viewers will succeed to sit the avatar on a sit-target-less seat, on the condition that the distance between the avatar and the seat is less than 8m.

(*) Silently discarded if the user is prevented from doing so by the corresponding restriction. This is on purpose.

To clarify, especially if you've never used RLV, these commands are used with llOwnerSay so the viewer can take action.

string target_prim_uuid;
llOwnerSay("@sit:" + target_prim_uuid + "=force");

Also to add; You can get the UUID of the rezzed object in the object_rez event, eg:

default
{
    state_entry()
    {
        // llRezObject
    }

    object_rez(key id)
    {
        llOwnerSay("@sit:" + (string)id + "=force");
    }
}

 

Edited by Wulfie Reanimator
Link to comment
Share on other sites

1 hour ago, Wulfie Reanimator said:

Also to add; You can get the UUID of the rezzed object in the object_rez event, eg:


default
{
    state_entry()
    {
        // llRezObject
    }

    object_rez(key id)
    {
        llOwnerSay("@sit:" + (string)id + "=force");
    }
}

 

This is partially incorrect.

You usually want to put an llSleep(0.1); before the RLV command as doing it too quickly after the object is rezzed will cause it to fail.

object_rez(key id) { llSleep(0.1); llOwnerSay("@sit:"+(string)id+"=force"); }

 

Link to comment
Share on other sites

  • 1 year later...

I'm just starting to understand RLV, and want to know if this can be used for other avatars?  Basically, if another avatar clicks on an object owned by me, can RLV force them to sit on another unlinked prim?  

 

I tried it with an alt, and when the alt clicked the object, it sat ME on the unlinked prim - which makes sense with the llOwnerSay() function.    I tried it with llInstantMessage() function, but it just IMed the toucher the RLV text.

 

Thanks!

Link to comment
Share on other sites

27 minutes ago, SmacemanSpiff Grau said:

I'm just starting to understand RLV, and want to know if this can be used for other avatars?  Basically, if another avatar clicks on an object owned by me, can RLV force them to sit on another unlinked prim?  

 

I tried it with an alt, and when the alt clicked the object, it sat ME on the unlinked prim - which makes sense with the llOwnerSay() function.    I tried it with llInstantMessage() function, but it just IMed the toucher the RLV text.

 

Thanks!

RLV will work directly on the owner of an object issuing RLV commands using, as you say, llOwnerSay. In order for that object to use RLV on someone who isn't its owner they must be wearing an RLV relay: this listens to chat commands from the object and relays them, in turn, to its owner using llOwnerSay.

The RLV relay protocol is decribed here: http://wiki.secondlife.com/wiki/LSL_Protocol/Restrained_Love_Relay/Specification.

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1259 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...