Saturday, March 08, 2008

Scripted Gift Box in Second Life

One of the things that people do a lot in Second Life is throw parties, frequently with gifts.

The problem has always been that the gifts had to be put into prims to be given. Nicely textured prims, made to look like wrapped packages, with more prims to look like ribbons and bows on the top, to be sure. But just prims.

Which meant, when the time came to give the gift, it had to be picked up, and dragged onto the other person, who then had to rez it in world again to actually open it, or it had to be sold to them for zero Linden Dollars, which meant there was a risk that someone else would buy it, for free, before the person who was supposed to get it could.

The scripts in this box change all of that, and they're really fun, too!

Image of the Gift, both closed and open, with swatches of the 11 paper designs. Blurb says 'Scripted Gift Box! Mod/Transfer, 11 paper colors, 11 Box Colors, Sound & Particles, Menu System for Setup. Tons of fun!'


Now, you can set the Gift to be given only to the specific person you name, on the date you say they can have it. Their name, a message, and the date are all displayed in Floating Text above the box, in one of 11 colors you can choose (or you can choose not to show it, if you're not fond of Floating Text.)

When the person named touches the box, on or after the date you've specified, they get a menu letting them open it, or wait a bit.

If they choose to open it, it really opens! The top slides off, the ribbons fall away, the gift tag lands next to the box, and at the same time a trumpet fanfare sounds, and gold stars explode from inside the box, while it says whatever message you've given it to say, in Open Chat.

While all this is going on, the box also offers all its contents to that person (except the scripts, sound and particle texture that make it work.) Even things that are no-copy! (This is a big deal in SL, since objects normally only give copyable stuff, and most of the things you can give people are no-copy.)

Then the box closes itself again, and the owner can pick it up, and use it for the next occasion.

As if that wasn't enough, the menus also allow you to choose from 11 preset paper designs, to mix and match with 11 different ribbon colors.

If none of them suit you, you can just use your own textures for the paper. The box is Modifiable, so you can retexture or resize it, or tint the ribbon any color you like. (You can also put something inside the box, and link it, so that the box doesn't look empty when it opens.)

There's a tag on the box that you can personalize, too. Or you could just remove it (or make it transparent) if you don't like it.

At the moment, there's just one design; Gold Star paper, in eleven colors, with a brilliant bow on the top. But I have lots more planned, now that I've gotten the scripts hammered out!

If you are a Resident of SL, you can see it in the Party Tent behind Kick the Can, on Livingtree Island. See my picks (Robin Sojourner) for a Teleport.

(Thanks to Eladon Galsworthy, who wrote the base script that makes the box open, and to Liandra Ceawlin, who gave me the script that lets it check the time, so it would open not just on the date set, but any time after that date, as well!)

See you there!

No comments: