Difference between revisions of "LlGetForce"

From Second Life Wiki
Jump to navigation Jump to search
m
m
Line 8: Line 8:
|caveats
|caveats
|constants
|constants
|examples
|examples=<lsl>
default
{
    state_entry()
    {
        llSetForce(<0,llFrand(10),0>,FALSE); //Sets the force in a frand of 10 in Y axis.
        llSetTimerEvent(1); //Resets the force every second.
    }
    touch_start(integer total_num)
    {
        llOwnerSay((string)llGetForce()); //Says the force.
    }
    timer()
    {
        llResetScript();
    }
}
</lsl>
|helpers
|helpers
|also_functions=
|also_functions=

Revision as of 17:26, 19 August 2010

Summary

Function: vector llGetForce( );
0.0 Forced Delay
10.0 Energy

Returns a vector that is the force (if the script is physical)

Examples

<lsl> default {

   state_entry()
   {
       llSetForce(<0,llFrand(10),0>,FALSE); //Sets the force in a frand of 10 in Y axis.
       llSetTimerEvent(1); //Resets the force every second.
   }
   touch_start(integer total_num)
   {
       llOwnerSay((string)llGetForce()); //Says the force.
   }
   timer()
   {
       llResetScript();
   }

}

</lsl>

See Also

Functions

•  llGetOmega
•  llGetVel
•  llGetTorque
•  llGetMass
•  llGetAccel
•  llSetForce
•  llSetTorque
•  llSetForceAndTorque

Deep Notes

Signature

function vector llGetForce();