OsSetSpeed

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(13 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{| width="100%" style="border: thin solid black"
+
{{osslfunc
| colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}'''
+
|threat_level=Moderate
|- valign="top"
+
|permissions=${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
|'''Threat Level''' || <Threat Level goes here>
+
|delay=0
 +
|function_syntax= osSetSpeed(key ID, float SpeedModifier)
 +
|ossl_example=<source lang="lsl">
 +
default
 +
{
 +
    state_entry()
 +
    {
 +
        osSetSpeed(llGetOwner(), 2);
 +
        // This doesn't work as of 0.7.1.1 - It will work on 0.7.2-dev or later
 +
        // osSetSpeed(llGetOwner(), 2.0);
 +
    }
 +
}
 +
</source>
 +
|description=Implemented December 30, 2009 by Revolution in GIT# 87959464c9db8948bed89909913400bc2eb7524d - Rev 11850
  
|- valign="top"
+
This allows for users to speed themselves up. It multiplies the running, walking, rotating and flying of the avatar.
|'''Function Syntax''' || <source lang="lsl">
+
osSetSpeed(string UUID, float SpeedModifier)
+
</source>
+
|- valign="top"
+
|'''Example(s)||<source lang="lsl">
+
default
+
{
+
  state_entry()
+
  {
+
    osSetSpeed(llGetOwner(), 2);
+
  }
+
}
+
</source>
+
|}
+
  
Implemented December 30, 2009 by Revolution in GIT# 87959464c9db8948bed89909913400bc2eb7524d - Rev 11850
+
The default value for '''SpeedModifier''' is 1.0.
  
This allows for users to speed themselves up. It multiplies the running, walking, and flying of the avatar.
+
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''
  
[[Category:OSSL Functions]]
+
Note: As of 0.7.1.1, you can't apply float numbers to '''SpeedModifier''' (it will result in script compile error) due to the bug [http://opensimulator.org/mantis/view.php?id=5564 #5564]. On 0.7.2-dev or later, you will able to do so.
[[Category:OSSL functions without threat level]]
+
|
 +
}}

Revision as of 17:20, 1 May 2019

osSetSpeed(key ID, float SpeedModifier)
Implemented December 30, 2009 by Revolution in GIT# 87959464c9db8948bed89909913400bc2eb7524d - Rev 11850

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.

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

Note: As of 0.7.1.1, you can't apply float numbers to SpeedModifier (it will result in script compile error) due to the bug #5564. On 0.7.2-dev or later, you will able to do so.

Threat Level Moderate
Permissions ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Extra Delay 0 seconds
Example(s)
default
{
    state_entry()
    {
        osSetSpeed(llGetOwner(), 2);
        // This doesn't work as of 0.7.1.1 - It will work on 0.7.2-dev or later
        // osSetSpeed(llGetOwner(), 2.0);
    }
}
Personal tools
General
About This Wiki