OsGetParcelDwell

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Small script improvement)
Line 5: Line 5:
 
|additional_info=This function was added in 0.9.1.0 Dev. July, 26 2019.
 
|additional_info=This function was added in 0.9.1.0 Dev. July, 26 2019.
 
|function_syntax=integer osGetParcelDwell(vector pos)
 
|function_syntax=integer osGetParcelDwell(vector pos)
 +
|description=This function allows you to get parcel dwell.
 +
Alternatively you can also use <b>PARCEL_DETAILS_DWELL</b> with the function <b>llGetParcelDetails.</b>
 
|ossl_example=<source lang = "lsl">
 
|ossl_example=<source lang = "lsl">
 +
//
 +
// osGetParcelDwell Script Exemple
 +
// Author: djphil
 +
//
 +
 
default
 
default
 
{
 
{
     state_entry() {;}
+
     state_entry()
 +
    {
 +
        llSay(PUBLIC_CHANNEL, "Touch to see osGetParcelDwell usage.");
 +
    }
  
 
     touch_start(integer number)
 
     touch_start(integer number)
 
     {
 
     {
         llSay(PUBLIC_CHANNEL, "Parcel Dwell: " + osGetParcelDwell(llGetPos()));
+
        vector position = llGetPos();
 +
        list details = llGetParcelDetails(position, [PARCEL_DETAILS_NAME]);
 +
         llSay(PUBLIC_CHANNEL, "Total dwell on parcel " + llList2String(details, 0) + " is " + osGetParcelDwell(position));
 
     }
 
     }
 
}
 
}
 
</source>
 
</source>
|description=This function allows you to get parcel dwell.
+
|additional_info=
Alternatively you can also use <b>PARCEL_DETAILS_DWELL</b> with the function <b>llGetParcelDetails.</b>
+
|
+
 
}}
 
}}

Revision as of 18:32, 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));
    }
}


Personal tools
General
About This Wiki