3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Getting started in LSL scripting in Second Life

Step 3Wash / Rinse / Repeat

We now have a running script, however most scripts you make won't run the first time you run them. It will take many tries as you correct errors and make improvements. When you hit "save" on a script, the LSL editor "compiles" the code to something LSL can understand. It will stop however if it finds an error.

Brackets, parenthesis, and semicolons must all be perfectly in place before a script will run. If you are new to programing this can be one of the most infuriating steps and lead you to screaming DWIM (Do what I mean!) Part of becoming a programing in ANY language is learning how to precisely define steps and correctly type them into the language you are working in. Thus you will find yourself writing, running, then RE-writing your code several times.

The script you made runs the instant you hit save. If you take it into inventory, it will "suspend" what it was doing but go right back to it when rezzed again. (If you are not familiar with "taking" and "rezzing" an object you may need to revisit your building skills).

Each time you re-write your code you'll want to reset the script.

Try reseting the script in the following ways.

1. Press Reset in the script window.
2. Select the object and go to TOOLS>RESET SCRIPTS IN SELECTION

Also try stopping and starting the script from running via checking and unchecking the "running" button, or the TOOLS>SET SCRIPTS TO NOT RUNNING IN SELECTION and then TOOLS>SET SCRIPTS TO RUNNING IN SELECTION.

Once you get comfortable with stopping, starting, and reseting a script, try changing the words "Hello Avatar" and see what else you can make it say.... for goodness sakes keep it PG.

WHY STOP AND START

Scripting in Second Life can be a little bit like fixing your car.... while going 60mph down the freeway. Thus you need ways to stop the programs for they may affect others.

Objects can hold more than once script and they will all run at once. This can be used in the following manner. Say you write a script that makes a prim change color every few seconds. You also write one to make it follow you. Put them both in one object and it will follow you while changing colors!

For simplicity's sake, the following examples will all be used individually so be sure not to put two or more into the same object.
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
4
Followers
1
Author:Blueman
Hey all, this is Blueman Steele. I don't log in much now but want to try to put some of the many things I learned in Second Life here on this site.