OsGetParcelDwell

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Small script improvement)
(Add a second exemple)
 
Line 25: Line 25:
 
         list details = llGetParcelDetails(position, [PARCEL_DETAILS_NAME]);
 
         list details = llGetParcelDetails(position, [PARCEL_DETAILS_NAME]);
 
         llSay(PUBLIC_CHANNEL, "Total dwell on parcel " + llList2String(details, 0) + " is " + osGetParcelDwell(position));
 
         llSay(PUBLIC_CHANNEL, "Total dwell on parcel " + llList2String(details, 0) + " is " + osGetParcelDwell(position));
 +
    }
 +
}
 +
</source>
 +
'''And with PARCEL_DETAILS_DWELL'''
 +
<source lang = "lsl">
 +
//
 +
// PARCEL_DETAILS_DWELL Script Exemple
 +
// Author: djphil
 +
//
 +
 +
default
 +
{
 +
    state_entry()
 +
    {
 +
        llSay(PUBLIC_CHANNEL, "Touch to see PARCEL_DETAILS_DWELL usage.");
 +
    }
 +
 +
    touch_start(integer number)
 +
    {
 +
        list details = llGetParcelDetails(llGetPos(), [PARCEL_DETAILS_NAME, PARCEL_DETAILS_DWELL]);
 +
        llSay(PUBLIC_CHANNEL, "Total dwell on parcel " + llList2String(details, 0) + " is " + llList2String(details, 1));
 
     }
 
     }
 
}
 
}

Latest revision as of 17:33, 1 December 2020

integer osGetParcelDwell(vector pos)
This function allows you to get parcel dwell.

Alternatively you can also use PARCEL_DETAILS_DWELL with the function llGetParcelDetails.

Threat Level This function does not do a threat level check is unknown threat level
Permissions Use of this function is always allowed by default
Extra Delay 0 seconds
Example(s)
//
// osGetParcelDwell Script Exemple
// Author: djphil
//
 
default
{
    state_entry()
    {
        llSay(PUBLIC_CHANNEL, "Touch to see osGetParcelDwell usage.");
    }
 
    touch_start(integer number)
    {
        vector position = llGetPos();
        list details = llGetParcelDetails(position, [PARCEL_DETAILS_NAME]);
        llSay(PUBLIC_CHANNEL, "Total dwell on parcel " + llList2String(details, 0) + " is " + osGetParcelDwell(position));
    }
}

And with PARCEL_DETAILS_DWELL

//
// PARCEL_DETAILS_DWELL Script Exemple
// Author: djphil
//
 
default
{
    state_entry()
    {
        llSay(PUBLIC_CHANNEL, "Touch to see PARCEL_DETAILS_DWELL usage.");
    }
 
    touch_start(integer number)
    {
        list details = llGetParcelDetails(llGetPos(), [PARCEL_DETAILS_NAME, PARCEL_DETAILS_DWELL]);
        llSay(PUBLIC_CHANNEL, "Total dwell on parcel " + llList2String(details, 0) + " is " + llList2String(details, 1));
    }
}


Personal tools
General
About This Wiki