Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Learning to script

Kevo Lefavre
Registered User
Join date: 28 Feb 2008
Posts: 44
03-10-2008 18:55
Hello. I've been in SL a few weeks now. I've been learning to build. I've learned to texture (somewhat). But scripting is a bit harder for me. What would y'all say is the best way to learn to script? If I could learn, say, to make my front door open by touch, then I could apply that to other areas and learn from experience. But the codes and formulas and all that goes woth scripting confuses the crap outta me. I know I'm making it harder than it really is. Any advice?
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
03-10-2008 20:00
From: Kevo Lefavre
Hello. I've been in SL a few weeks now. I've been learning to build. I've learned to texture (somewhat). But scripting is a bit harder for me. What would y'all say is the best way to learn to script? If I could learn, say, to make my front door open by touch, then I could apply that to other areas and learn from experience. But the codes and formulas and all that goes woth scripting confuses the crap outta me. I know I'm making it harder than it really is. Any advice?

I'd start by looking at existing scripts and reading about the basic syntax and layout of the language, to get a feel for how you do basic operations. Then figure out something you want to do, and teach yourself how to do it, through playing around, researching things on http://www.lslwiki.net, and seeing how other people have scripted the same thing.
_____________________
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
03-11-2008 02:32
I highly recoment getting hold of LSLEditor


It includes a builtin copy of a Wiki, and allows you to do quick tests of scripts and ideas without having to be online.

It has no Physics, so it could not realy be used for your door opener directly, but it is a great way to learn about LSL, and you could test most of your code, then place it inworld to just finish testing the actual open/close portion.
Kevo Lefavre
Registered User
Join date: 28 Feb 2008
Posts: 44
03-11-2008 14:48
thank you for the tips. i'm sure i have a long way to go. building, texturing, and scripting. alot of stuff to learn.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-11-2008 20:47
NCI (new citizens incorporated) (seach inworld) also offers a few beginner classes IIRC...
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
BlueWall Slade
Registered User
Join date: 6 Jul 2007
Posts: 5
Scripting....
03-13-2008 18:07
It may seem like the long way, but if you go for some classes and study the wiki pages. Learn the very basic things first. The LSL syntax, program structure, states, control blocks.

Then, you will be able to follow along. There are tons of scripts there to learn from. But, understand the basics first. Then, a whole world will be open to you :)
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
03-13-2008 18:47
From: Void Singer
NCI (new citizens incorporated) (seach inworld) also offers a few beginner classes IIRC...


Every time I went to a class at NCI it was canceled. I taught myself scripting by going to the wiki, looking at the list of functions, picking one function, and reading about it, studying the example(s), if any. The main thing to wrap your brain around is understanding event driven programming. There's code, and there's events, and simply bear in mind code inside an event only executes if the event is true. Other than that, just pick an interesting function, and read about it in the wiki, and create a simple object and write a small script that uses that function to see it in action. Also, read the section in the wiki on variables, and variable types, and get a good grip on variables and casting.
Kahiro Watanabe
Registered User
Join date: 28 Sep 2007
Posts: 572
03-14-2008 07:26
LSL is a programming language just any other RL PL. That means that it shares the basic concepts with programming languages like C, Java, Visual Basic, etc.

Some of these concepts are:

Level of programming language (LSL is a high level programming language)
Type of programming language (LSL is a Event oriented programming language)

Syntax
Data Types
Control structures
Functions
Events
States

If you get the basic idea of that then it would be much easier to learn a programming language. It will save you lot of time when you have to debug your scripts, because you would know how things work.

This with basic LSL script examples is a good way to learn.

What I don't recommend is using scripts that are in world to learn, because they can't be bad written, not in terms of syntax, but in terms a how a good program should be, instead I recommend you the lsl wiki: http://www.google.com.ar/url?sa=t&ct=res&cd=1&url=http%3A%2F%2Frpgstats.com%2Fwiki%2Findex.php%3Ftitle%3DMain_Page&ei=uIraR-6IJ5GegwTe9bm1CA&usg=AFQjCNFF3a899k2LjSnK_CwDGI2t_8wkhw&sig2=uMYKqCYweGTFhufenQk_VQ

There you have a very complete documentation about LSL with good and simple script examples and also some basic tutorials.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-14-2008 16:17
there is another group that does classes, but the name escapes me at the moment. I've been known to do walkthrough tutorials of simpler scripts I write for people, as do some other people I know.

some of the scripting groups inworld are helpful, but can have alot of traffic. obviously the wiki's are very helpful, as are the people here on the forum, where if you don't get what something is doing you can always ask.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -