Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Discussion: The Little Box Of Calm

Gaynor Gritzi
Registered User
Join date: 16 Aug 2006
Posts: 48
01-27-2007 12:09
I've learnt lots from the forums, so I thought I'd give this little piece back.

It's a thing I made when I was trying to find out how prims communicate.

It has no purpose except to bring about World Peace.

There's some photos of some setups I did with it.....
http://www.flickr.com/photos/gritzi/sets/72157594502845561/

Full instructions in the script......

CODE

//*************************************
//******* The Little Box Of Calm ******
//****** Script by Gaynor Gritzi ******
//*************************************

// The purpose of this script is to bring about World Peace.
// Well you've got to try haven't you!

// Offered free to the world, to use and alter as you will,
// though a namecheck would be appreciated.

//****** INSTRUCTIONS ******

// Create a standard empty cube.
// Put this script inside it.
// Take the cube into your inventory.
// Drag out and place on the ground as many boxes as you want.

// The boxes use llWhisper to talk to each other,
// So each box should be within 10m of another box,
// Or it won't be able to chant for World Peace.

// Click any box to start the chanting.

// You can also issue instructions using chat.
// The boxes use channel 99 to listen.
// This will only work when the boxes are quiet,
// Because when the boxes chant, they are deaf to all distractions.

// Saying "/99 Calm" will start all boxes in listening range chanting.
// Saying "/99 Clean" will delete all boxes in listening range - a big timesaver.
// The length of the chants can be adjusted by using these phrases.....
// "/99 Short", "/99 Medium", "/99 Long", "/99 Longer" or "/99 Longest".

//****** RECOMMENDATIONS ******

// Like many of the things that I build,
// The boxes have a lighting effect built in,
// And are best seen with your world turned to Midnight
// And Local Lights switched on.

// Try setting out the boxes in different configurations....
// In a straight line, thrown about at random, build a wall, put them in the air.
// Though if you want to create a neverending circle of chants,
// You'll have to start a broken circle chanting,
// And then fill it in once chanting is underway.
// Warning - if the circle is big enough,
// The chanting will carry on forever,
// Which may just be long enough to bring about World peace.

//****** ACKNOWLEDGEMENTS ******

// The chant is a six second clip taken from a 20 minute chant
// (and I like to think I picked the very best 6 seconds),
// Supplied copyright free from the nice people at....
// http://ayurveda-berkeley.com/
// Who specialise in Indian Ayurvedic Medicine.


integer length = 10;

default
{
// Put a texture on the box, give it a name and set up listening
state_entry()
{
llSetObjectName("The Little Box Of Calm - Created By Gaynor Gritzi");
llSetTexture("93fb4717-449d-8235-d24e-2e0133de2a50", ALL_SIDES);
llListen( 99, "", NULL_KEY, "" );
}

// Starting listening and message handling.
listen(integer channel, string name, key id, string message)
{
if (llToLower(message) == "calm") { state chanting; }
if (llToLower(message) == "clean") { llDie(); }
if (llToLower(message) == "short") { length = 1; }
if (llToLower(message) == "medium") { length = 10; }
if (llToLower(message) == "long") { length = 30; }
if (llToLower(message) == "longer") { length = 90; }
if (llToLower(message) == "longest") { length = 270; }
}

// Start chanting if box is clicked
touch_start(integer total_number) { state chanting; }
}


// This handles the chanting
state chanting
{
state_entry(){
// Turn on light and set up hovering text
llSetPrimitiveParams ([PRIM_POINT_LIGHT, TRUE, <1, 1, 1>, 1.0, 3.0, 0.75] );
llSetText("Chanting For World Peace", <1,1,1>, 1.0 );

// Set volume and start a loop for the chant
llAdjustSoundVolume( 1.0);
llLoopSound("8c62cfcc-697c-d4de-a057-b16efd5b0c51", 1.0 );

// A bit of a delay so everything doesnt happen at once
llSleep (6);

// Tell the next box to be calm too
llWhisper(99, "calm");

// Do nothing while the chant continues for right amount of time
llSleep (length);

// Do a slow fade out.
float volume = 100;
for (volume = 100; volume >= 0; volume --)
{
llAdjustSoundVolume( volume / 100);
llSleep (0.2);
}

// Stop all sound
llStopSound();

// Reset hover text and turn off light.
llSetText("", <1,1,1>, 1.0);
llSetPrimitiveParams ([PRIM_POINT_LIGHT, FALSE, <1, 1, 1>, 1.0, 3.0, 0.75] );

// Go back to default state and wait for something to happen.
state default;
}
}


---------------------------------------------------------------
Edited to correct mistakes pointed out by Dustin Widget
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
Original Thread
01-28-2007 21:39
/15/8f/162904/1.html
_____________________
i've got nothing. ;)
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
01-28-2007 22:24
I gotta give you credit.. that's REALLY a nice little toy.

The premise is great, but I'd like to make a few mods to the concept.. just for giggles. You've given me a great idea though.. so I will definitely post the results here.
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Dustin Widget
Script Monkey for hire
Join date: 15 Feb 2006
Posts: 101
01-29-2007 00:27
Just for the record, in your llSetText, color ranges from <0,0,0> to <1,1,1>, so your <3,3,3> is not right, although it looks like it still works. Great toy though.

Edit**
And the alpha is between 0 and 1

Not being overly critical, just lending my observation.
Gaynor Gritzi
Registered User
Join date: 16 Aug 2006
Posts: 48
Mistakes Corrected
01-29-2007 05:11
The original version of this was actually going to be called "The Little Box Of Barbershop" - in which different boxes would sing different barbershop harmonies, all in synchronisation.

But I couldn't find any suitable sound samples.

If anybody knows a barbershop group who would be prepared to waste their time recording their voices as seperate harmonies, then let me know.

Make any changes you want Winter - and let us see them.

And I pasted the hovertext code from elsewhere at the last minute and never checked it! Doh! Fixed now.
Thaumata Strangelove
Registered User
Join date: 16 Nov 2005
Posts: 17
nice!
02-16-2007 10:39
This is super fun. I love recording one-man choir pieces... maybe I can make you something for in there soon. If I do, I will let you know.

You can also get loads of cool free sounds over at splicemusic.com and http://freesound.iua.upf.edu/

They're all Creative Commons licensed.

:)
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
02-17-2007 00:20
I tried modding it.. but I got lost.. then I got bored.

I spent a boatload of time making textures to make it into a meditation seat.. but I never managed to get the thing working after all my mods.

Anyways, if you want a copy of the prim I made, kitbashed textures included... I'll be happy to shoot that back to you in world. (sorry)
_____________________

● Inworld Store: http://slurl.eclectic-randomness.com
● Website: http://www.eclectic-randomness.com
● Twitter: @WinterVentura
Gaynor Gritzi
Registered User
Join date: 16 Aug 2006
Posts: 48
03-16-2007 15:42
You can now pick up a ready made Little Box Of Calm at SLExchange for 0$.

The box also includes a dispenser that you can set up on your land and give out The Little Box Of Calm to your visitors.

http://slexchange.com/modules.php?name=Marketplace&file=item&ItemID=203854