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
Defense NO_MOVER_by_Wednesday_Grimm  

NO_MOVER_by_Wednesday_Grimm

NO MOVER by Wednesday Grimm.lsl

Category: Defense
By : Wedensday Grimm
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for NO_MOVER_by_Wednesday_Grimm
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. NO_MOVER_by_Wednesday_Grimm_1.lsl
1
2 // no mover
3 // Wednesday Grimm
4 // June 10, 2003
5 //
6 // This script makes physical objects stay still
7 // if this script is on an object attached to your avatar, you can't be
8 // pushed around
9 //
10 // THEY'RE NOT GOING TO PUSH YOU AROUND ANYMORE!!!
11 //
12
13 // True if we are staying still
14 integer nTarget;
15
16 // set up everything we need
17 startup()
18 {
19 // listen to the owner for a command
20 llListen(0, "", llGetOwner(), "");
21
22 // we are not staying still at startup
23 nTarget = FALSE;
25 }
26
27 default
28 {
30 {
31 startup();
32 }
33
34 on_rez(integer param)
35 {
36 startup();
37 }
38
39 listen(integer channel, string who, key id, string msg)
40 {
41 vector targetPos;
42 if(msg == "lock")
43 {
44 // if we are not already staying still, start doing it
45 if(nTarget == FALSE)
46 {
47 // where are we right now?
48 targetPos = llGetPos();
49 nTarget = TRUE;
50 llMoveToTarget(targetPos, 2.0);
51 }
52 }
53 else if(msg == "unlock")
54 {
55 // stop staying still
57 nTarget = FALSE;
58 }
59 }
60 }// END //

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