Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Reset Reset_System_by_PJW_Electronics  

Reset_System_by_PJW_Electronics

Put this script here into your reset button. It should already be in a link set.

Category: Reset
By : Pjanoo Windlow
Created: 2011-09-25 Edited: 2011-09-25
Worlds: Second Life

the Zip file

Download all files for Reset_System_by_PJW_Electronics
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Reset_System_by_PJW_Electronics_1.lsl
Get file # 2. Reset_System_by_PJW_Electronics_2.lsl
1 //Put this in your Reset button.
2
3 integer RESETME = 1;
4 list reset = ["Reset"];
5 string msg = "What would you like to do?";
6 key ToucherID;
7 integer channel_dialog;
8 integer listen_id;
9
10 default {
12 {
14 // }
16 // {
18 // need this to work in no script areas? Remove the forward slashes :)
19 channel_dialog = ( -1 * (integer)("0x"+llGetSubString((string)llGetKey(),-5,-1)) );
20 }
21
22 touch_start(integer total_number) {
23 llPlaySound("2b2ab242-239f-2a68-2043-95d2a1ec06ea", 1.0);
24 ToucherID = llDetectedKey(0);
25 llDialog(ToucherID, msg, reset, channel_dialog);
26 listen_id = llListen( channel_dialog, "", ToucherID, "");
27 }
28
29 listen(integer channel, string name, key id, string choice) {
30 if(choice == "Reset") {
31 llMessageLinked(LINK_SET, RESETME, "", NULL_KEY);
32 //do any other really cool stuff you want here, like make the button glow
33 llSleep(10);
34 state default;
35
36 }
37 }
38 }

Reset_System_by_PJW_Electronics

Put this script here into the prim you want to reset stuff in :)

Category: Reset
By : Pjanoo Windlow
Created: 2011-09-25 Edited: 2011-09-25
Worlds: Second Life

1 //Put this in the prim you want to reset scripts in
2
3 integer RESETME = 1;
4
5 default {
7 {
8
10 // }
12 // {
14 // need this to work in no script areas? Remove the forward slashes
15
16 }
17 link_message(integer sender, integer num, string params, key id)
18 {
19 if(num == RESETME)
20 {
21 llResetOtherScript("A"); //rename it to your needs
22 // llResetOtherScript("B");//sometimes we have more than one script.
23 // llResetOtherScript("C");//so you need to define each one that needs reset.
24 // ~ other fun things you can do with this include ~
25 // llSetScriptState("A", FALSE); //to turn stuff off
26 // llSetScriptState("B", TRUE); //to turn it back on.
27 }
28 }
29 }

Back to the Best Free Tools in Second Life and OpenSim.