OsSetOwnerSpeed

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (XEngine to OSSL)
m (Change See Also)
 
(5 intermediate revisions by one user not shown)
Line 4: Line 4:
 
|delay=0
 
|delay=0
 
|function_syntax= osSetOwnerSpeed(float SpeedModifier)
 
|function_syntax= osSetOwnerSpeed(float SpeedModifier)
|ossl_example=<source lang="lsl">
 
default
 
{
 
    state_entry()
 
    {
 
        osSetOwnerSpeed(2.5);
 
    }
 
}
 
</source>
 
 
|description=Implemented september 28, 2018 by Bill Blight in GIT# [http://opensimulator.org/viewgit/?a=commit&p=opensim&h=6d9de17d77d20e078b0e7c7546ac3ec047d334e8 6d9de1] & [http://opensimulator.org/viewgit/?a=commit&p=opensim&h=8812684355de043d7630e327e6180fda4e5271b9 881268] and MANTIS# [http://opensimulator.org/mantis/view.php?id=8383 8383]
 
|description=Implemented september 28, 2018 by Bill Blight in GIT# [http://opensimulator.org/viewgit/?a=commit&p=opensim&h=6d9de17d77d20e078b0e7c7546ac3ec047d334e8 6d9de1] & [http://opensimulator.org/viewgit/?a=commit&p=opensim&h=8812684355de043d7630e327e6180fda4e5271b9 881268] and MANTIS# [http://opensimulator.org/mantis/view.php?id=8383 8383]
  
Line 20: Line 11:
  
 
To be precise, it affects physical velocity. If you specify too large or too small number for '''SpeedModifier''', the target will be unmovable, showing the following message in the region console:
 
To be precise, it affects physical velocity. If you specify too large or too small number for '''SpeedModifier''', the target will be unmovable, showing the following message in the region console:
 +
 
:''[PHYSICS]: Got a NaN velocity from Scene in a Character''
 
:''[PHYSICS]: Got a NaN velocity from Scene in a Character''
 +
|ossl_example=<source lang="lsl">
 +
//
 +
// osSetOwnerSpeed Script Example
 +
// Author: djphil
 +
//
 +
 +
integer switch;
 +
 +
default
 +
{
 +
    state_entry()
 +
    {
 +
        llSay(PUBLIC_CHANNEL, "Touch to see osSetOwnerSpeed usage.");
 +
    }
 +
 +
    touch_start(integer number)
 +
    {
 +
        if (llDetectedKey(0) == llGetOwnerKey(llGetKey()))
 +
        {
 +
            if (switch = !switch)
 +
            {
 +
                osSetOwnerSpeed(2.0);
 +
                llOwnerSay("Your speed in now multiplied by 2.0");
 +
            }
 +
   
 +
            else
 +
            {
 +
                osSetOwnerSpeed(1.0);
 +
                llOwnerSay("Your speed in now multiplied by 1.0, the default value");
 +
            }
 +
        }
  
Note: ...
+
        else
 +
        {
 +
            llSay(PUBLIC_CHANNEL, "Sorry, you are not the owner of this object.");
 +
        }
 +
    }
 +
}
 +
</source>
 +
|additional_info=
 
|
 
|
 
}}
 
}}
 +
== See Also ==
 +
* [[osSetSpeed]]
 +
* [[osSetOwnerSpeed]]

Latest revision as of 18:49, 5 December 2020

osSetOwnerSpeed(float SpeedModifier)
Implemented september 28, 2018 by Bill Blight in GIT# 6d9de1 & 881268 and MANTIS# 8383

This allows for users to speed themselves up. It multiplies the running, walking, rotating and flying of the avatar.

The default value for SpeedModifier is 1.0 and the maximum value is 4.0.

To be precise, it affects physical velocity. If you specify too large or too small number for SpeedModifier, the target will be unmovable, showing the following message in the region console:

[PHYSICS]: Got a NaN velocity from Scene in a Character
Threat Level Moderate
Permissions ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Extra Delay 0 seconds
Example(s)
//
// osSetOwnerSpeed Script Example
// Author: djphil
//
 
integer switch;
 
default
{
    state_entry()
    {
        llSay(PUBLIC_CHANNEL, "Touch to see osSetOwnerSpeed usage.");
    }
 
    touch_start(integer number) 
    {
        if (llDetectedKey(0) == llGetOwnerKey(llGetKey()))
        {
            if (switch = !switch)
            {
                osSetOwnerSpeed(2.0);
                llOwnerSay("Your speed in now multiplied by 2.0");
            }
 
            else
            {
                osSetOwnerSpeed(1.0);
                llOwnerSay("Your speed in now multiplied by 1.0, the default value");
            }
        }
 
        else
        {
            llSay(PUBLIC_CHANNEL, "Sorry, you are not the owner of this object.");
        }
    }
}


[edit] See Also

Personal tools
General
About This Wiki