Objectifying LSL

By | 2008.02.25

A few months ago we decided to make a distinction between SL’s LSL2 and our own LSL implementation. This mainly because we were planning to add new features to the language. But also to make people understand that the compatibility may not be 100% – at least not for some time into the future. One thing is implementing all ll-commands. Another is to get them all right. So we decided to call our language OSSL (OpenSim Scripting Language.)

Yesterday OSSL took a new turn. In addition to LSL2’s straight forward function calls and our own similar os-calls I want to provide a modular aproach.

So now OSSL has a new object “Prim” that can be used in the following ways:
Prim.Position.x += 10;
Prim.Rotation.x += 45;
Prim.Text = “This text floats on top of a prim!”;

I’m planning to implement more functions. Especially looking forward to getting for example the particle-system into objectified managed code.

Later down the road people can use Visual Studio to write scripts for OpenSim. If they include some OSSL.dll they will get the benefits of managed code and writing scripts should be a breeze.

So, here is a sample script:

//c#

double x = 0;
double y = 0;

public
void default_event_state_entry()
{
llSetTimerEvent(0.1);
}

public void default_event_timer() {
x += 0.2;
y += 0.1;

Prim.Position.x = System.Math.Sin(x) * 10 + 100;
Prim.Position.y = System.Math.Cos(y) * 10 + 100;
}

One thought on “Objectifying LSL

  1. peterquirk

    Tedd,have you added any other selectors to the Prim object, or objectified anything else?Thanks for improving the scripting language!

    Reply

Leave a Reply