Easy sticky note script

So there I am, making plans to redo the website, and put out some special reports and I realized that what I was really missing was an in-world project planning board.

Now, last time I just used a Google document and media-on-a-prim, but this time I wanted something a little bit more … tactile.

I wanted colored Post-It notes on a big board. I searched around and I couldn’t find one. Progress was stalled until I built one on my own.

Fortunately, OpenSim has a way to put text on in-world surfaces without creating a new texture each time, so the project was doable.

Unfortunately, it’s been a while since I wrote anything in LSL and I had to look up each and every command. And find out how to say “is not equal to” and set colors and everything else that goes into making a virtual Post-It.

And it’s done!

A close-up view of my new project planning board.
A close-up view of my new project planning board.

The board itself is just a single squished prim. The size is 2.5 by 1 by .005 meters, with a taper of 0.25 for both the X and Y values and a slice ending at 0.5.  It’s textured system plywood, painted brown, and the center surface is just system grass with a light violet tint to make it look vaguely like corkboard.

The little Post-It notes are just simple flat squares, 0.2 by 0.2 by 0.001. The magic is in this Post-It Script.

The way it works is that it pulls the text from the description line of the Post-It. Now, there’s no way for an object to be prodded into action once its description has been changed — as far as I know — so you also have to click it to get the text to update. I’ve set it up so that if you click it near the top of the note, it also increases the font size. If you click near the bottom, it decreases the font size. And if you click near the middle, it changes color!

Updating the text takes a few seconds since OpenSim has to generate the image. I’m hoping that they’ll speed it up. So when you click in the middle, to change the color, it only updates the text after checking to see if the description has changed, so you can cycle through the colors quickly to find the one you want.

I have four colors in the script right now, yellow, pink, violet and tan, but you can add as many as you’d like. The colors are defined right at the top of the script. I looked up the color codes for Post-Its on this Instructables page. Then, in-world, I opened an object edit menu and pulled up the color selector and used it to convert the standard HTML color values into the Second Life color codes.

Bulletin board sticky note closeup
A close-up of a sticky note.

So here’s me enjoying my new project planning board.

My Kitely avatar trying to figure out where the permission settings are going wrong.
My Kitely avatar trying to figure out where the permission settings are going wrong. Also, enjoying her new Brown Flower Heels by Sunny Whitfield.

And then I figured that other people might like this as well, and might not want to mess around with the scripts, so I decided to add it to the Kitely Market. This was an opportunity for me to test the hypergrid delivery mechanism as well, from the merchant point of view.

Now, I don’t know how other people do this, but I wanted to have people rez the board, and have the sticky notes attached to the board but not linked to it, so that they can be moved around. Or click-dragged and copied.

So I put the sticky notes inside the corkboard object and wrote a script so that when the corkboard was rezzed it would pull the sticky notes out of inventory and put them up on the side there, like they are in the picture. This required a quick refresher course on Second Life’s quarternion-based object rotation system and vector addition. Here’s the Sticky Note Rezzer Script for Cork Board if you’re interested.

Okay, I was a math major at college and kind of know my way around vectors — but how does everyone else manage this?

Then came the hardest part of all. Putting all the pieces together in such a way that the permissions worked right. I wanted everything to be full perm, so that people could do whatever they want with this thing, or take the scripts apart and use to build something new. Now, everything was created by me, completely from scratch, including the scripts. So I should have been able to set the permissions any way I wanted. You’d think — but no.

For example, I had four identical sticky  notes inside this object, different only in the object names and descriptions. I created them by shift-clicking-and-dragging. You can’t get more identical than that. But sticky note number two was full perm, and the others were no-copy, no-modify, and nothing I did would change that. After futzing around for half the afternoon, I just deleted them, and rezzed multiple versions of the second sticky note. Then, just in case, I deleted the text-based textures on these four objects, since they weren’t regular textures but created via the script, and who knows what would happen if Kitely tried to send these things out over the hypergrid.

In the end, it took almost as long to pack up these sticky notes as it took to create the original script in the first place.

Next time anybody complains about merchants overcharging for their content, I invite you to come over so I can slap you around the facial area.

So here’s the link to the Cork Board with Sticky Notes on Kitely Market.

Oh, I almost forgot to mention — this is licensed CC0. I hereby affirm that everything is completely original, and that anyone can do anything they want with these scripts, including using them commercially or reselling them. It’s all fine with me.

Maria Korolov