Notes About Linden Scripting 2009 Congress

Embed Size (px)

Citation preview

Notes about Linden Scripting Language (LSL) and its possible applications

Akemi MochizukiDraceina Pinion (S.L)

Index

Introduction1. What is a script?2. How to get scripts?3. How to create a script?4. Examples of intelligent objects made with scripts

Introduction

This presentation has two objectives1. To present the main characteristics of the Linden Scripting Language, the programming language that is used in Second Life to make the objects in Virtual World interact with avatars. 2. Give some examples of applications of the use of scripts for educational purposes.

1. What is a script?

A script allows objects to be active in Second Life.It is in the content tab of the object.Scripts are composed of functions, events and constants. Scripts can define the position, the size and the route of an object.

2. How to get scripts?

Scripts can be easily created or you can get ready-made scripts. Some are free, some are inexpensive and some are very expensive. For example, you can get scripts in Second Life at Free script Library, solvo.

http://slurl.com/secondlife/solvo/221/92/24

2. How to get scripts?

Use the Search engine within SL and type "script" You will have many results. There are some groups where you can learn how to make scripts.

3. How to create a script?

I have learned to design animals which move like real animals. This kind of objects can be used when teaching to children. For example, these dolphins are controlled by random numbers, detect when someone is close to them, approach the visitor and sometimes let the visitor ride them. Sometimes they click. They can be used to teach children to count.

3. How to create a script?

For example, this is the script which determines where animals are and which direction they look into:face_rot=llEuler2Rot(rot*= DEG_TO_RAD); llSetPos(v_pet); //Position of the animal llSetRot(face_rot); //Angle of the animal face_rot, rot, v_pet:the names I made llEuler2Rot:change euler to rotation DEG_TO_RAD:change degree to radian llSetPos:determine the position llSetRot:determine the rotation rotation:Please refer to http://wiki.secondlife.com/wiki/Rotation

3. How to create a script?

Edit and open the content tab of an object and click on the 'New Script' button. You will create the most basic script. If you touch the object which contains this, it will say, "Touched". We can modify this script.

3. How to create a script?

We can determine the property of the script which we create.

There are 3 properties.

Modifiable :this script can be modified

Copyable :this script can be copied

Transferable :this script can be transferred

3. How to create a script?

A script is made of parts called states. We can think about states as sentences in a paragraph.

3. How to create a script?

Examples of states:touch_start : This state reacts when the object which contains this script is touched.state active : This is the name of the a new state which I made.'state active;' : By this the operation goes to the 'state active'.'state default;' : By this the operation goes to the 'state default'.

3. How to create a script?

Settings and parameters of the scripts can be changed in the notecards in the content tab when scripts are designed to read them.For example: time interval and range of a sensor.Additional items (instructions, settings, UUID of textures) can be added in the content tab of the object.UUID:Peculiar figure which is a string of 32 hex characters with four dashes interspersed allocated in one thing (an object, a gesture, an account and a texture etc.)Sample of UUID:This is allocated to me.adc5208a-c98c-494e-a5f6-86ccf4b773e1

3. How to create a script?

There is capacity limit when we make scripts.If you make a too huge script, it will be not compiled.There are errors which occur when it is executed. For example, an error occurs when a number is divided by 0. ex. 2/0 cannot be calculated.

4. Examples of intelligent objects made with scripts

I designed the DDB (Dracy Drawing Board) because I was frustrated with the lack of characters and difficulty to draw simple pictures.Using the DDB I can easily write any character, I can draw simple pictures in free-hand and I can use arrows.I added the handwriting and arrow functions with the good advices of Manuel Vuelta Profesor Korobase (S.L).

4. Examples of intelligent objects made with scripts

I can comfortably teach trigonometry in Second Life now.In a 3-D interactive environment it it easier for the students to understand the dimensions of the objects and their elements.We can build the models of the same size and proportions as real objects (in this case, the sizes must be compared with the size of avatars). I can teach sine, cosine and tangent and connect it to real activities like, for example, measuring the length of the long roads or taking a picture of big buildings from the sky. We can use 3D graphics for displaying data.

4. Examples of intelligent objects made with scripts

Using the DDB it is possible to teach complete math lessons in Second Life, where the student can interact with 3-D models. It is so much better than using pictures on paper or on a blackboard. It is cost efficient and opens up exciting new possibilities of engaging K10-13 students.blog

4. Examples of intelligent objects made with scripts

I recently upgraded the DDB to teach chemistry lessons.It is now possible and easy to draw the structure of organic compounds by using the DDB. The empty squares below were made transparent using a function of the DDB. We can easily restore the colour with a button of the DDB.I use the the DDB to teach chemistry in the following video.

Conclusions

Learning in Second Life can be a deeper experience than in real life, making it easier for the student to understand.It is cost efficient and allows great flexibility to students and teachers.

Conclusions

I have been studying scripts and developing specialized teaching applications for two years and I know that it can take time to create or to find the right application to use. It takes practice and study to learn to load, customize, modify, adapt and develop teaching tools.If anybody is interested in my tools or in exchanging knowledge about scripting, you can contact my avatar in S.L (Draceina Pinion) or you can visit my shop Slur...

http://slurl.com/secondlife/Balenissa%20Grove/242/107/80