Difference between revisions of "LlSetForce"

From Second Life Wiki
Jump to navigation Jump to search
(Added Example)
Line 8: Line 8:
|func_desc=Applies force to the object (if the script is physical)
|func_desc=Applies force to the object (if the script is physical)
|spec
|spec
|caveats
|caveats=Only works on physical objects.
|constants
|constants
|examples
|examples=
<pre>
//A simple rocket script. Launches object up when touched.
//Sit on it for an interesting ride!
default {
    touch_start(integer i) {
          llSetForce(<0,0,0x7FFFFFFF>, 0);  //FLY!
    }
}
</pre>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llSetForceAndTorque]]|}}
|also_functions={{LSL DefineRow||[[llSetForceAndTorque]]|}}

Revision as of 11:26, 28 November 2007

Summary

Function: llSetForce( vector force, integer local );
0.0 Forced Delay
10.0 Energy

Applies force to the object (if the script is physical)

• vector force directional force
• integer local boolean, if TRUE uses local axis, if FALSE uses region axis.

Caveats

Only works on physical objects.

Examples

//A simple rocket script. Launches object up when touched. 
//Sit on it for an interesting ride!
default {
     touch_start(integer i) {
          llSetForce(<0,0,0x7FFFFFFF>, 0);  //FLY!
     }
}

See Also

Functions

•  llSetForceAndTorque
•  llSetTorque

Deep Notes

Signature

function void llSetForce( vector force, integer local );