Difference between revisions of "LlGetForce"

From Second Life Wiki
Jump to navigation Jump to search
m
 
(7 intermediate revisions by 6 users not shown)
Line 8: Line 8:
|caveats
|caveats
|constants
|constants
|examples
|examples=<source lang="lsl2">
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();
    }
}
</source>
|helpers
|helpers
|also_functions
|also_functions=
{{LSL DefineRow||[[llGetOmega]]|}}
{{LSL DefineRow||[[llGetVel]]|}}
{{LSL DefineRow||[[llGetTorque]]|}}
{{LSL DefineRow||[[llGetMass]]|}}
{{LSL DefineRow||[[llGetAccel]]|}}
{{LSL DefineRow||[[llSetForce]]|}}
{{LSL DefineRow||[[llSetTorque]]|}}
{{LSL DefineRow||[[llSetForceAndTorque]]|}}
|also_events
|also_events
|also_tests
|also_tests
Line 18: Line 43:
|negative_index
|negative_index
|cat1=Physics
|cat1=Physics
|cat2
|cat2=Movement
|haiku={{Haiku|The Master, Yoda,|Need for scripts he did not have.|The Force was with him.}}
|cat3
|cat3
|cat4=Stub
|cat4
}}
}}

Latest revision as of 01:52, 22 January 2015

Summary

Function: vector llGetForce( );

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

Examples

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();
    }
}

See Also

Functions

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

Deep Notes

Search JIRA for related Issues

Signature

function vector llGetForce();

Haiku

The Master, Yoda,
Need for scripts he did not have.
The Force was with him.