Don't click here unless you want to be banned.

LSL Wiki : reset

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are ia360925.us.archive.org

Reset

Reset means many different things but it generally means when something is put (or "set") back to a previous condition, state, form, or time. There are several different kinds of things that can be reset, and different ways of performing a reset in each case.

Note: rezzing an object does not reset the scripts in it; change the state of the scripts, or reset any other aspect of an object.

State

Each script has a state that is distinct from other things that are sometimes called state, such as the state of variables and properties of prims. When a script is reset (see below), its state is set to the default state which is called default, and the default state_entry event is triggered.

Any events in the event queues of a script are cleared when the state is changed.

Scripts

A script can reset itself or another script back to the condition it started in. This is equivalent to when a script is compiled when it is saved after changes, or when the reset button is pressed or reset menu item is selected. Another aspect of the condition of a script is whether it is running. If an error occurs a script stops running and cannot be reset by another script.

Functions
llResetOtherScript
llResetScript
llGetScriptState
llSetScriptState
llGiveInventory
llRemoteLoadScriptPin



Global Script Values

When a script is reset, the value of each global variable is set to its initial value. There are also a few other global values hidden in scripts that act like global variables. Global variables may be explicitly set by a script's code and other hidden global values are set in other situations described in the following table.

Category Related Functions
time llGetAndResetTime, llResetTime

Object/Prim Values

While each script contained in a prim has its own state, it is important to note that each prim and the object it is contained in maintains many values or properties that are separate from the scripts and, once set, the script is no longer needed.

With few exceptions, these are not reset when a script in a prim is reset. There are often special functions for setting the values or resetting to the default state. The default value is often one of these: 0 (zero), FALSE, constants (like ZERO_VECTOR, ZERO_ROTATION, NULL_KEY), or an empty string ("").

Some values are used only in the client.

Categories of values that can only be manipulated by scripts:

Category Related Functions and Notes
start parameter llGetStartParameter, llRezObject, llRemoteLoadScriptPin on_rez - reset by script reset(?)
PIN llRemoteLoadScriptPin, llSetRemoteScriptAccessPin
client-side texture animation llSetTextureAnim
client-side rotation llTargetOmega
client-side particles llParticleSystem
prim hover text llSetText
physics
permissions
others llGetStatus, llSetStatus, llGetPrimitiveParams, llSetPrimitiveParams

User

Some things in SL require the user to perform a reset (more details).


State | Value | Time
There is no comment on this page. [Display comments/form]