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 Simple_Prim_Movement  

Simple_Prim_Movement

Up down script

Category: Movement
By : mangowylder
Created: 2013-09-06 Edited: 2012-05-04
Worlds: Second Life

the Zip file

Download all files for Simple_Prim_Movement
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Simple_Prim_Movement_1.lsl
1 integer toggle;
2
3 default
4 {
6 {
7 toggle = !toggle;
8 }
9
10 touch_start(integer total_number)
11 {
12 // Adding .x .y or .z after the vector name can be used to get the float value of just that axis.
13 vector pos = llGetPos();
14 float X = pos.x; // <--- Like this.
15 float Y = pos.y;
16 float Zv = pos.z;
17 if(toggle){
18 float Z = Zv + 1.0;
19 llOwnerSay("I moved up a meter!");
20 llSetPos(< X,Y,Z>);
21 }
22 else{
23 float Z = Zv - 1.0;
24 llSetPos(< X,Y,Z>);
25 llOwnerSay("I moved down a meter!");
26
27 }
28 toggle = !toggle;
29 }
30 }

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