Say Region Frames Per Second

From Second Life Wiki
Revision as of 11:58, 27 April 2007 by Strife Onizuka (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
default
{
    state_entry()
    {
        llListen(0,"",llGetOwner(),"region fps");
    }
    on_rez(integer code)
    {
        llResetScript();
    }
    listen(integer c,string n,key i,string m)
    {
        float fps = llGetRegionFPS();
        string region = llGetRegionName();
        llSay(0,region + " fps is:" + (string)fps);
        if(fps > 27)
        {
            llSay(0,region + " is running smoothly");
        }
        else if(fps > 15)
        {
            llSay(0,region + " is running slowly");
        }
        else
        {
            llSay(0,"CAUTION: " + region + " is in danger of crashing");
        }
    }
}