Difference between revisions of "Say Region Frames Per Second"
Jump to navigation
Jump to search
m (lsl code tagging) |
|||
Line 1: | Line 1: | ||
< | <lsl> | ||
default | default | ||
{ | { | ||
Line 29: | Line 29: | ||
} | } | ||
} | } | ||
</ | </lsl> | ||
{{LSLC|Examples}} | {{LSLC|Examples}} | ||
{{LSLC|Library}} | {{LSLC|Library}} |
Revision as of 14:37, 30 March 2008
<lsl> 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"); } }
} </lsl>