atomic-raygun

 
             

   
 
 
----------->vivian-oblivion<--------

Site Feed

www.flickr.com

31 August 2011

 
OBJECT_SCRIPT_TIME

The script info in the land pane has been very useful to me since it arrived last year (Babbage wrote it I believe). Most recently I've used it to cut down script impact on pieces of my robot avatar (whgich has things like an arm that has a rotating spiral and pincers that clench/unclench when I walk, etc.). The most recent script impact assessment tool came out last week, though, and it's the ability to find out OBJECT_SCRIPT_TIME with lsl.

Chalice Yao has a nice forum post with scripts for objects and avatars over at SLU - thank you, Chalice.

Here's the one for objects:

key kTarget;
string sTarget;
integer iTemp;
string sTemp;
list lTemp;
default
{
state_entry()
{
llSetTimerEvent(0.01);
sTarget=llKey2Name(kTarget=llGetObjectDesc());
}
timer()
{
llSensor("","",ACTIVE,96,PI);
}
sensor(integer foo)
{
iTemp=0;
do
{
if(llDetectedType(iTemp) & SCRIPTED)
{
sTemp="";
sTemp+=llDetectedName(iTemp)+"\n";
sTemp+="Time: "+llGetSubString((string)(llList2Float(lTemp=llGetObjectDetails(llDetectedKey(iTemp),[OBJECT_SCRIPT_MEMORY,OBJECT_SCRIPT_TIME,OBJECT_TOTAL_SCRIPT_COUNT]),1)*1000),0,4)+"ms\n";
sTemp+="Memory: "+(string)(llList2Integer(lTemp,0)/1024)+"kb\n";
sTemp+="Amount: "+llList2String(lTemp,2);
llSetText(sTemp,<1,1,1>,1);
jump a;
}
}
while((iTemp=-~iTemp) < foo); @a; } no_sensor() { llSetText("",<1,1,1>,0);
}
}


posted by - 12:09 PM

Comments:
That script turned my brain into a writhing mass of worms!
 

Post a Comment

PLZ LEEVE A MEZZAGE KTHNXBAI

 

.

Site Feed

vivian-oblivion

oblivionstore

firemist red

Combat Cards

Blip TV Rocks

So many things to do, so little motivation

Backpacking Burro

Salazar Jack

Lucy Sits Up and Blogs

Tina's Universum

Nova Albion Detective Agency

Playing Statues

Yarn Miracle

Baedeker

Don Carson Creative

Flummer, Flummel, Flummo

Elle Coyote

Painting Soul

Upload Video and Images - Putfile

Artists Union

Tempietto

2002-10 2002-11 2002-12 2003-01 2003-03 2003-04 2003-05 2003-06 2003-07 2003-08 2003-09 2003-10 2003-11 2003-12 2004-01 2004-02 2004-03 2004-04 2004-05 2004-06 2004-07 2004-08 2004-09 2004-10 2004-11 2004-12 2005-01 2005-02 2005-03 2005-04 2005-05 2005-06 2005-07 2005-08 2005-09 2005-10 2005-11 2005-12 2006-01 2006-02 2006-03 2006-04 2006-05 2006-06 2006-07 2006-08 2006-09 2006-10 2006-11 2006-12 2007-01 2007-02 2007-03 2007-04 2007-05 2007-06 2007-07 2007-08 2007-09 2007-10 2007-11 2007-12 2008-01 2008-02 2008-03 2008-04 2008-05 2008-06 2008-07 2008-08 2008-09 2008-10 2008-11 2008-12 2009-01 2009-02 2009-03 2009-04 2009-05 2009-06 2009-07 2009-08 2009-09 2009-10 2009-11 2009-12 2010-01 2010-02 2010-03 2010-04 2010-05 2010-06 2010-07 2010-08 2010-09 2010-10 2010-11 2010-12 2011-01 2011-02 2011-03 2011-04 2011-05 2011-06 2011-07 2011-08 2011-09 2011-10 2011-11 2011-12 2012-01 2012-02 2012-03 2012-04 2012-05 2012-06 2012-07 2012-08 2012-09 2012-10 2012-11 2012-12 2013-01 2013-02 2013-03 2013-04 2013-05 2013-06 2013-07 2013-08 2013-09 2013-10 2013-11


I want to ask for thoughts about improving the world -- what do people need? How can things be organised?