Script
Inspect and manage script execution, memory, and timing.
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
Badges
Kind
float llGetAndResetTime()Returns the elapsed script time in seconds as a float, then resets the script timer to zero.function!SL (Not available in SLua)float llGetEnergy()Returns a float representing the remaining physics energy of the object as a percentage (0.0 to 1.0) of its maximum capacity.functioninteger llGetFreeMemory()Returns an integer representing the number of free bytes of memory currently available to the script.functioninteger llGetFreeURLs()Returns an integer representing the number of available HTTP URLs (remaining for the owner if the object is attached, or for the region if unattached).functioninteger llGetMemoryLimit()Returns an integer representing the maximum memory limit (in bytes) that the script is allowed to allocate.functioninteger llGetSPMaxMemory()Returns an integer representing the maximum memory (in bytes) used by the script while the memory profiler was last active (only valid after usingPROFILE_SCRIPT_MEMORY).functionstring llGetScriptName()Returns a string containing the name of the script calling this function.functioninteger llGetScriptState(string script)Returns a boolean integer indicating whether the specified script in the prim's inventory is running (returnsTRUEif running,FALSEotherwise).functioninteger llGetStartParameter()Returns an integer representing the start/rez parameter passed to the object on creation (returns 0 if rezzed by an agent).functionstring llGetStartString()Returns the initialization string passed to the object's root prim on rez withllRezObjectWithParams(viaREZ_PARAM_STRING; returns an empty string if rezzed by an agent).functionfloat 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 tollResetTimeorllGetAndResetTime).functioninteger llGetUsedMemory()Returns an integer representing the total number of bytes of memory currently used by the script (non-Mono scripts always return 16,384 bytes).functionllMinEventDelay(float delay)Sets the minimum delay time between events being handled (minimums and defaults vary by event type).functionllRemoteLoadScriptPin(key target, string script, integer pin, integer running, integer start_param)Copies the script into target, setting it running (if running isTRUE) with the start_param, provided the script owner has modify permissions on target and target's PIN matches pin (set viallSetRemoteScriptAccessPin).functionS (Sleeps 3s)llResetOtherScript(string script)Resets the named script name in the prim's inventory.functionllResetScript()Resets the current script.functionllResetTime()Resets the script's elapsed time timer back to zero.function!SL (Not available in SLua)integer llScriptDanger(vector pos)ReturnsTRUEif the vector position pos is over public land, sandbox land, land restricting edit/build permissions, or land that disables outside scripts.functionllScriptProfiler(integer flags)Enables or disables the script's profiling state using flags (supportsPROFILE_SCRIPT_MEMORYon Mono, orPROFILE_NONE). Active profiling can significantly reduce script performance.functioninteger llSetMemoryLimit(integer limit)Requests that limit bytes are reserved for the script. ReturnsTRUEon success orFALSEon failure (has no effect in LSO).function!SL (Not available in SLua)llSetRemoteScriptAccessPin(integer pin)Sets the prim's remote script access PIN to pin (a non-zero value enables loading viallRemoteLoadScriptPin, while zero disables it).functionS (Sleeps 0.2s)llSetScriptState(string script, integer running)Sets the running state of the named script in the prim's inventory. If running isTRUE, the script is enabled; ifFALSE, it is disabled.functionllSetTimerEvent(float sec)Sets a timer to trigger a timer event periodically every sec seconds. Passing 0.0 stops further timer events.function!SL (Not available in SLua)llSleep(float sec)Puts 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.functionstate_entry()Triggered immediately whenever a new state is entered (including at script start). It is always the first event handled.event!SL (Not available in SLua)state_exit()Triggered when the state command is used to transition out of the current state. Handled before entering the new state'sstate_entry.event!SL (Not available in SLua)timer()Triggered at regular periodic intervals configured byllSetTimerEvent.eventon_rez(integer start_param)Triggered 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.eventchanged(integer changes)Triggered when various properties of the object change. The parameter changes is a bitfield of CHANGED_* flags.event
No matching entries. Try a different term or filter.