Difference between revisions of "User:Simon Kline/scripting"

From Second Life Wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:
Scripting is fun! It lets you do so much and isn't as scary as it might seem! In world I teach scripting classes and here you'll find a rundown of them.
Scripting is fun! It lets you do so much and isn't as scary as it might seem! In world I teach scripting classes and here you'll find a rundown of them.


 
<div style='float:right;width:350px;background-color:#336699; color:white; padding:10px; margin: 10px;'>
== Classes I do (class materials coming soon)==
<h3 style='color:white;'> Classes I do (class materials coming soon)</h3>


* Week 1
* Week 1
Line 42: Line 42:
* Week 11
* Week 11
Flashing Lights with controller... Learn how scripts and linked objects can talk to each other as we explore llMessageLinked.
Flashing Lights with controller... Learn how scripts and linked objects can talk to each other as we explore llMessageLinked.
</div>
== Getting Started - An explanation of the basic script ==
When learning scripting, bear in mind that all the new words seem a bit strange and confusing at first, but once you start getting the idea of what all the new words mean if you're still confused after reading this, IM MEEEEEEEEEE (Simon Kline) and i'll try and help!! 
When you first create a script in Second Life, it creates a skeleton script form which to create your scripting masterpiece. The skeleton script looks like this:
<pre style='width:300px'>default
{
    state_entry()
    {
        llSay(0, "Hello, Avatar!");
    }
    touch_start(integer total_number)
    {
        llSay(0, "Touched.");
    }
}
</pre>
The first thing you'll notice is the command 'default' at the top of the script then a bracket underneath it {. This script is easier to read than some because the lines have been indented for us... making it easy to see the closing bracket at the bottom } with some code in between.

Latest revision as of 21:05, 26 February 2008

Welcome to Scripting!

Hello! I'm Simon Kline, and you've found my SCRIPTING page!

Scripting is fun! It lets you do so much and isn't as scary as it might seem! In world I teach scripting classes and here you'll find a rundown of them.

Classes I do (class materials coming soon)

  • Week 1

Absolute beginners start here! Even if you can't rez a cube you can do this! We start by rezzing a cube and making a new script and looking at the 'default script' learning what all the little bits do trying not to get lost with strange words and phrases. We then add a couple of lines and turn this into a notecard giver!

  • Week 2

We finish week 1 having a basic notecard giver, which through the week we've no doubt used to give lots of notecard fun to our friends and strangers alike!

We start week 2 by expanding this, making it well mannered and saying thankyou, and learning how we can use it to give out other types of items.

  • Week 3

In week 3 we look at an avatar detect script, so you can monitor who's come into your shop or area, this script also works as a greeter.

  • Week 4

Week 4 we play with a window tint script. This introduces us to new concepts such as controlling textures with scripts and dialog boxes

  • Week 5

Week 5 looks at how prim lighting is controlled with scripts, by making a light switch in scripting to turn lights on and off

  • Week 6

Sliding doors! Look at how objects can move with scripts

  • Week 7

Why do I sit funny on a freshly rezzed cube? The answer to this and more as we explot llSitTarget.

  • Week 8

Rotating doors! Rotations aren't so scarry you'll be dealing with quaternoins in no time!

  • Week 9

Particles! Chaos and crazyness happens as we unleash colour and fun with and introduction to particles.

  • Week 10

Dialogs and Object movement, we make a box that moves when we give it a command via a dialog box.. this shows how some of the things we've learned can be combined

  • Week 11

Flashing Lights with controller... Learn how scripts and linked objects can talk to each other as we explore llMessageLinked.

Getting Started - An explanation of the basic script

When learning scripting, bear in mind that all the new words seem a bit strange and confusing at first, but once you start getting the idea of what all the new words mean if you're still confused after reading this, IM MEEEEEEEEEE (Simon Kline) and i'll try and help!!

When you first create a script in Second Life, it creates a skeleton script form which to create your scripting masterpiece. The skeleton script looks like this:

default
{
    state_entry()
    {
        llSay(0, "Hello, Avatar!");
    }

    touch_start(integer total_number)
    {
        llSay(0, "Touched.");
    }
}

The first thing you'll notice is the command 'default' at the top of the script then a bracket underneath it {. This script is easier to read than some because the lines have been indented for us... making it easy to see the closing bracket at the bottom } with some code in between.