// Two scripts in same prim:<br />
<br />
// Script 1 the switch on off<br />
<br />
// Script name: Rain on off<br />
<br />
integer PLAY_SOUND = TRUE; // TRUE for a click-sound, FALSE for silent.<br />
string SOUND = "64319812-dab1-4e89-b1ca-5fc937b8d94a"; // a click sound<br />
string CONTROLLER_ID = "A"; // see more about CONTROL TEMPLATES at end.<br />
integer mode = 0; // keep track of whether particles are ON(1) or OFF(0).<br />
<br />
default {<br />
touch_start(integer total_number) {<br />
<br />
if ( PLAY_SOUND ) llPlaySound( SOUND, 1.0 ); <br />
<br />
mode = ! mode; // flip on to off, (or off to on).<br />
<br />
llMessageLinked( LINK_SET, mode, CONTROLLER_ID, NULL_KEY ); // send command<br />
<br />
}<br />
<br />
// Listen for other controllers sending ON/OFF commands and remember changes:<br />
<br />
link_message( integer sibling, integer num, string controller_id, key ignore ) {<br />
<br />
if ( controller_id != CONTROLLER_ID ) return; // this message is not for us.<br />
<br />
mode = num;<br />
<br />
}<br />
<br />
}<br />
<br />
// ####################### EOF ##########################<br />
<br />
<br />
// Script 2 the rain<br />
// Script name: Rain<br />
<br />
<br />
integer PLAY_SOUND = TRUE; // TRUE for a click-sound, FALSE for silent.<br />
string SOUND = "64319812-dab1-4e89-b1ca-5fc937b8d94a"; // a click sound<br />
string CONTROLLER_ID = "A"; // see more about CONTROL TEMPLATES at end.<br />
integer mode = 0; // keep track of whether particles are ON(1) or OFF(0).<br />
<br />
default {<br />
<br />
touch_start(integer total_number) {<br />
<br />
if ( PLAY_SOUND ) llPlaySound( SOUND, 1.0 ); <br />
<br />
mode = ! mode; // flip on to off, (or off to on).<br />
<br />
llMessageLinked( LINK_SET, mode, CONTROLLER_ID, NULL_KEY ); // send command<br />
<br />
}<br />
<br />
// Listen for other controllers sending ON/OFF commands and remember changes:<br />
<br />
link_message( integer sibling, integer num, string controller_id, key ignore ) {<br />
<br />
if ( controller_id != CONTROLLER_ID ) return; // this message is not for us.<br />
<br />
mode = num;<br />
}<br />
}<br />
<br />
// ####################### EOF ##########################
Mattt McGregor: The Goddess is dead. Long live JaM's. And Rogue, we've waited what feels like forever you!!! 2 days ago |
Nico Kalani: Not on the list at the moment: the Alphabet Club. It's a dance club for the LGBT+ community and friends on Xinashi. I built it when Stark closed a couple of years ago. I just recently re-opened it. I'... 2 days ago |
LadyKa: Une soirée théâtre en langue française ! Super ! 2 days ago |
Thirza Ember: For the record, Jup, that wasn't barf. yesterday |
Jared Seda: THANKS FOR THIS!!! 2 days ago |
Arielle: Is that a picture of a couple dancing or fighting? It's hard to tell! 2 days ago |
RemmyRavenhurst: Suddenly feels sea sick! :) 2 days ago |
KaydiRose: Thankyou for stopping by! 2 days ago |
Xenon Darrow: such a beautiful place. I love being a part of it. 3 days ago |
LeonitasLionheart: while there might be many other reasons to do so, i am giving this post a Like straightaway simply for the snake on the arch ;) 3 days ago |
RemmyRavenhurst: Leo and i bought this build and that blue room is quiet stunning. 2 days ago |
Nico Kalani: Forgiveness is warranted if the person can sincerely and honestly admit to their bad behavior toward me, and if I care enough about having a relationship with them instead of indifference. Usually, th... yesterday |
Uncover the ultimate Apple smartwatch of 2024! Explore our detailed comparison between the Apple Watch Ultra 2 and the Apple Watch Series 9
No comments yet