Skip to content
lsl.devlsl.devLSL Dev

llGetForce

function
Function syntax
vector llGetForce();
Returns
vector
Energy
10

Returns a vector representing the constant force currently applied to the object (if the object is physical).

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

How to use
vector result = llGetForce();
Example 1
7 collapsed lines
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();
}
}
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.

From the Second Life Wiki

Community documentation adapted from LlGetForce, by Linden Research, Inc. and contributing residents.View contributors and history.

Imported wiki revision:

Licensed under CC BY-SA 3.0. Last wiki edit: .Formatting and links have been adapted for this site; API metadata follows the LSL definitions.