Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

very new to SL--> LSL new to programming but very eager to learn

br0ke Wind
Registered User
Join date: 12 Oct 2006
Posts: 8
11-05-2006 20:23
I have always wanted to learn to program, i am currently learning Basic and its a breeze (at my local City College, i am 20)
I am very computer orientated and want to learn to program in LSL very badly, I don't know what is the best way to learn

I have been reading random tutorials online and in the game and have been getting a hold of scripts and editing them, making simple variable changes but nothing too complicated.

I figure since I have always wanted to learn to program why not learn LSL where i can actually be motivated enough to go through with it by making useful scripts that i can sell.

now that you know a little bit of my background, maybe you can help me

I will do anything to learn to program in LSL, what are the steps i should take

most people just hand me the lslwiki link and say there you go, but i need to know the proper way to learn

basically, if you are good at scripting right now, and you didt know how to program before then what did you do to figure it out??

I am debating if i should pick up a Java for Beginners book at borders
Aakanaar LaSalle
Registered User
Join date: 1 Sep 2006
Posts: 132
11-05-2006 22:04
i remember a time, ages ago, before some of you were born. My step brother got a TRS-80. This is an old (read as antique) computer from Radio Shack, that used a regular television, and keyboard (no mouse), and saved data on a cassette tape (through a plugged in cassette recorder. No Floppy!)

The code on that was basic. Speghetti code.
10 GOTO: 10

Since then, I learned Visual Basic, VB Script and Javascript, but my major programming learning was done with the scripting language for mIRC. I have since learned C and C++ and am even now reading tutorials on JAVA. Along with these, i've learned several other scripting languages such as MUF (MUCK Forth, used in text mucks), DragonSpeak (used in a game called Furcadia), and several others.

Edit: I almost forgot to mention, PHP, Perl, MySQL, HTML, CSS...
Edit2: Of course, the only problem I have is that while I know all the technical lingo, and can write just about anything, what I lack is the ability to design. I have yet to come up with a web page layout, or dialog layout, or program that I am happy with.

So what have I learned? Absolutely Nothing! er.. I mean.. The best way to learn a language is to start off with a tutorial, but before long you need to just Jump In with Both Feet, and get wet. You will always need to bookmark some refference material, such as the LSL Wiki.

Programming is 5% writing, 15% fixing bugs, and 80% researching which functions you need and what paramters they expect.

So, Come up with an idea.. open up notepad, or wordpad, or get out a pad an paper, and write down step by step what needs to happen, then look up the functions to make it happen and finally put it all together into one script.

Another tip, don't tackle the whole script as one project. Split it up into smaller chunks that are more managable, then concentrate on one chunk at a time. You'll be surprised what you will accomplish.
Andy Enfield
Hippo Technologies CEO
Join date: 22 Nov 2005
Posts: 79
11-05-2006 22:35
You might also try picking up some of the many free scripts available inworld, at the LSL wiki and on these forums and modifying till there's no tomorrow. Mucking around with a working script, changing bits here and there to see what happens - or breaks - is a good crash course.

Oh, and if you use the SL search tool, there are plenty of scripting classes to be found inworld. You might try one or two of those and see how you get on.

Good luck :-)
Aakanaar LaSalle
Registered User
Join date: 1 Sep 2006
Posts: 132
11-05-2006 22:55
Just occured to me.. pick up a free scripted object, perferably something with which you have access to read their script, but don't read it yet.

Play around with the object, make sure you understand what it does, and try to figgure out how it does what it does.

Then try to create one of your very own. Replicate the functionality.

Then compare the scripts.
br0ke Wind
Registered User
Join date: 12 Oct 2006
Posts: 8
11-05-2006 22:57
my dad had a TRS 80, the only thing i remember about that thing, besides the black and green colors, was space invaders, or yea, and snake

well if i have an idea how should i figure out what commands do what and where can I loearn the format?


I will be checking out the classes, so far people have recommented
Tui?
blazers
Yankies junk
NCI

any others?
Aakanaar LaSalle
Registered User
Join date: 1 Sep 2006
Posts: 132
11-06-2006 01:35
ASL is where I go. They have a nice 5 day LSL bootcamp that covers a lot.
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
11-06-2006 04:19
The wiki carries pages for scripting teachers as well as mentors. I'm on the list, but I'm not the only person on the list. http://lslwiki.com/lslwiki/wakka.php?wakka=scriptingTeachers
_____________________
Eloise's MiniMall
Visit Eloise's Minimall
New, smaller footprint, same great materials.

Check out the new blog
Thanto Usitnov
Lord Byron wannabe
Join date: 4 Aug 2006
Posts: 68
11-06-2006 10:37
The LSL101 guide on the wiki seems to cover it pretty well. It really just boils down to understanding that LSL is state/event driven, and then understanding scope and communication methods. As Aakanaar LaSalle pointed out, the majority of what you'll be doing is really just researching the functions and/or events you want to use in the wiki. And as he also pointed out, the best way to do it is just to do it. Tutorials, classes, and all that are nice, but the best way to learn LSL is to write in it. So I suggest you read up on the state/event system in the wiki (covered in the LSL101 guide). That should give you a good grounding in the basic workings of scripts, and once you've got that down, go back to messing around with scripts.
br0ke Wind
Registered User
Join date: 12 Oct 2006
Posts: 8
11-06-2006 11:59
okay, I will do that

what are some very good simple scripts to work on

ex. click to change color cube? Invisable cube? resiging? teleporting?

I dont know what is simple and whats complicated since I dont know most of the LL commands
Maker Mu
Registered User
Join date: 18 Oct 2006
Posts: 14
11-06-2006 12:00
I learned programming on a TRS-80 (16K of memory weeha) and have been doing it professionally for most of the last 25 years. I've forgotten more languages than I could count.

Everyone's learning style is different, I'd rather wiggle and pinch something than sit in a class. I'm thinking you might prefer a class/tutor. If you want to learn through play as I always do with a new language...

Make your first 'Greetings World' program and start adding things to it... like:

1. Says 'Yo Earth' when clicked on
2. Says 'Dude' and turns green when clicked on
3. Says 'Stop it already' and spins in place... etc.

Learn single procedure coding stuff in that one 'hello world' routine. Once you've figured a piece out, just comment out that code for your next experiment. After you've tried a ton of things you'll have all these code snippets that you'll have written yourself and know what they do.

Then add events to do different things.

Try out states.

etcetera
br0ke Wind
Registered User
Join date: 12 Oct 2006
Posts: 8
11-06-2006 19:48
anyone else want to add anything to help me out?
Thanto Usitnov
Lord Byron wannabe
Join date: 4 Aug 2006
Posts: 68
11-06-2006 20:30
Yeah. Read through the LSL wiki. For a lot of the functions, examples are provided that explain how they are used and what they can do. There's even a whole section of just examples.

http://www.lslwiki.com/lslwiki/wakka.php?wakka=HomePage
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
11-06-2006 21:00
From: br0ke Wind
anyone else want to add anything to help me out?


Sure! I'll jump in here. No previous programming experience outside of some stuff 30 years ago or some ladder logic tweaking. I have been seriously scripting here now for a couple of months. Now there isn't very much that I can't script. Here is something that will help tremendously:

http://www.lslwiki.com/lslwiki/wakka.php?wakka=AlternativeEditors

I personally use Scite-EZ, another popular one is Notepad++. Be sure to install and tie in Lslint also.

Don't know about Notepad++, but with Scite-EZ, if you hit F1 while over, for example; llSay, it will open the wiki page for that entry. Extremely handy, even months from now you will still be referencing the wiki constantly.

The other reasons it is so handy; you can have multiple scripts open at same time, you can save in folders (for example; teleporters), scripts are full screen, you can script offline.

You can carry it one step further and download Osgeld Barmy's wiki crawl and edit the lsl.properties file to open the wiki from you local drive. Has come in handy a couple of times when I lost internet connection.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
Newgy's 2 pennies worth
11-07-2006 00:58
I've always learnt best by doing. Reading stuff dry doesnt seem to filter through very well, I have to go play and see the results.

Just about everything I have made have been because I've either seen one and wondered how or someone has asked "is it possible..."

My first LSL project was a radio. I saw one of Weedy's at a house and thought "that was cool I wonder how...." A couple of hrs later and I had one that worked. It wasnt brilliant but it was a start. It has evolved as my LSL knowledge has increased, dialogs, notecards the ability to set textures etc.

The good thing about SL and LSL is that you can get pretty immediate results, its an ideal learning enviroment. Distracting as hell but thats a totally different issue!

I agree with Jesse, Scite-Ez or Notepad++ are both excellent, especially if used with LsLint. If you have access to Visual Studio then Scite-Ez has the advantage of allowing use of the preprocessor which is a godsend. Its not essential but its so much better than cutting and pasting all the helper scripts.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
11-07-2006 07:06
Well if you haven't taken a gander at the stickied thread, New Scripters Start Here (FAQ), you should. It will answer some of your questions and point you to locations where you can find more answers.

(I have updated the FAQ; the links should now work).
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
br0ke Wind
Registered User
Join date: 12 Oct 2006
Posts: 8
11-07-2006 08:28
i was looking at lslwiki and the #1 thing I dont understand is this

if there is a function like

lldance

and theres lots of things in parenthesis after it

lldance(string name?, key id?, etc etc)

where can i find out what kind of answer those things are looking for?

i have no idea what to write in place of string name, string ID, string message, any of that
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
11-07-2006 10:27
From: br0ke Wind
i was looking at lslwiki and the #1 thing I dont understand is this
if there is a function like
lldance
and theres lots of things in parenthesis after it
lldance(string name?, key id?, etc etc)
where can i find out what kind of answer those things are looking for?
i have no idea what to write in place of string name, string ID, string message, any of that


Usually there's a description in the wiki will tell you what kind of information LSL is looking for in the parameters (that's what the "things in parenthesis" are called), and what significance it has.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
11-07-2006 11:44
From: Yumi Murakami
Usually there's a description in the wiki will tell you what kind of information LSL is looking for in the parameters (that's what the "things in parenthesis" are called), and what significance it has.


Not to mention many pages include example scripts or functions that use the function (or functions that shows how the function is supposed to work).

There are also some really good tutorials on the wiki. You don't have to read them all at once either.
http://lslwiki.com/lslwiki/wakka.php?wakka=LSLTutorials
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey