Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Presentations Talking_animated_picture  

Talking_animated_picture

An article on how to use this script is at http://metaverse.mitsi.com/Secondlife/posts/talking-picture
You will need to create your avatar first. Navigate to this link at http://www.honestjohnny.co.uk/play/?mid=36766892 and click Create your own talking picture

Category: Presentations
By : Ferd Frederix
Created: 2010-08-05 Edited: 2013-09-07
Worlds: Second Life

the Zip file

Download all files for Talking_animated_picture
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Talking_animated_picture_1.lsl

This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1
2 // Go through steps 1) Choose your character, 2) Appearance, 3) Accessorize Yourself, and 4) Add your Audio. You will be able to pick from over 100 avatar looks, choose your skin colors, change hair, clothes, headgear, and even choose your own background image. When you are done, email the link to yourself.
3 //
4 // Paste the code from the following script into the script window, and save it. Close the editor, and walk up to the picture!
5 //
6 // The picture will detect all approaching avatars. When they get within 10 meters of the picture, the picture will change from a static image and the picture will talk. You can change the default image by changing the string no_viewer2 to the UUID of any image, you can set the range, and set the scan time to help control lag.
7 //
8 // Please note that under the terms of this license, you must share this script OPEN SOURCE, with mod rights. You cannot sell this script or the objects derived from it.
9
10 // Script by Ferd Frederix
11 // Creative Commons Attribution-NonCommercial-ShareAlike 3.0
12 // See http://creativecommons.org/licenses/by-nc-sa/3.0/ for the license.
13
14 float DISTANCE = 10.0; // distance the picture will detect up an avatar, from 0.1 to 96.0.
15 // Bigger numbers cause more lag
16 float RATE = 3.0; // seconds to scan for an avatar, lower numbers cause more lag but faster response.
17 string no_viewer2 = "eabd4399-7884-ae7e-545e-ea9345bbf586"; // a default image, change this if you like
18
19
20 // do not modify below this point
21
22 string ablank = "8a2d8475-c746-f4a6-4601-6849905e0f58"; // a blank image
23 list rules = [
24 PRIM_MEDIA_AUTO_PLAY ,1,
25 PRIM_MEDIA_PERMS_INTERACT, PRIM_MEDIA_PERM_NONE,
26 PRIM_MEDIA_PERMS_CONTROL,PRIM_MEDIA_PERM_OWNER,
27 PRIM_MEDIA_CONTROLS, PRIM_MEDIA_CONTROLS_MINI,
28 PRIM_MEDIA_AUTO_SCALE, FALSE,
29 PRIM_MEDIA_WIDTH_PIXELS , 1200,
30 PRIM_MEDIA_HEIGHT_PIXELS , 1200,
31 PRIM_MEDIA_CURRENT_URL ];
32
33 list page_visible ; // hold the texture when avtar is away
34 list blank_image ; // holds the blank texture
35 list picture_image; // holds the regular image
36 string texturename;
37 string url;
38 list web_rules;
39 default
40 {
42 {
43 url = llGetObjectDesc();
44 web_rules = rules + url;
45 page_visible = [
46 PRIM_TEXTURE, // command to set a texture
47 1, // on side 1
48 ablank, // the white default texture
49 <0.170,0.140,0>, // Repeats per face
50 <-0.240,-0.135,0>, // Texture Offset
51 0 // rotation in radians
52 ];
53
54 blank_image = [
55 PRIM_TEXTURE, // command to set a texture
56 1, // on side 1
57 ablank, // the white default texture
58 <1,1,0>, // Repeats per face
59 <0,0,0>, // Texture Offset
60 0 // rotation in radians
61 ];
62
63 picture_image = [
64 PRIM_TEXTURE, // command to set a texture
65 1, // on side 1
66 no_viewer2, // the white default texture
67 <1,1,0>, // Repeats per face
68 <0,0,0>, // Texture Offset
69 0 // rotation in radians
70 ];
71
72 llClearPrimMedia(1);
73 llSetPrimitiveParams(picture_image);
74 llSensorRepeat("","",AGENT,DISTANCE,PI,RATE);
75 }
76 sensor(integer nh)
77 {
78 if(llStringLength(url) == 0)
79 {
81 llOwnerSay("You must put a URL into the Description and reset this script");
82 return;
83 }
84 llSetPrimitiveParams(page_visible);
85 llSetPrimMediaParams(1,web_rules);
86 }
87
88 no_sensor()
89 {
90 llClearPrimMedia(1);
91 llSetPrimitiveParams(picture_image);
92 }
93
95 {
97 }
98 }

Back to the Best Free Tools in Second Life and OpenSim.