removed useless _ folders
This commit is contained in:
3
Script_controller/Script_controller.sol
Normal file
3
Script_controller/Script_controller.sol
Normal file
@@ -0,0 +1,3 @@
|
||||
<Solution name="Script_controller">
|
||||
<Project name="Script_controller" path="Script_controller\Script_controller.prj" active="true"/>
|
||||
</Solution>
|
||||
@@ -0,0 +1,119 @@
|
||||
// :CATEGORY:Sensor
|
||||
// :NAME:Script_controller
|
||||
// :AUTHOR:Beer Dailey
|
||||
// :CREATED:2010-12-27 12:34:11.310
|
||||
// :EDITED:2013-09-18 15:39:01
|
||||
// :ID:722
|
||||
// :NUM:987
|
||||
// :REV:1.0
|
||||
// :WORLD:Second Life
|
||||
// :DESCRIPTION:
|
||||
// Ever since I noticed that many sims contain 1000's of wonderful objects with fancy effects and 1000's active scripts that use valuable simresources while no-one is around to enjoy it, I wanted to script something simple to offload those resources and give the visitor a better experience.
|
||||
//
|
||||
// That's why I made this little script: '1st necessity of SL' that could and should be used in any project that doesn't need to be active all the time.
|
||||
// :CODE:
|
||||
// Improve SecondLife's performance!
|
||||
|
||||
// Start with your own(ned) modifyable scripts/objects.
|
||||
|
||||
//
|
||||
|
||||
// This will disable your rootprim's script(s) when no-one is around to use/admire it
|
||||
|
||||
// thus stop wasting valuable sim-resources
|
||||
|
||||
//
|
||||
|
||||
// Measured script time is 0.002 ms on average.
|
||||
|
||||
//
|
||||
|
||||
// - don't use it for rental stuff or sorts, not everything is suitable -
|
||||
|
||||
//
|
||||
|
||||
// Free to use, please use it. Improvements are welcome.
|
||||
|
||||
// // Thank you Norton Burns for the testing and feedback :)
|
||||
|
||||
//
|
||||
|
||||
// Beer Dailey
|
||||
|
||||
//
|
||||
|
||||
// Don't reset this script or take it back in inventory when you're not within the set distance
|
||||
|
||||
// or you'll get unpredictable results !!
|
||||
|
||||
//
|
||||
|
||||
// modify below to suit your needs
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////
|
||||
|
||||
float distance = 48; // scan range
|
||||
|
||||
integer delay = 10; // repeat scan every 10 seconds.
|
||||
|
||||
|
||||
|
||||
// added
|
||||
|
||||
// (gnore specific scripts, some scripts need to be off after initial setups
|
||||
|
||||
// There's a bug that resets scripts in off state after a sim restart, so when activated again they re-initialise.
|
||||
|
||||
// I've no fix for that.
|
||||
|
||||
//
|
||||
|
||||
list ignore_scripts = ["major script", "even worse script"];
|
||||
|
||||
|
||||
|
||||
integer debug = FALSE; // for debugging purposes, set it to TRUE to see what it's controlling
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////
|
||||
|
||||
// no need to modify the code below //
|
||||
|
||||
//////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
integer g_active = FALSE; // if FALSE disable all other scripts
|
||||
|
||||
// changed TRUE into FALSE cos of some bug with rezzing, thank you LordGregGreg Back :)
|
||||
|
||||
list control_scripts; // list for all scriptnames
|
||||
|
||||
|
||||
|
||||
active_scripts( integer active )
|
||||
|
||||
{
|
||||
|
||||
if(g_active == active) return; else g_active = active; //flip TRUE/FALSE
|
||||
|
||||
|
||||
|
||||
integer a;
|
||||
|
||||
for ( a = 0; a < llGetListLength(control_scripts); a++)
|
||||
|
||||
{
|
||||
|
||||
llSetScriptState(llList2String(control_scripts, a), g_active); //(de)activate scripts
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (debug) llOwnerSay("Changed: " + llList2CSV(control_scripts) + " to: " + (string)g_active );
|
||||
@@ -0,0 +1,6 @@
|
||||
<Project name="Script_controller" guid="D88E07C7-6C00-1014-B904-200204C60A89">
|
||||
<Object name="Object" guid="D88E08F6-6C00-1014-B904-200204C60A89">
|
||||
<Script name="Script_controller_1.lsl" guid="D899C0DD-6C00-1014-B904-200204C60A89">
|
||||
</Script>
|
||||
</Object>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user