LlSetForce
Looking for the current API? Open the llSetForce reference →
Wiki description
Applies force to the object (if the object is physical)
Function notes
Continuous force. llApplyImpulse has instantaneous push.
Caveats
Only works on physical objects and attachments (non-physical as well as physical). Used on an attachment, it will apply the force to the avatar.
Examples
//A simple rocket script. Launches object up when touched.
//Sit on it for an interesting ride!
default
{
touch_start(integer i)
{
llSetStatus(STATUS_PHYSICS, TRUE);
llSetForce(<0,0,0x7FFFFFFF>, 0); //FLY!
}
}See also: functions
Shared wiki helpers
The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.
Original shared helper source (conditional wiki logic is not evaluated)
{{LSL Injection Test}}{{#if:
{{#if:{{{local|}}}|
{{#ifeq:{{{local|}}}|*||
<!-- non-zero=* -->
{{#ifeq:{{{1|}}}|torque|
{{LSL_Function/boolean|{{{local|}}}|if=*
|th=uses the local axis
|td=uses the [[Viewer coordinate frames#Local|local axis]]
|fh=uses the region axis
|fd=uses the region [[Viewer coordinate frames#Region|region axis]]
|bool=*}}
|
{{LSL_Function/boolean|{{{local|}}}|if=*
|th={{{1|}}} is treated as a local directional vector
|td={{LSLP|{{{1|}}}}} is treated as a [[Viewer coordinate frames#Local|local]] directional vector
|fh={{{1|}}} is treated as a region directional vector
|fd={{LSLP|{{{1|}}}}} is treated as a [[Viewer coordinate frames#Region|region]] directional vector
|bool=*}}
}}
}}
}}
}}Template:LSL Function/physical
Original shared helper source (conditional wiki logic is not evaluated)
{{LSL Injection Test}}{{#if:
{{#vardefine:caveats|{{#var:caveats}}
*Only works in {{#if:{{{avatar|}}}|attachments and}} [[STATUS_PHYSICS|physics-enabled]] objects.}}
}}<noinclude>
{| {{Prettytable}}
|- {{Hl2}}
! #var
! value
|-
{{VarPair|caveats}}
|}
</noinclude>Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.