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
Movement Move_avatar_to_a_special_position  

Move_avatar_to_a_special_position

Rez this object, move it to where you want the avatar's seat prim to end up, and reset the script. It will say the position across an entire region.

Category: Movement
By : whcyc2002
Created: 2013-05-29 Edited: 2013-05-29
Worlds: Second Life

the Zip file

Download all files for Move_avatar_to_a_special_position
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Move_avatar_to_a_special_position_1.lsl
Get file # 2. Move_avatar_to_a_special_position_2.lsl
1 integer listen_ch= -478312941;
2
3 default
4 {
6 {
7 llRegionSay(listen_ch, (string)llGetLocalPos());
8 }
9
10 }

Move_avatar_to_a_special_position

A pose ball-like sitter that will move to the position where the other script was rezzed

Category: Movement
By : whcyc2002
Created: 2013-05-29 Edited: 2013-05-29
Worlds: Second Life

1 vector target_pos ;
2 vector local_pos;
3 integer listen_handle;
4 integer listen_ch= -478312941;
5
6 default
7 {
9 {
10 llSitTarget(<0.0, 0.0, 0.1>, ZERO_ROTATION);
11 local_pos = target_pos = llGetLocalPos();
12 listen_handle = llListen(listen_ch, "", "", "");
13 }
14 on_rez(integer num){
16 }
17 listen( integer channel, string name, key id, string message )
18 {
19 if(channel == listen_ch){
20 target_pos = (vector) message;
21 llListenRemove(listen_handle);
22 }
23 }
24 changed(integer change)
25 {
26 if(change & CHANGED_LINK)
27 {
29 if(av) // evaluated as true if key is valid and not NULL_KEY
30 {
31 llSetRegionPos(target_pos);
32 llUnSit(av);
33 llSetRegionPos(local_pos);
34 }
35 }
36 }
37 }

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