Jump to content

RLV-Scripting problem


Gharlane Cheviot
 Share

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

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

Recommended Posts

I searched the forum for my problem, but didn´t found a solution. If I overlooked a suitable thread I beg for a hint.

The problem:

I scripted a worn resitter after relog using the rlv-command @sit:...=force.

It works for any UUID but for the chosen one. I´ll checked it in a loop with rlv-debugging in firestrom (actual version). The command will be sent for maximum 240 times (every second). Sometimes it works after 20, sometimes after 120, sometimes never. with any other UUID it works. The object I wish to set the avatar is existing and the UUID ist correct.

Background:

  • rlv enabled
  • no other relay
  • no interfering other objects
  • Manual sitting by pie menu works without any problem
  • Click action has been changed to sit instead of touch
  • Pie menu titles for touch and sit have been changed by the target object
  • Exisiting restrictions (if there are some) will be reset before the sit-command

I have no clue, what happens. Is there any option in the target object, that can cause this strange and unstable behaviour. The target objects script has no touch-section, but a changed-section.

Most confusing is, that it works with any other object immediately.

Any hints? I am trying to fix that since several days now.

Again; thanks in advance.

BTW:  The rlv-debugger says:

 failed: @sit:3752b91d-d21a-b63b-cd5d-3b2ebac6ad06=force (invalid option)

After a while (sometimes) it changes to executes - and than it works

Link to comment
Share on other sites

Indeed it is an object the avatar previously sat on.

The relaypart of the avatar remembers the UUID and checked it out; thet uuid is correct.

Also before the @sit command is send I send some rlv-command to unset restrictions. (sittp, tploc, tplm, unsit, sit).

The resitter should start after logging in and sat the avatar on the object sat before logging out.

Especially annoying is, that sometimes it works - sometimes not. And I cannot find a pattern. I am under the impression, that it works, if I look at the target object. But that makes no sense.

Link to comment
Share on other sites

I don't quite what's going on here -- do you mean your relay isn't resitting you (which I would expect it to, if you had previously been force sat on the object) or are you talking about an item you are making?

I've just put this together quickly and it seems to work right away:

 

vector v;default{    state_entry()    {       // llSay(0, "Hello, Avatar!");    }    on_rez(integer p){        v = llGetAgentSize(llGetOwner());        if (v.z == 1.9){//almost certainly just logged in            llSetTimerEvent(1.0);        }        else {           llSensor("seat","",ACTIVE|PASSIVE,20.0,PI);        }    }        sensor(integer n){        llOwnerSay("@sit:"+(string)llDetectedKey(0)+"=force");      }        timer(){        v = llGetAgentSize(llGetOwner());        if(v.z!=1.9){            llSetTimerEvent(0.0);            llSensor("seat","",ACTIVE|PASSIVE,20.0,PI);        }    }}

 

  • Like 1
Link to comment
Share on other sites

If I'm understanding the OP correctly, this is a worn object, that when the avatar wearing it logs in, it will attempt to force-sit the avatar on the seat.

 

The most likely problem is the lack of a delay between the attach() event and the attempt to re-force-sit.

 

The seat object may not be fully loaded yet.  When you log in, objects get loaded around you.  Distance, visibility, and complexity all play a role in how long it takes them to load.  Same with the objects you are wearing!  Since you say it works sometimes, and sometimes not, I'm betting this is the likely issue.

 

Set a timer from the attach() event of the worn object (to delay 10-15 seconds before executing the force-sit), or re-work your scripts to have the seat and worn object do some chat-based syncing up  (worn object says something on attach, and repeats it every x seconds, for up to 10 times, and seat object hears it and responds.  On response, worn object can do the force-sit.)

 

 ETA: (Without seeing your code, we won't be able to offer more than generalized speculation.....)

 

  • Like 1
Link to comment
Share on other sites

How about using a llSensorRepeat instead of a fixed timer? Detecting the object with the given UUID should mean it's rezzed, shouldn't it?

I'd think rezzed or not should not matter since the sim knows it's there. What I don't know is if the client has some code preventing sitting on anything the client doesn't see.

  • Like 1
Link to comment
Share on other sites

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