Difference between revisions of "Jump Limiter"

From Second Life Wiki
Jump to navigation Jump to search
m
m (<lsl> tag to <source>)
 
(One intermediate revision by one other user not shown)
Line 6: Line 6:
<br> So this attachment limits that a little.
<br> So this attachment limits that a little.


<lsl>
<source lang="lsl2">
//==============================================================
//==============================================================
// BETLOG Hax
// BETLOG Hax
Line 42: Line 42:
     {  if (pressed & change & CONTROL_UP)
     {  if (pressed & change & CONTROL_UP)
         {  if (~llGetAgentInfo(llGetOwner()) & AGENT_FLYING)
         {  if (~llGetAgentInfo(llGetOwner()) & AGENT_FLYING)
             {  llSetBuoyancy(-2.0);  
             {  llSetBuoyancy(-2.0);//triple gravity
                 llSleep(1.0);
                 llSleep(1.0);
                 llSetBuoyancy(0.0);     
                 llSetBuoyancy(0.0);     
Line 50: Line 50:
}
}
//=========================================================================
//=========================================================================
</lsl>
</source>
[[Category:LSL Examples]]
[[Category:LSL Examples]]

Latest revision as of 16:14, 24 January 2015

Jump Limiter

--BETLOG Hax UTC+10: 20090707 1407 [SLT: 20090706 2107]

My 200-300 ping makes the standard SL jump height kind of annoying.
So this attachment limits that a little.

//==============================================================
// BETLOG Hax
//
//----------------------------------
//        **** LICENCE START ****
// http://creativecommons.org/licenses/by-sa/3.0/
//             Attribution licence:
// You must:
//    -Include this unaltered licence information.
//    -Supply my original script with your modified version.
//    -Retain the original scripts' SL permissions. [+c/+m/+t]
// Or:
//    -Link to the wiki URL from which you copied this script.
//    -Document: "Uses parts of <scriptname> by BETLOG Hax"
//        **** LICENCE END ****
//----------------------------------
//=========================================================================
default
{   on_rez(integer param)
    {
    }
    state_entry()
    {   llRequestPermissions(llGetOwner(),PERMISSION_TAKE_CONTROLS);
    }
    attach(key id)
    {   if (llGetAttached())
            llRequestPermissions(llGetOwner(),PERMISSION_TAKE_CONTROLS);
    }
    run_time_permissions(integer perm)
    {   if(perm & PERMISSION_TAKE_CONTROLS)
            llTakeControls(0| CONTROL_UP,TRUE, TRUE);
    }
    control(key id, integer pressed, integer change)
    {   if (pressed & change & CONTROL_UP)
        {   if (~llGetAgentInfo(llGetOwner()) & AGENT_FLYING)
            {   llSetBuoyancy(-2.0);//triple gravity
                llSleep(1.0);
                llSetBuoyancy(0.0);    
            }
        }
    }
}
//=========================================================================