Script
Inspect and manage script execution, memory, and timing.
Feature: Scripts
What do you want to do?
integer llGetFreeMemory()Returns an integer representing the number of free bytes of memory currently available to the script.float llGetTime()Returns a float representing the elapsed script time in seconds with subsecond precision (since the script started, was reset, or since the last call to llResetTime or llGetAndResetTime).llResetScript()Resets the current script.Reference
29 topic entries
float llGetAndResetTime()functionReturns the elapsed script time in seconds as a float, then resets the script timer to zero.
float llGetEnergy()functionReturns a float representing the remaining physics energy of the object as a percentage (0.0 to 1.0) of its maximum capacity.
integer llGetFreeMemory()functionReturns an integer representing the number of free bytes of memory currently available to the script.
integer llGetFreeURLs()functionReturns an integer representing the number of available HTTP URLs (remaining for the owner if the object is attached, or for the region if unattached).
integer llGetMemoryLimit()functionReturns an integer representing the maximum memory limit (in bytes) that the script is allowed to allocate.
integer llGetSPMaxMemory()functionReturns an integer representing the maximum memory (in bytes) used by the script while the memory profiler was last active (only valid after using
PROFILE_SCRIPT_MEMORY).string llGetScriptName()functionReturns a string containing the name of the script calling this function.
integer llGetScriptState(string script)functionReturns a boolean integer indicating whether the specified script in the prim's inventory is running (returns
TRUEif running,FALSEotherwise).integer llGetStartParameter()functionReturns an integer representing the start/rez parameter passed to the object on creation (returns 0 if rezzed by an agent).
string llGetStartString()functionReturns the initialization string passed to the object's root prim on rez with
llRezObjectWithParams(viaREZ_PARAM_STRING; returns an empty string if rezzed by an agent).float llGetTime()functionReturns a float representing the elapsed script time in seconds with subsecond precision (since the script started, was reset, or since the last call to
llResetTimeorllGetAndResetTime).integer llGetUsedMemory()functionReturns an integer representing the total number of bytes of memory currently used by the script (non-Mono scripts always return 16,384 bytes).
llMinEventDelay(float delay)functionSets the minimum delay time between events being handled (minimums and defaults vary by event type).
llRemoteLoadScriptPin(key target, string script, integer pin, integer running, integer start_param)functionCopies the script into target, setting it running (if running is
TRUE) with the start_param, provided the script owner has modify permissions on target and target's PIN matches pin (set viallSetRemoteScriptAccessPin).llResetOtherScript(string script)functionResets the named script name in the prim's inventory.
llResetScript()functionResets the current script.
llResetTime()functionResets the script's elapsed time timer back to zero.
integer llScriptDanger(vector pos)functionReturns
TRUEif the vector position pos is over public land, sandbox land, land restricting edit/build permissions, or land that disables outside scripts.llScriptProfiler(integer flags)functionEnables or disables the script's profiling state using flags (supports
PROFILE_SCRIPT_MEMORYon Mono, orPROFILE_NONE). Active profiling can significantly reduce script performance.integer llSetMemoryLimit(integer limit)functionRequests that limit bytes are reserved for the script. Returns
TRUEon success orFALSEon failure (has no effect in LSO).llSetRemoteScriptAccessPin(integer pin)functionSets the prim's remote script access PIN to pin (a non-zero value enables loading via
llRemoteLoadScriptPin, while zero disables it).llSetScriptState(string script, integer running)functionSets the running state of the named script in the prim's inventory. If running is
TRUE, the script is enabled; ifFALSE, it is disabled.llSetTimerEvent(float sec)functionSets a timer to trigger a timer event periodically every sec seconds. Passing 0.0 stops further timer events.
llSleep(float sec)functionPuts the script to sleep for sec seconds (at least until the next server-frame, ~0.02222 seconds). The script is inactive during this time. If sec is 0.0 or less, the script does not sleep.
state_entry()eventTriggered immediately whenever a new state is entered (including at script start). It is always the first event handled.
state_exit()eventTriggered when the state command is used to transition out of the current state. Handled before entering the new state's
state_entry.timer()eventTriggered at regular periodic intervals configured by
llSetTimerEvent.on_rez(integer start_param)eventTriggered when the object is rezzed into the world (by a script or user). Passes start_param from the rezzing call (or 0 if rezzed from inventory). Also triggers on attachments during login or when attached from inventory.
changed(integer changes)eventTriggered when various properties of the object change. The parameter changes is a bitfield of CHANGED_* flags.
No matching entries. Try a different term or filter.