OsGetParcelDwell

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Add a second exemple)
 
(4 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
|permissions=Use of this function is always allowed by default
 
|permissions=Use of this function is always allowed by default
 
|delay=0
 
|delay=0
|additional_info=This function was added in 0.9.1.0 Dev
+
|additional_info=This function was added in 0.9.1.0 Dev. July, 26 2019.
Implemented July, 26 2019 in GIT# 0163af970f7c0bf792ee12d2267c6122ca35fb98.
+
 
|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.
+
'''And with PARCEL_DETAILS_DWELL'''
Alternatively you can also use <b>PARCEL_DETAILS_DWELL</b> with the function <b>llGetParcelDetails.</b>
+
<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));
 +
    }
 +
}
 +
</source>
 +
|additional_info=
 
}}
 
}}

Latest revision as of 18: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