E Book Manual

  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View E Book Manual as PDF for free.

More details

  • Words: 6,350
  • Pages: 36
2009

E-Book Library In Second Life Manual

New York City College of Technology ENG 3773 - Advanced Technical Writing Members Marlon Rendon (Marlon Piers) Pinaud Paul (Pino Rae) Lansana Daffe (Louis Dover) Marlon Rendon, Pinaud Paul, Lansana Daffe Manual 4/20/2009

E-Book Library

Table of Contents

 Preface • Conceptual Overview • Who should use this manual • Disclaimer • Terms & Abbreviations  Getting Started • What is an e-book library? • Building your Second Life inventory • Finding locations for your Library  Creating in Second Life • Building in 3-D - Building Tools - Different views - Prims - Sculpted Prims • Getting Free stuff for the E-book Library - Where to build • Building E-book Library - How to make Books - How to make shelves - The final Product • Scripting - Animating Books - Floating Text o Changing Text color - Linking Books to web pages - Scribd book-viewer  Appendix  References  Acknowledgment • Members • Contributions

I II II II 1 2 3 4 4 5 5 5 7 8 8 10 12 13 14 14 15 15 16 17 20 29 30 30

E-Book Library

P re f a c e This is the beginning of marvelous voyage of discovery into the secrets, and mysteries of e-book library. From the day it first appeared, the e-book has been stirring up excitement and fascination, because it marked a milestone in the age of personal computing. Today, the e-book is established as a veritable power tool without equal or helping students, business and professional people improve their performance and the quality of their work worldwide.

Conceptual Overview Second Life is a free online virtual world imagined and created by its residents. From the moment you enter Second Life, you'll discover a fast-growing digital world filled with people, entertainment, experiences and opportunities. Hundreds of leading universities and school systems around the world use Second Life as a vibrant part of their educational programs. Linden Lab works enthusiastically with education organizations to familiarize them with the benefits of virtual worlds, connect them with educational peers active in Second Life, and showcase their inworld projects and communities. For more information visit http://secondlife.com/showcase/education/ This manual focuses in the creation of the e-book library in the City Tech’s island http://slurl.com/secondlife/CityTech/141/192/25. E-book library is an initiative to promote and develop the access of e-books. It addresses and focuses on the needs of academic and research libraries. Also it offers content across all subject areas, the initial focus being on recent titles, most specifically in the areas of Science, Technology and Medicine. E-book library functionality and accessibility are enhanced by innovative features such as, multiple concurrent access, online and offline access solutions, browsing full text for students and faculty before borrowing or purchasing, full text search across catalogue and many more. E-book library uses technology to make content more accessible, offers flexible access, unlimited access and short term circulation.

Manual | Conceptual Overview

I

E-Book Library

Who should use this manual? This manual is designed to help students, faculties, businesses and everyone eager to understand the remarkable e-book library and its entire family. In this manual everyone will set off to discover the mysteries and wonders of what e-book library is and what marvels it can perform. As you must have already realized, this manual is for people who have both intelligence and the curiosity to comprehend this wonderful family of online book solution.

Disclaimer The authors of this manual have used their best efforts in preparing this manual and the programs contained in it. These efforts include the development, research, and testing of the programs to determine their effectiveness. The authors make no warranty of any kind, expressed or implied, with regard to these programs or the documentation contained in this manual. The authors shall not be liable in any event for incidental or consequential damages in connection with the furnishing, performance, or use of these programs.

Terms and Abbreviations In this section we describe the terms and abbreviations that are unique to Second Life. We will start by describing the most common one:

       

SL - Second Life LL - Linden Lab; the company who made SL RL - Real Life; the meta-place where you need food, restroom breaks, etc FL - same as RL (unless they mean Florida) L$ - Linden Dollars; the virtual currency AV - Avatar, your second life "body" LSL - Linden Scripting Language; the language used to program objects in SL PG - Rating for regions where mature content is not allowed

Other terms used that are also unique but less common than the previous: AFK: Away From Keyboard.

Neat trick: if you type "AFK" into the chat, your avatar will immediately go into Away Mode.

Alt: An additional account in Second Life. Manual | Who should use this manual?

II

E-Book Library Animation: The movements your avatar makes, basically. The 'default' animations are the movements your avatar makes as a matter of course. AO: Animation Override. The default animations for things like walking are a bit clumsy, so various devices that attach to the avatar (sometimes as a bodily attachment, other times as a HUD) and play more graceful animations are quite common. Attachment: An object that is 'worn' on the avatar, generally by right-clicking it on your Inventory and selecting "Wear". Avatar: The 'body' that you use to interact with others in Second Life. Avie: Abbreviation for 'avatar', also spelled Avi, AV. Away Mode: If your avatar is left inactive for long enough, it slumps forward as if dozing and the word "(Away)" appears next to the name. (The time elapsed is determined by how you set your preferences.) The moment you tap a key or move your mouse, the avatar will "wake up" again. BIAB: Business in a Box. It is a box of full-perms merchandise that is resold to others. The notion is that you can set up a shop and sell the items to people. The reality is that the BIABs themselves wind up sold and resold for cheaper and cheaper prices until they're practically worthless. Sand Box: The name "Sandbox" is given to a plot of land which has been put aside in for those who wish to practice building projects. Several sandboxes exist for specific purposes - such as the Weapons Testing sandbox or the vehicle sandbox but the majority of sandboxes are just for regular building purposes. The signs within each sandbox area should make it clear what is allowed. Sandboxes are usually automatically wiped several times per day so when building you should see the signs for information on when this will take place. Due to the nature of sandboxes, they do sometimes go down, so take regular inventory backups of the work you are doing. SLURL: Stands for Second Life URL, the Web link to a specific place in Second Life. *For more information you can always check the Second Life web site.

Manual | Terms and Abbreviations

III

E-Book Library

Getting Started What is an e-book Library? E-Book (Electronic-BOOK) is the electronic counterpart of a printed book, which can be viewed on a desktop computer or a portable device such as a laptop, PDA or e-book reader. Numerous e-books can be kept on portable units for traveling, eliminating weight and volume compared to equivalent paper books. Electronic bookmarks make referencing easier, and most readers allow the user to annotate pages. E-book library is an initiative to promote and develop the access of all currently available e-books online. It addresses and focuses on the needs of academic and research libraries by creating a model that satisfies all libraries. E-book library on City Tech Island http://slurl.com/secondlife/CityTech/141/192/25 (Coordinates 138.192.24)

Fig 1 Manual | What is an e-book Library?

1

E-Book Library

Building your Second Life Inventory Your Second Life Inventory is a filing system with folders, subfolders, and items stored within it. Your inventory can expand and grow as large as you want it to be. Just because your inventory can hold many items it doesn’t mean that you have to fill it up with every freebie and gift that you might find on SL. It is hard to find one item within a list of thousands items. Another drawback of having too many items in your inventory is the fact that it loads slowly, search itself slowly, and even slow down the Linden Lab server. To be a good citizen of Second Life it is recommended to limit your inventory items to 3000. Note: An inventory folder can be opened and closed in three ways: By clicking the white arrow to its left, by double clicking the folder itself, or by pressing the enter key.

You can use the search box at the top right corner of your screen to search for items to fill your inventory. For example to obtain some free furniture such as table and chairs for your library, you could type freebie in the search box. To teleport enter the name of a specific location into the "Search" tool and then click "Teleport" to travel directly to that address. In this figure I teleported my avatar to freebie warehouse where you can find a lot of useful items for your inventory. Feel free to collect any additional items that might fit your needs, but keep in mind that as your inventory grow larger it’s become more difficult to manage your items. An example of freebie warehouse http://slurl.com/secondlife/Burns/95/148/80 (Coordinates 68.131.87)

Fig 2 Manual | Building your Second Life Inventory

2

E-Book Library

Finding locations for your library You would only need a small parcel of land to build the library. You can use prims, and build things with those prims, anywhere in Second Life where you have permission to build. That could be your own land, someone else's land with permission, or a public sandbox. Landowners control the act of building on their land. Most landowners will have that permission blocked. You always can ask them to turn it on for you, but don't expect that. Rather, go to a public build area known as a "sandbox."In a sandbox you can build freely. You can use the in-world Search to find sandboxes. There are many across the SL world. Mauve Sand Box http://slurl.com/secondlife/Mauve/128/128/35 (Coordinates 116.95.35)

Fig. 3 Sandboxes usually are "cleaned" automatically every few hours. The length of times between cleanings should be posted at the sandbox. Be sure to "Take" your work into your inventory periodically so you don't lose it entirely during a sandbox cleaning. To do so, right-click on your object and select "Take" from the pie-shaped menu. Here's a link to UNCP's sandbox: http://slurl.com/secondlife/Myungsimbogam/11/211/63 SLURL stands for Second Life URL, the Web link to a specific place in Second Life.

Manual | Finding locations for your library

3

E-Book Library

C re a t i n g i n Second Life Second Life is a true 3-D world. This makes it much more flexible in many ways, but also makes it a little more of a challenge to move around than in a 2-D world. The creation tools within Second Life will enable you to construct just about anything you want to make. This section would show you how to build a book library as well as books. We will also show you how to get furniture, textures, scripts, and more, for free.

Building In 3-D Building 3-D objects is difficult. When you first begin to build and move things around in 3-D, it’s not uncommon to accidentally bury things in the ground and lose them. Spend a little time and work through the tutorials and you’ll catch on quickly. For more information in building tutorials visit http://secondlife.com/showcase/tutorials/. With a bit of practice you'll have your own house, shelves or a book in no time.

Building Tools The basic tools that you will use in Second Life to build things are: Focus: take control of the camera to view objects from any angle. Move: move a primitive or object around. Edit: move, resize, or rotate an object. Create: make a new primitive. Land: modify the land in Second Life, raising, lowering or flattening as needed to prepare it for building.  Link: connect two or more primitives into a single object.  Make Joints: connect two primitives with a moveable connection.

    

There are many variations and additions to these basic tools but if you understand just these few simple tools, you’ve made a good start.

Manual | Building In 3-D

4

E-Book Library Different Views There are different ways to look at the world while exploring Second Life. By default, you'll see the world in "Third Person", looking over your avatar's shoulder as you control it and move it through the world. Mouse-look lets you see through your avatar's eyes, and control where you look with the mouse. It's a good way to take a quick look up, down and around. There are times when you need more control over your view, such as when you want to closely inspect something from different angles, or when you're building something. For this kind of viewing, you can use the Focus tool to take complete control of the camera and move it around and zoom it in and out as much as you want.

Prims Prims are the building blocks of Second Life. All objects in Second Life are made of prims, except for avatars, the natural ground, and trees. They come in 7 different original shapes. The default prim shape is a cube. You can create prims using your building tool. Prims can be colored and textured as you wish.

Fig. 4 Prims can be made anywhere you are allowed to build. Prims costs L$0 (zero linden dollars) and are unlimited in supply. There is a limit to how many prims any one parcel of land can hold, but no limit on how many prims you can create in total. If the maximum number prims on a parcel of land is reached, no more prims can be made until some are deleted or moved into inventory.

What is a Sculpted Prim A Sculpted Prim is a prim whose shape is determined by a texture. These textures are called Sculpt Textures. You can use sculpted prims to create complex shapes that are not currently possible with Second Life's prim system.

Manual | Building In 3-D

5

E-Book Library Sculpted prims were originally intended by Linden Lab to support only soft organic shapes with imprecise surface definition, but by popular demand were later extended to support the creation of complex, hard-edged objects with precise surface definition, similar to traditional 3D surface meshes used in other 3D software.

Fig. 5 One way is to create a 3D model in an external 3D software package, and then export a Sculpt Map for uploading to Second Life. Linden has written an exporter for the Maya modeling program. For 3D modeling tutorials visit http://www.youtube.com/user/Torley

Fig. 6 Manual | Building In 3-D

6

E-Book Library

Getting free stuff for the E-Book Library Second Life is an immense territorially where you could travel continuously, day and night, and never see it all. I've been searching some of the popular places in S.L. to find free stuff and there are loads and loads of islands with both poor and excellent quality stuff as expected. To build the book Library we teleported to the “Sooseunhwa” region and we visited the place called “Freebie Heaven”. There you can find free houses, furniture, clothes, lights, scripts, textures and more. To teleport enter the name of a specific location into the "Search" tool and then click "Teleport" to travel directly to that address. After teleporting to the freebie island you just have to look for the item that you need, in this case you would need a house, furniture, textures and scripts. When you find those items you just right click in the item and select buy. Those items would be storage in your inventory, which appear in the down right side of your screen. Freebie warehouse http://slurl.com/secondlife/Burns/95/148/80 (Coordinates 68.131.87)

Fig. 7

Fig. 8 Manual | Getting free stuff for the E-Book Library

7

E-Book Library Where to build You can build things anywhere in Second Life where you have permission to build. That could be your own land, someone else's land with permission, or a public sandbox. Landowners control the act of building on their land. Most landowners will have that permission blocked. You always can ask them to turn it on for you, but don't expect that. Rather, go to a public build area known as a "sandbox" SkyBeam Sandbox http://slurl.com/secondlife/SkyBeam/72/72/39 (Coordinates 84.86.46)

Fig. 9

Building E-Book Library After finding a land where you can build, go to inventory and select the items you bought it in “Freebie Heaven” island and drag it to the land where you are going to build. To move the items just right click in the item and select “edit”. In your screen would appear an edit window with different options. This tool would let you move, rotate, stretch, and edit the information of you item. You can also select different Manual | Building E-Book Library

8

E-Book Library features, textures and create scripts for animation. Click in the arrows that appear in your object to move, rotate or stretch it.

Fig. 10 After moving your house in the correct location, you can start putting furniture as well as other decorations to the house.

Fig. 11

Manual | Building E-Book Library

9

E-Book Library How to make books Using prims you can create books and different objects like shelves for the library. The skills you will learn include Texturing, modifying scripts and basic prim manipulation. 1. Make a prim (or object) that will be our book 2. Click on Build at the bottom of your screen or right click on the ground and choose Create. A menu will pop up. Here select the box shape 3. Your mouse will change into a magic wand, and when you click on the ground, you will create your prim 4. Now we need to make out books thinner, because we don’t want thick books. Click on the Object tab (if you don’t see it click the "more" button) Here is where we control the prim's shape. You can either select "Stretch" from the top to manually change the book or you can change the X or Y under size (in the middle on the left) 5. My book's size is x=. 034, y=. 349, z=. 440

Fig. 12

Manual | Building E-Book Library

10

E-Book Library 6. Now we have our book, but it needs textures to make it believable. Go to the Texture tab, here you will find controls for the pattern and the color, as well as ways to manipulate that 7. Double click on the box on the right. This controls color. Pick a color for your book 8. At the top of your menu click on "Texture" 9. A new window would appear next to the edit window. From here, you can choose a texture or image for the cover of your book Note: You can upload images from your computer by going to file then upload image. Each image cost L$10.

10. Select a cover from the list according to the subject of the book 11. Now that you have the book the way you want it, you can move the Book to the correct location 12. Now you have to add features to the book by using Scratch scripts

E-book library on City Tech Island http://slurl.com/secondlife/CityTech/141/192/25 (Coordinates 138.192.24)

Fig. 13 Manual | Building E-Book Library

11

E-Book Library How to make Book Shelves You create shelves the same way you did the books but changing the size according to the space allocated in the house. You can also teleport to a free island and get free book’s shelves. You can Visit “Freebie Heaven” or “Freebie Warehouse” islands using your search engine in Second Life. 1. Click on Build at the bottom of your screen or right click on the ground and choose Create. A menu will pop up. Here select the box shape 2. Your mouse will change into a magic wand, and when you click on the ground, you will create your prim 3. Now we need to make out shelves thinner, because we don’t want thick shelves. Click on the Object tab (if you don’t see it click the "more" button) Here is where we control the prim's shape. You can either select "Stretch" from the top to manually change the shelve or you can change the X or Y under size (in the middle on the left) 4. My book's shelve size is x=8, y=. 3, z=. 03

Fig. 14

Manual | Building E-Book Library

12

E-Book Library 5. You can select wood textures for a better look.

Fig. 15

The Final Product After creating a book and shelve, make copies of the objects and align them in the proper order inside your house using the editor tool of second life. E-book library on City Tech Island http://slurl.com/secondlife/CityTech/141/192/25 (Coordinates 138.192.24)

Fig. 16 Manual | Building E-Book Library

13

E-Book Library

Scripting A very powerful feature of Second Life is the ability to add a script, or small program, to an object. Scripts can turn simple objects into interactive experiences that impart information, play sounds, and move or just about anything. The scripting language is very complicated for beginners but there is software that makes it easier to create simple programs. For this project I used a program called “Scratch”. Scratch lets you construct programs by snapping together graphical blocks that contain simple instructions for a particular object that you want to animate. You can download scratch for Windows and Mac free at http://web.mit.edu/~eric_r/Public/S4SL/. For Scratch tutorials visit http://web.mit.edu/~eric_r/Public/S4SL/tutorial/index.html.

Animating Books 1. Create a script using the instructions boxes of Scratch. You can find the complete script in the appendix section. 2. Click on copy Linden Script and then go to second life. 3. Open the editor tool for a selected book and click on the content tab. In the content tab, click on New Script and a new script would appear. 4. Double click in the new script and delete the text that is inside the new script folder. Paste the script you create in scratch and click save. Now the book would follow the instructions you made in Scratch.

Fig. 17

Manual | Scripting

14

E-Book Library Floating Text Unfortunately you can’t create floating text in Scratch but the script is not difficult to follow. Open the editor tool for a selected book and click on the content tab. Create a new script. Double click in the new script and delete the text that is inside the script. Copy the following script and paste it in the new script file. Insert the name of the book and save the file. Note: You can use \n to make a second line in your floating text. The text that is after \n would appear in a second line.

Script default { state_entry() { llAllowInventoryDrop(TRUE); llSetText("Title of the Book \n Second Line", <1,1,0>, 1.5); } }

Changing Text Color You can change the color of your floating text by changing the numbers of the vector. The x, y & z components of the vector are used to represent red, green, and blue respectively. Example default { state_entry() { llAllowInventoryDrop(TRUE); llSetText("Lake and Sea \n Monsters", <1,0,0>, 1.5); } }

Manual | Scripting

15

E-Book Library Floating Text and Color E-book library on City Tech Island http://slurl.com/secondlife/CityTech/141/192/25 (Coordinates 138.192.24)

Fig. 18

Linking Books to Web pages After creating a book in Second Life is necessary to add content to the book. For this project you can link your books to book-viewer servers like Scribd. To start, open the editor tool for a selected book and click on the content tab. Create a new script. Double click in the new script and delete the text that is inside the script. Copy the following script and paste it in the new script file. Insert the name of the book, Link of the book and save the file. Script default { touch_start(integer total_number) { llLoadURL(llDetectedKey(0), "Enter name of the Book", "Insert Link of the Book from Scribd.com or another book-viewer server"); } } Manual | Scripting

16

E-Book Library Example default { touch_start(integer total_number) { llLoadURL(llDetectedKey(0), "Lake and Sea Monster", " http://www.pdfcoke.com/doc/12755580/Lake-and-Sea-Monsters"); } } E-book library on City Tech Island http://slurl.com/secondlife/CityTech/141/192/25 (Coordinates 138.192.24)

Fig. 19

Scribd Book-Viewer Scribd is an online library for document content added by a community of over 10 million users. With Scribd's iPaper document reader, anyone can easily upload and immediately share their original works on Scribd. iPaper software transforms PDF, Word, PowerPoint and many other file formats into an elegant web display. Manual | Scripting

17

E-Book Library

Your documents can be shared with private or public readers, and because every word of your document is indexed for search engine optimization, your file also can be discovered by Google or Yahoo. For the E-book library I uploaded some of my textbooks that I used in college. If you want to upload your books to Scribd, sign up for an account at Scribd.com it’s free.

Link of the Book

Fig. 20

Manual | Scripting

18

E-Book Library After following all the previous sections you would be able to create your own books, shelves and collect free furniture for your library. The E-book library is an initiative to promote and develop the access of e-books. It addresses and focuses on the needs of academic and research libraries. Also it offers content across all subject areas, the initial focus being on recent titles, most specifically in the areas of Science, Technology and Medicine. For more information please visit http://www.wix.com/bookstore/ebook-libray. Here you can find video tutorials about making the E-book library. If you have any questions contact us at the above website.

Manual | Scripting

19

E-Book Library

Appendix Animating Book Script // The code below was generated by // SCRATCH FOR SECOND LIFE (S4SL) // alpha release October 19, 2007 // // by Eric Rosenbaum ([email protected]) // MIT Media Lab // Lifelong Kindergarten group // // S4SL is a modified version of Scratch, // a graphical programming language for kids // see scratch.mit.edu // // // USER VARIABLES // // // INTERNAL VARIABLES // vector home; integer penState; float penColor; float color; float ghost; vector originalScale; float sizePercent; integer numAvatarsNearby; vector nearestAvPosition; key ownerKey; vector ownerPosition; // // INTERNAL FUNCTIONS // // move(steps) // move object a number of steps (meters) along its current heading // forward is along the positive x axis // if the pen is down, create a line segment along the path traveled // the line is positioned by its center, which is placed halfway back along the path move(float steps) { vector fwd = llRot2Fwd(llGetRot()) * steps; llSetPos(llGetPos() + fwd); if (penState == TRUE) { if (llGetInventoryType("lineSegment") == INVENTORY_NONE) { llSay(0, "Oops! To draw a line, my inventory needs a lineSegment. You can get one from the Scratch Inventory Box."); } else { integer randomID = llRound(llFrand(99999999)); llRezObject("lineSegment", llGetPos()-fwd/2, <0,0,0>, llGetRot(), randomID);

Manual | Appendix

20

E-Book Library llSay(1, (string)randomID + ":set length:"+ (string)llFabs(steps)); llSay(1, (string)randomID + ":set color:" + (string)penColor); } } } // turnRight(float angle) // turn angle degrees clockwise around the local z axis turnRight(float angle) { angle *= -1; rotation newRot = llEuler2Rot(<0,0,angle> * DEG_TO_RAD); llSetRot(newRot*llGetRot()); } // turnLeft(float angle) // turn angle degrees counterclockwise around the local z axis turnLeft(float angle) { rotation newRot = llEuler2Rot(<0,0,angle> * DEG_TO_RAD); llSetRot(newRot*llGetRot()); } //up(float steps) //move up along the global z axis by steps meters //does not leave a line segment up(float steps) { llSetPos(llGetPos()+<0,0,steps>); } //down(float steps) //move down along the global z axis by steps meters //does not leave a line segment down(float steps) { llSetPos(llGetPos()+<0,0,-1*steps>); } // turnPitch(float angle) // turn angle degrees upward around the local y axis turnPitch(float angle) { angle *= -1; rotation newRot = llEuler2Rot(<0,angle,0> * DEG_TO_RAD); llSetRot(newRot*llGetRot()); } // float getHeading() // return the current heading in the xy plane in degrees float getHeading() { return llRot2Angle(llGetRot())*RAD_TO_DEG; } // setHeading(float angle) // set the heading in the xy plane in degrees setHeading(float angle) { vector newVec = <0, 0, angle*DEG_TO_RAD>; rotation newRot = llEuler2Rot(newVec); llSetRot(newRot);

Manual | Appendix

21

E-Book Library } // turnRoll(float angle) // turn angle degrees clockwise around the local x axis turnRoll(float angle) { rotation newRot = llEuler2Rot( * DEG_TO_RAD); llSetRot(newRot*llGetRot()); } // changePenColorBy(float num) // change the pen color by an amount changePenColorBy(float num) { penColor += num; setPenColorTo(penColor); } // setPenColorTo(float num) // set the pen to a particular color setPenColorTo(float num) { penColor = (integer)num % 100; } // penDown() // put the pen down, so that when the object moves it will draw penDown() { penState = TRUE; } // penUp() // put the pen up, so that the object will not draw when it moves penUp() { penState = FALSE; } // clear() // broadcast a message to nearby line segments that will cause them to // delete themselves clear() { llSay(1, "clearLineSegments"); } // pointTowardNearestAv() // turn to point toward the nearest avatar pointTowardNearestAv() { vector myPos = llGetPos(); float xdiff = myPos.x - nearestAvPosition.x; float ydiff = myPos.y - nearestAvPosition.y; float angle = llAtan2(xdiff, ydiff) * RAD_TO_DEG; setHeading(270 - angle); } // pointTowardOwner() // turn to point toward the owner pointTowardOwner() { vector myPos = llGetPos(); float xdiff = myPos.x - ownerPosition.x;

Manual | Appendix

22

E-Book Library float ydiff = myPos.y - ownerPosition.y; float angle = llAtan2(xdiff, ydiff) * RAD_TO_DEG; setHeading(270 - angle); } // float distanceToNearestAv() // returns the distance in meters to the nearest avatar float distanceToNearestAv() { return llVecDist(llGetPos(), nearestAvPosition); } // float distanceToOwner() // returns the distance in meters to the owner float distanceToOwner() { return llVecDist(llGetPos(), ownerPosition); } // float randomMinToMax(float min, float max) // returns a random number between min and max integer randomMinToMax(float min, float max) { return llRound(llFrand(max - min) + min); } // say(string text) // say the text on the public chat channel 0 so all nearby avatars and objects will hear it say(string text) { llSay(0, text); } // broadcast(string message) // say the message on channel 1. No avatars will hear it. // all nearby objects will hear it. broadcast(string message) { llSay(1, message); } // setText(string text) // create opaque white floating text above the object setText(string text) { llSetText(text, <1,1,1>, 1); } // vector hueToRGB(float h) // take a color represented as a hue value between 1 and 100 and // return an RGB vector representing the same color. vector hueToRGB(float h) { integer i; float f; float p; float q; float t; float r; float g;

Manual | Appendix

23

E-Book Library float b; float s = 1; float v = 1; h *= 5; // sector 0 to 5 i = llFloor(h); f = h - i; // factorial part of h p = v * ( 1 - s ); q = v * ( 1 - s * f ); t = v * ( 1 - s * ( 1 - f ) ); if (i == 0) { r = v; g = t; b = p; } else if (i == 1) { r = q; g = v; b = p; } else if (i == 2) { r = p; g = v; b = t; } else if (i == 3) { r = p; g = q; b = v; } else if (i == 4) { r = t; g = p; b = v; } else { r = v; g = p; b = q; } return ; } // setColor(float num) // set the color of the object using a number between 1 and 100 representing a hue setColor(float num) { color = (integer)num % 100; llSetColor(hueToRGB(color / 100), ALL_SIDES); if (llGetObjectName() == "Scratch Bug") { llSetLinkColor(2, hueToRGB(color / 100), ALL_SIDES); } else { //llSetLinkColor(LINK_SET, hueToRGB(color / 100), ALL_SIDES); } } // changeColorBy(float num) // change the hue of the object by a number changeColorBy(float num) {

Manual | Appendix

24

E-Book Library float newColor = color + num; if (newColor < 0) { newColor = 0; } if (newColor > 100) { newColor = 100; } setColor(newColor); } // setGhost(float num) // set the ghost effect of the object to a value between 0 (opaque) and 100 (transparent) setGhost(float num) { ghost = (integer)num % 101; llSetAlpha(((100 - ghost) / 100), ALL_SIDES); llSetLinkAlpha(LINK_SET, ((100 - ghost) / 100), ALL_SIDES); } // changeGhostBy(float num) // change the ghost effect on an object by a number changeGhostBy(float num) { setGhost(ghost + num); } // setSize(float newSize) // set the size of the object to a percentage of its original size setSize(float newSize) { sizePercent = newSize; vector newScale = originalScale*(sizePercent/100); llSetScale(newScale); } // changeSizeBy(float change) // change the size of an object by a percentage of its original size changeSizeBy(float change) { sizePercent += change; vector newScale = originalScale*(sizePercent/100); llSetScale(newScale); } // playSound(string snd) // play a sound at full volume // snd can be the name of a sound in the inventory of the object, or the // UUID of a sound which exists somewhere else playSound(string snd) { llPlaySound(snd, 1); } // playSoundNamed(string snd) // play a sound at full volume // snd can be the name of a sound in the inventory of the object, or the // UUID of a sound which exists somewhere else // this is the version for text input of the name of a sound in a scratch block // so it checks the inventory and gives an error if the sound is missing

Manual | Appendix

25

E-Book Library playSoundNamed(string snd) { if (llGetInventoryType(snd) == INVENTORY_NONE) { llSay(0, "Oops! My inventory does not contain the sound " + snd); } else { llPlaySound(snd, 1); } } // wait(float secs) // pause all execution of this script for some number of seconds wait(float secs) { llSleep(secs); } // levelOut() // remove the x and y rotation components, so that the object is // level with respect to the ground levelOut() { vector myVec = llRot2Euler(llGetRot()); vector newVec = <0, 0, myVec.z>; rotation newRot = llEuler2Rot(newVec); llSetRot(newRot); } // goHome() // move the object back to its home position // home is set the the position of the object when it is created, // and can be set to a new position using setHomeHere() goHome() { llSetPos(home); //levelOut(); } // setHomeHere() // set the home position to the current position setHomeHere() { home = llGetPos(); } // startListening() // listen for messages on both channel 0, the public channel, // and channel 1, where broadcasts are sent startListening() { llListen(0, "", "", ""); llListen(1, "", "", ""); } // initInternal() // do some setup for internal functions // this includes setting various variables to their defaults // clearing text on the object, and turning on // the repeating sensor and timer events initInternal()

Manual | Appendix

26

E-Book Library { setHomeHere(); penState = FALSE; penColor = 0; color = 0; ghost = 0; sizePercent = 100; originalScale = llGetScale(); ownerKey = llGetOwner(); llSetText("", <1,1,1>, 0); llSensorRepeat("", "", AGENT, 96, PI, .1); llSetTimerEvent(.1); startListening(); } initAll() { initInternal(); } touch1(){ setHomeHere(); say("Click on Go To Page"); say("to Look Inside the Book !"); penUp(); playSound("1db875d6-35fd-7851-42c9-4c24ba4a3dc3"); move(0.4); setSize(300); wait(8); goHome(); setSize(100); } default { state_entry() { initAll(); } on_rez(integer start_param) { initAll(); } sensor(integer n) { numAvatarsNearby = n; nearestAvPosition = llDetectedPos(0); integer i; for (i=0; i
Manual | Appendix

27

E-Book Library collision_start(integer n) { } listen(integer channel, string name, key id, string msg) { } timer() { } } //<scratchScript><argument>Click on Go To Page<argument>to Look Inside the Book !<argument>burble<argument>0.4<argument>300<argument>8<argument>100

Manual | Appendix

28

E-Book Library

References Preface -

Second Life. (2009). Linden Lab. Retrieved April 8, 2009, from http://secondlife.com Second-Life Blog. (2009). Ginger Ninja. Retrieved April 15, 2009, from http://www.second-life.com/

Getting Started -

Second Life. (2009). Linden Lab. Retrieved April 4, 2009, from http://secondlife.com/whatis/ Wiki. (2009). Linden Research Inc. Retrieved April 6, 2009, from http://wiki.secondlife.com/wiki/Inventory Second Thoughts. (2006). W.H. Auden’s Blog Retrieved April 11 2009, from http://secondthoughts.typepad.com/second_thoughts/2006/06/getting_st arted.html

Creating in Second Life -

-

-

Second Life. (2009). Linden Lab. Retrieved April 1, 2009, from http://secondlife.com/whatis/create.php Wiki. (2009). Linden Research Inc. Retrieved April 3, 2009, from http://wiki.secondlife.com/wiki/Create Scratch for Second Life. (2008). MIT Media Lab. Retrieved April 6, 2009, from: http://web.mit.edu/~eric_r/Public/S4SL/ http://web.mit.edu/~eric_r/Public/S4SL/tutorial/index.html Wiki. (2008). Linden Research Inc. Retrieved April 8, 2009, from http://wiki.secondlife.com/wiki/Category:LSL_Color Scribd. (2009). Scribd API & Embed Retrieved April 15, 2009, from http://www.pdfcoke.com/about Nicola Escher's Web site. (2007). Nicola Escher Retrieved April 25, 2009, from http://nicolaescher.com/tutorials.php

Manual | References

29

E-Book Library

Acknowledgment Members Marlon Rendon (Marlon Piers) Pinaud Paul (Pino Rae) Lansana Daffe (Louis Dover)

Contributions This manual has been complied and produced with the support of Pinaud Paul in writing the getting started section as well as editing the draft of this manual. Lansana Daffe in writing the preface and Marlon Rendon in writing the creating in Second Life section as well as editing the manual. The editor would like to thank Dr. Reneta D. Lansiquot in particular for the help that she provided to him by taking time out for participating in discussions, by going through the draft of this manual and through her constructive criticism. Marlon Rendon Editor

Manual | Acknowledgment

30

E-Book Library

E-Book Library’s Manual by Marlon Rendon, Pinaud Paul and Lansana Daffe First Edition 2009 Edited By Dr. Reneta D. Lansiquot Marlon Rendon Project Coordinator Marlon Rendon Compilation Marlon Rendon Pinaud Paul Lansana Daffe

Copyright 2009 All rights reserved including the right to reproduce in electronic, print or in any form or media. Sponsored By

Manual | Acknowledgment

31

Related Documents

E Book Manual
May 2020 6
Manual Book
December 2019 69
E-book
May 2020 8
E-book Massas E Molhos
November 2019 49
Manual Tool Book, Cap5
November 2019 13