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
Map Hunt HUD  

Hunt HUD

large map uncovers itself as you travel

Category: Map
By : Ferd Frederix
Created: 2013-09-06 Edited: 2013-09-04
Worlds: Second Life

the Zip file

Download all files for Hunt HUD
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Map Script.lsl
Get file # 2. Position.lsl
Get file # 3. Map HUD root script.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 // Map prim
3
4 integer debug = 1;
5 DEBUG(string msg)
6 {
7 if(debug) llOwnerSay(msg);
8 }
9
10
11 vector rootScale;
12
13 default
14 {
16 {
17 llSetAlpha(1.0, ALL_SIDES); // visible
18 }
19 touch_start(integer total_number)
20 {
21 llSay(0, "Touched: "+(string)llGetPos());
22 }
23
24 link_message(integer sender_number, integer number, string message, key id)
25 {
26 if(number == 3)
27 {
28 rootScale = (vector) message;
29 // DEBUG("Scale" + message);
30 }
31 else if(number == 4)
32 {
33 ///DEBUG("VISIBLE");
35 }
36 else if(number == 0)
37 {
38 list nums = llParseString2List(message,["|"],[]);
39 float Y = (float) llList2String(nums,0);
40 float X = (float) llList2String(nums,1);
41 X = -X;
42 //lSetPos(<0,X,Y>); // same as the arrowhead
43 // Y = L-R
44 // Z = Up/down
45
46 vector myScale = llGetScale(); // my size
47 //DEBUG("my Scale:" + (string) myScale);
48
49 // find edges of my box
50 vector localPos = llGetLocalPos() ;
51 //DEBUG("local Pos:" + (string) localPos);
52
53 float myLeft = localPos.y - myScale.y/2;
54 float myRight = localPos.y + myScale.y/2;
55 float myBottom = localPos.z - myScale.z/2;
56 float myTop = localPos.z + myScale.z/2;
57
58
59 if(X >= myLeft && X < myRight && Y >= myBottom && Y < myTop)
60 {
62 }
63
64 }
65 }
66 }

Hunt HUD

Positioner script

Category: Map
By : Ferd Frederix
Created: 2013-09-06 Edited: 2013-09-04
Worlds: Second Life


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 // dot script to show your position
3
4 integer debug = 1;
5
6 DEBUG(string msg)
7 {
8 if(debug) llOwnerSay(msg);
9 }
10
11 default
12 {
13
14 link_message(integer sender_number, integer number, string message, key id)
15 {
16 if(number == 0)
17 {
18 list nums = llParseString2List(message,["|"],[]);
19 float Y = (float) llList2String(nums,0);
20 float X = (float) llList2String(nums,1);
21 rotation rot = (rotation) llList2String(nums,2);
22
23 vector newrot = llRot2Euler(rot) * RAD_TO_DEG;
24 newrot = <newrot.z - 90,0,0> * DEG_TO_RAD;
25 rotation lastrot = llEuler2Rot(newrot);
26
27 // DEBUG("r:" + (string) newrot);
28 // rot is around Z.
29 // map to a
30 llSetPos(<0,-X,Y>);
31 llSetLocalRot(ZERO_ROTATION / lastrot);
32 }
33 }
34
35 }

Hunt HUD

main program

Category: Map
By : Ferd Frederix
Created: 2013-09-06 Edited: 2013-09-04
Worlds: Second Life


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 // Map HUD root prim script
3 // exposes a child prim when over that place
4
5 integer debug = TRUE; // set to TRUE to debug
6
7 integer up = FALSE;
8
9 DEBUG(string msg)
10 {
11 if(debug) llOwnerSay(msg);
12 }
13
14 setChild(vector myPos)
15 {
16 vector rootScale = llGetScale();
17 //DEBUG("scale: " + (string) rootScale);
18
19 float x = myPos.x / 256 * rootScale.x; // some percentage of the size of the prim
20 float A = -rootScale.x/2 ;
21 float up = A + (rootScale.x * x *2 );
22 //up = -.25;
23
24 float y = myPos.y / 256 * rootScale.y; // some percentage of the size of the prim
25 float B = -rootScale.y/2 ;
26 float left_right = B + (rootScale.y * y * 2);
27
28
29 string msg = (string) left_right+ "|" + (string) up +"|"+ (string) llGetRot();
30 // DEBUG(msg);
31
32
33
34 // up = 0;
35 // left_right =0;
36
37
38 // msg = (string) left_right+ "|" + (string) up;
39
42 }
43 init()
44 {
46 llMessageLinked(LINK_ALL_CHILDREN,4,"",""); // Darken them all
47 llSetTimerEvent(.20);
48 }
49
50 default
51 {
53 {
54 init();
55 }
56
57 touch_start(integer total_number)
58 {
59 if(up)
60 {
62 up = TRUE;
63 }
64 else
65 {
67 up = FALSE;
68 }
69 }
70
71 changed(integer change)
72 {
73 if(change & CHANGED_OWNER)
74 {
76 }
77 }
78
79
80 attach(integer where)
81 {
82 init();
83 }
84
85
86 timer()
87 {
89 return;
90
91
92 vector myPos = llGetPos();
93 setChild(myPos);
94
95 }
96
97
98 }

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