Difference between revisions of "LlSetForce"

From Second Life Wiki
Jump to: navigation, search
(Added Example)
m (<lsl> example)
Line 10: Line 10:
 
|caveats=Only works on physical objects.
 
|caveats=Only works on physical objects.
 
|constants
 
|constants
|examples=
+
|examples=<lsl>//A simple rocket script. Launches object up when touched.  
<pre>
+
//A simple rocket script. Launches object up when touched.  
+
 
//Sit on it for an interesting ride!
 
//Sit on it for an interesting ride!
 
default {
 
default {
Line 18: Line 16:
 
           llSetForce(<0,0,0x7FFFFFFF>, 0);  //FLY!
 
           llSetForce(<0,0,0x7FFFFFFF>, 0);  //FLY!
 
     }
 
     }
}
+
}</lsl>
</pre>
+
 
|helpers
 
|helpers
 
|also_functions={{LSL DefineRow||[[llSetForceAndTorque]]|}}
 
|also_functions={{LSL DefineRow||[[llSetForceAndTorque]]|}}

Revision as of 07:12, 2 January 2008

Summary

Function: llSetForce( vector force, integer local );

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.

All Issues ~ Search JIRA for related Bugs

Examples

<lsl>//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!
    }
}</lsl>

See Also

Functions

•  llSetForceAndTorque
•  llSetTorque

Deep Notes

Search JIRA for related Issues

Signature

function void llSetForce( vector force, integer local );