Jump to content

RLV temp attachments


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

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

Recommended Posts

Has anyone ever had issues or figured a way around issues regarding RLV in temp attachments?

llOwnerSay("camdistmax:10=n);

Works fine as a standard attachment.

Works sporadically as a temp attachment.

I tried putting in the attach event, delayed timer etc and it only works half the time when in a temp attachment.

Link to comment
Share on other sites

I haven't but given that you're doing testing at the moment, I'll presume there is some issue there.

The alternatives to tempAttach are regular llAttachToAvatar, and #RLV folder attaching. llAttach is a pain, because it doesn't handle ownership transfer, you have to get the recipient to buy the object (for 0L$) before it can attach, and #RLV folder attaching has all kinds of timing and communication issues that need to be handled delicately in the script.

For being stubborn in a temp attachment, you could try @getstatus to confirm/deny the rlv was successfully applied, and retry if no/unexpected response received.

Edited by Quistess Alpha
Link to comment
Share on other sites

1 hour ago, Quistess Alpha said:

I haven't but given that you're doing testing at the moment, I'll presume there is some issue there.

The alternatives to tempAttach are regular llAttachToAvatar, and #RLV folder attaching. llAttach is a pain, because it doesn't handle ownership transfer, you have to get the recipient to buy the object (for 0L$) before it can attach, and #RLV folder attaching has all kinds of timing and communication issues that need to be handled delicately in the script.

Sadly the person wants this hud to attach via experience seamlessly

Maybe might have to fudge it using camera params and if the camera is x away then rest back to position or something.

Edited by ItHadToComeToThis
Link to comment
Share on other sites

27 minutes ago, ItHadToComeToThis said:

might have to fudge it using camera params

camera params don't work if the camera is unlocked from the avatar, which, depending on how one uses the camera, could be most of the time.

Link to comment
Share on other sites

Apparently, the attach event triggers before permissions are even accepted? anyway this seems to work as a toy example:

integer gHandleListenRLV;
integer gChanListenRLV = 1728;

integer gTriesGetRLV = 0;
default
{
    on_rez(integer n)
    {
        if(!llGetAttached())
        {   llRequestPermissions(llGetOwner(),PERMISSION_ATTACH);
        }
    }
    run_time_permissions(integer perms)
    {   if(perms&PERMISSION_ATTACH)
        {   llAttachToAvatarTemp(ATTACH_HUD_CENTER_1);
        }
    }
    attach(key ID)
    {   gTriesGetRLV = 3;
        gHandleListenRLV = llListen(gChanListenRLV,"",llGetOwner(),"");
        llSetTimerEvent(0.5);
        llOwnerSay("@camdistmax:10=n,getstatus="+(string)gChanListenRLV);
    }
    listen(integer Channel, string Name, key ID, string Text)
    {   llOwnerSay("RLV activation confirmed: \n"+Text);
        llSetTimerEvent(0);
    }
    timer()
    {   --gTriesGetRLV;
        if(gTriesGetRLV>0)
        {   llOwnerSay("RLV not received, retrying");
            llOwnerSay("@camdistmax:10=n,getstatus="+(string)gChanListenRLV);
        }else
        {   llOwnerSay("RLV failed. No more retries.");
            llSetTimerEvent(0);
        }
    }
}

 

Link to comment
Share on other sites

1 hour ago, Wulfie Reanimator said:

Example?

Ignore me, I confused myself in testing by using scripts that had already been running and had triggered the timer before being rezzed, which resulted in confusing behavior.

Edited by Quistess Alpha
Link to comment
Share on other sites

5 hours ago, ItHadToComeToThis said:

wants this hud to attach via experience seamlessly

Make sure the experience is rated moderate or greater. it was made so that RLV commands issued from a script compiled with an experience inside temp attached object only work if the experience rating is above moderate.

Edited by Extrude Ragu
clarify
Link to comment
Share on other sites

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