Jump to content

Experiences don't work with Deeded objects?


Paul Hexem
 Share

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

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

Recommended Posts

So, I've got a greeter at a landing point that asks you to accept an Experience. Works fine.

I've also got a subdivided parcel that's group only, and I'm trying to use the Experience to teleport agents off of it. However, on group land, you have to deed objects to group for teleport/eject to work. It seems like once you deed an object to group, it no longer works with Experiences? The script below ejects people even when they're in the Experience.

 

default
{
    state_entry()
    {
        llSetTimerEvent(5.0);
    }
    timer()
    {
        list avatarsInRegion = llGetAgentList(AGENT_LIST_PARCEL, []);
        integer numOfAvatars = llGetListLength(avatarsInRegion);
        if(numOfAvatars >= 0)
        {
            integer index = 0;
            while(index < numOfAvatars)
            {
                key id = llList2Key(avatarsInRegion, index);
                list details = llGetObjectDetails(id, [OBJECT_BODY_SHAPE_TYPE]);
                float gender = llList2Float(details, 0);
                integer group = llSameGroup(id);
                if(gender >= 0.5)
                {
                    if(!group)
                    {
                        llRegionSayTo(id, 0, "Sorry, ladies and/or group members only.");
                        llDialog(id, "Sorry, ladies and/or group members only.", ["Sorry"], -1);
                        llSleep(1.0);
                        if(llAgentInExperience(id))
                        {
                            llTeleportAgent(id, "Landmark", ZERO_VECTOR, ZERO_VECTOR);
                        }
                        else
                        {
                            llEjectFromLand(id);
                        }
                    }
                }
                ++index; 
            }      
        }
    }
}

 

Link to comment
Share on other sites

Did you make sure you compiled your script with an experience? I've got in a hurry and forgot sometimes, heh.

Here is an example script that runs checks in state_entry() to see if there are any experience related issues before running an application.

I added a few other things to help in a deeded environment.

Check_Owner()
{
    owner = llGetOwner();
    list T = llGetObjectDetails(llGetKey(),[OBJECT_GROUP,OBJECT_LAST_OWNER_ID]);
    if (owner == llList2Key(T,0)) //deeded
    {
        owner = llList2Key(T,1);
    }
}
Message(string s)
{
    if (llGetAgentSize(owner))
    {
        llRegionSayTo(owner,0,s);
        llSleep(0.25); //SVC-7504
        return;
    }
    llInstantMessage(owner,s);
}
key owner = NULL_KEY;
default
{
    state_entry()
    {
        Check_Owner();
        list GED = llGetExperienceDetails(NULL_KEY);
        if (GED)
        {
            integer error = (integer)llList2String(GED,3);
            if (!error)
            {
                Message("Application is online.");
                llSetTimerEvent(5.0);
            }
            else
            {
                Message("Cannot start application due experience error " + (string)error + ", '" + llList2String(GED,4) + "'.");
            }
        }
        else
        {
            Message("No experience is compiled with the script, '" + llGetScriptName() + "'...");
        }
    }
    on_rez(integer i)
    {
        llResetScript();
    }
    touch_end(integer i)
    {
        Check_Owner();
        if (llDetectedKey(0) == owner)
        {
            Message("Resetting script...");
            llResetScript();
        }
    }
    timer()
    {
        //DO STUFF
    }
    changed(integer i)
    {
        if (i & CHANGED_OWNER)
        {
            Check_Owner();
        }
    }
}

 

Edited by Lucia Nightfire
  • Like 1
Link to comment
Share on other sites

Also, there is a chance that dropping such a scripted object into a region that does not have your experience info cached that the script may also think no experience is compiled until the server gets the experience data from the experience servers.

This can also happen after region start for several minutes. Its very rare, but this state can also "stick" indefinitely until another region restart.

Link to comment
Share on other sites

1 hour ago, KT Kingsley said:

Not something I'm familiar with, so this is a wild guess, but have you set the Experience to the same group as you've set for the parcel and deeded the object to?

Oh, and allowed that experience in the parcel?

You do not have to associate a group with an experience unless you want to employ Contributors.

  • Thanks 1
Link to comment
Share on other sites

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