Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float value;
- float MIN=5;
- float MAX=15;
- display()
- {
- llSetLinkPrimitiveParamsFast(2,[ PRIM_TEXT, llGetObjectName()+"\n"+(string)value+"\n("+(string)MIN+".."+(string)MAX, <1,1,1>,1 ]);
- transmit();
- }
- transmit()
- {
- llSetColor(<0,1,0>,ALL_SIDES);
- llWhisper(100,llGetObjectName()+" "+(string)value);
- llSleep(0.1);
- llSetColor(<1,1,1>,ALL_SIDES);
- }
- move(vector v)
- {
- value=(MAX-MIN)*v.y+MIN;
- float y=v.y - 0.5; // normalize on -0.5 + 0.5
- vector scale=llGetScale();
- float sz=scale.y*y; // normalize on y axi
- vector new=<0,sz,0>;
- // move accordingly the cursor
- llSetLinkPrimitiveParamsFast(2,[ PRIM_POSITION, new ]);
- display();
- }
- default
- {
- state_entry()
- {
- list l=llParseStringKeepNulls(llGetObjectDesc(),[".."],[]);
- MIN=(float)llList2Float(l,0);
- MAX=(float)llList2Float(l,1);
- llSay(0, "Script running");
- move(<0,0,0>);
- }
- touch_start(integer count)
- {
- integer link=llDetectedLinkNumber(0);
- if(link==2)
- {
- transmit();
- return;
- }
- move(llDetectedTouchST(0));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement