| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Script sample 1

Page history last edited by Randall Sadler 15 years, 1 month ago

PROXIMITY LABELER - This script allows you to label objects in any language. As the avatar approaches the object, the name appears above the object and/or in the lower left corner with a translation. You can also make an audio recording of the word. The recording is heard when the avatar approaches the object. Copy and paste this script into the contents of a modifiable object. If you want to include the sound, you must also put the recording into the contents folder of the object. To comment out any unused parts of this script, put a // at the beginning of the line.

 

 

//------------------------------------------------------------

//Foreign Language Proximity Labeler 

//by Doktor Tammas

//04-05-08

//When an avatar approaches the object that contains this script,

//the word for that object appears in the lower left corner and

//the word is pronounced in the target language with an audio clip.

 

//If the object is 'no modify', place this script in the CONTENTS of a prim, 

//place the prim near the object, reduce the size of the prim and set the 

//transparency to 90%. That way it will be small and almost invisible. 

 

//If you want the students to see a translation in their native language,

//write the word in the EDIT panel under the GENERAL tab. 

 

//There are 4 parameters in the script that you need to change; 

 

//1. DISTANCE from the object before the script is triggered.

 

//2. TARGET LANGUAGE TEXT which appears in the lower left corner when the avatar 

//   approaches.

 

//3. AUDIO CLIP must be uploaded and placed in the same folder as the script under the //   CONTENTS tab in the EDIT //pallette. Change the name of the audio file in the 

//   script to match the actual filename of the audio file. Maximum length = 10 seconds, 

//   44Khz, mono, 16-bit, .wav format only

 

//4. VOLUME: 0.0 = silent, 1.0 = full volume, or any value inbetween (0.5 = half volume)

 

//Finally, drag the sound file from your INVENTORY to the CONTENTS section of the //object's EDIT palette (where the script is) and change the name of the object

//in the GENERAL section. This name will appear with the TARGET LANGUAGE TEXT.

 

//Public Domain

 

integer SomebodyNear = 0;

 

default

{

state_entry()

{

llSetTimerEvent(5.0);

}

 

timer()

{

//Change DISTANCE: 5 refers to distance in meters when triggered by avatar.

llSensor("",NULL_KEY,AGENT,5,PI);  

}

 

sensor(integer num_detected)

{

if (SomebodyNear == 0)

{

llWhisper(23, "Sign_On"); 

 

//Change TARGET LANGUAGE TEXT

//Replace the words in quotation marks below. Your text will appear in the

//lower left corner when an avatar approaches. You can comment out this line.

llSay(0, "der Stuhl");

 

//The text in the next line floats above the object. You can comment out this line.

  llSetText("der Stuhl", <1,1,1>, 1.5);

 

//Change name of AUDIO CLIP below after llTriggerSound, change VOLUME if desired.

//Play audioclip at full volume (0.0 = no volume, 1.0 = full volume)

//You can select any increment in between (.25, 5.0. etc.)

//Drag the audio clip from your inventory into the CONTENTS folder.

llTriggerSound("stuhl", 1.0);

SomebodyNear = 1;

}

}

 

no_sensor()

{

llWhisper(23, "Sign_Off"); 

SomebodyNear = 0;

}

}

 

// ------------------------------------------

 

 

 

Comments (0)

You don't have permission to comment on this page.