Friday, June 29, 2007

Learning to Script



Written 29 June, 2007

Learning to Script

I was perhaps three months into my Second Life experience when I realized the importance of scripts.

Scripts are little bits of code that make prims do things—revolve, move, smoke. Scripts power Second Life’s gadgets, weapons, vehicles, and particle effects. Scripts listen and talk and make calculations.

Scripts fit inside primitives, in the Content folder, and run continually unless told not to.

Scripts operate under something called Linden Scripting Language, or LSL, which is, I’ve read, similar to the programming languages Java and C+.

There is a lot of information available about LSL, including a great Wiki, but it didn’t really start to come together for me until Sweetie took me to the College of Scripting, Music, and Science.

The College is a multi-story (at least seven!) building with workstations designed to methodologically teach LSL by example. One rezzes a prim, makes a new script (just hit New Script in the Content tab) and works through the example script, making the prim do all manner of things from changing color and size to talking to you.

It took a half-dozen visits to work my way through the first floor and half of the second, but I’m pretty versed now at setting textures and colors and prim size and characteristics via LSL. Last night I began work on the section on script states; this is the one that will make it or break it for me, since it aims to teach me to make the script jump to different logical locations.

I gave up last night, for it was late and I was groggy and had trouble finding where my typos were by comparing my script against the example. But tomorrow morning I’ll be at it bright and early while my mind is fresh and, hopefully, make that branching breakthrough which will let me say with some confidence that I can write scripts.

Anyway, kudos to the people who build Second Life’s Ivory Towers of Prims and Particle Labs and Colleges of Scripting! You are doing us all a great service!

And next time you see me, I will be a scripter—or not!

1 comment:

Anonymous said...

Where is this college? do you have coordinates?