OS Scripting Tutorial

From OpenSimulator

Jump to: navigation, search

(unfinished yet...)

OpenSimulator scripting is from one side very similar to 2nd life scripting, but there are many caveats and considerations. This tutorial tries to cover them for smooth approach to OS Scripting.

Some general hints:

  • Check your scripts on your own opensimulator on your machine before uploading to a grid

This is because scripting engine is still quite unstable and heavy cpu consumer on the server side (especially if you use plain lsl2), if you erroneously make some errors or infinite loop you can disturb general behaviour of the island. Moreover, in case of errors you can check them on the server console and provide useful mantis information to programmers to have them quickly solved.

  • If you find any errors or differences among your lsl2 script and OS lsl2 script, please report them on mantis.

Main differences between OSscripting and SLscripting:

  • OS Scripting allows you to use alternate engines. If you put //c# as first line you can use mono constructs
  • Assuming you are use default lsl2 engine be aware that your script is translated to c# before being run so it is actually c# running. Process of translating from lsl2 to c# can be quite demanding, so if you have complex scripts it can be advisable to directly write them in c# instead of complex workarounds in lsl2.
  • There are many additional commands which we will cover in this tutorial regarding OSTextureDrawings, URL on web.
  • Some commands works quite differently from lsl2. llGetNotecardLine() works but without the need of data_server event.

In this tutorial you will see the following chapters:

  1. How to build a simple lsl2 like program
  2. How to build a simple c# program
  3. How to use notecards
  4. How to use osdrawing functions


Personal tools
About This Wiki