//.*
"[^"\\]* (?>\\.[^"\\]*)*"
\+\+|\-\-|\<\<|\>\>|\<\=|\>\=|\=\=|\!\=|\&\&|\|\||\+\=|\-\=|\*\=|\/\=|\%\=
[+-]?0x[\da-fA-F.p]+ | [-+]?\d* \.?\d+([eE][-+]?\d+)?
All scripts must have a default state,
which also must be the first state entered when the script starts.
If another state is defined before the default state,
the compiler will report a syntax error.
Complete listing of the Linden Library function calls available in lsl.
string llStringTrim(string text, integer trim_type);
Outputs a string eliminating whitespace from the start and/or end of the specified string.
Constants for trim_type:
STRING_TRIM_HEAD: trim all leading spaces in text
STRING_TRIM_TAIL: trim all trailing spaces in text
STRING_TRIM: trim all leading and trailing spaces in text
string to trim
STRING_TRIM_HEAD,STRING_TRIM_TAIL or STRING_TRIM
void llSetLinkPrimitiveParams(integer linknumber, list rules);
Sets the parameters (or properties) of any linked prim in none step
void llSetLinkTexture(integer linknumber, string texture, integer face);
Sets the texture of linked prims
integer llGetObjectPrimCount(key id);
Returns the prim count for any object id in the same sim.
list llGetParcelDetails(vector pos, list details);
Returns of a list of the details in the order they are in the details list,
for the parcel at pos. pos is in absolute region coordinates.
integer llGetParcelMaxPrims(vector pos, integer sim_wide);
integer llGetParcelPrimCount(vector pos, integer category, integer sim_wide);
Returns the number of prims used on the parcel at pos which are in category.
If sim_wide is TRUE, it returns the number of objects
for the entire sim in the category specified.
If sim_wide is FALSE, it returns the number of objects
on this specific parcel in the category specified
region coordinate
a PARCEL_COUNT_* flag
Can be TRUE or FALSE
list llGetParcelPrimOwners(vector pos);
Returns a strided list of keys and integers of up to 100
agents who own objects in the parcel at pos.
The list is formatted as
[ key agentKey1, integer agentCount1, key agentKey2, integer agentCount2, ... ],
sorted by agent key.
The integers are counts of the number of prims (not objects)
owned by the corresponding agents.
Sleeps the script for 2.0 seconds.
Function only works when the object owner is in the sim
(likely the reason it doesn't work when deeded to group).
integer llAbs(integer val);
Returns the absolute value of val.
float llAcos(float val);
Returns the arccosine in radians of val.
llAddToLandPassList(key avatar, float hours);
Add avatar to the land pass list for hours.
llAdjustSoundVolume(float volume);
Adjusts the volume of the currently playing attached sound started
with llPlaySound or llLoopSound.
This function Has no effect on sounds started with llTriggerSound.
llAllowInventoryDrop(integer add);
If add == TRUE, users that do no have object modify permissions can
still drop inventory items onto object.
float llAngleBetween(rotation a, rotation b);
Returns the angle in radians between rotations a and b.
llApplyImpulse(vector force, integer local);
Applies the impulse in local coordinates if local == TRUE.
Otherwise the impulse is applied in global coordinates.
This function only works on physical objects.
llApplyRotationalImpulse(vector force, integer local);
Applies a rotational impulse force in local coordinates if local == TRUE.
Otherwise the impulse is applied in global coordinates.
This function only works on physical objects.
float llAsin(float val);
Returns the arcsine in radians of val.
float llAtan2(float y, float x);
returns the arctangent2 of y, x
llAttachToAvatar(integer attachment);
Attach to avatar at point attachment.
Requires the PERMISSION_ATTACH runtime permission.
key llAvatarOnSitTarget(void);
If an avatar is sitting on the sit target, return the avatars key,
NULL_KEY otherwise. This only will detect
avatars sitting on sit targets defined with llSitTarget.
rotation llAxes2Rot(vector fwd, vector left, vector up);
Returns the rotation represented by coordinate axes fwd, left, and up.
rotation llAxisAngle2Rot(vector axis, float angle);
Returns the rotation generated angle about axis.
llBreakAllLinks(void);
Delinks all objects in the link set.
Requires the permission PERMISSION_CHANGE_LINKS be set.
llBreakLink(integer linknum);
Delinks the object with the given link number.
Requires permission PERMISSION_CHANGE_LINKS be set.
list llCSV2List(string src);
Create a list from a string of comma separated values specified in src.
integer llCeil(float val);
Returns largest integer value >= val.
float llCloud(vector offset);
Returns the cloud density at the object position + offset.
llCollisionFilter(string name, key id, iteger accept);
If accept == TRUE, only accept collisions with objects name and id,
otherwise with objects not name or id.
Specify an empty string or NULL_KEY to not filter
on the corresponding parameter.
llCollisionSound(string impact_sound, float impact_volume);
Suppress default collision sounds, replace default impact sounds
with impact_sound found in the object inventory.
Supply an empty string to suppress collision sounds.
llCollisionSprite(string impact_sprite);
Suppress default collision sprites, replace default impact sprite
with impact_sprite found in the object inventory.
Supply an empty string to just suppress.
float llCos(float theta);
Returns the cosine of thetaradians.
llCreateLink(key target, integer parent);
Attempt to link object script is attached to and target.
Requires permission PERMISSION_CHANGE_LINKS be set.
If parent== TRUE, object script is attached to is the root.
list llDeleteSubList(list src, integer start, integer end);
Remove the slice from the list and return the remainder.
The start and end are inclusive, so 0, length -1 would delete the
entire list and 0,0 would delete the first list entry.
Using negative numbers for start and/or end causes the index to count
backwards from the length of the list, so 0,-1 would delete the entire
list. If start is larger than end the list deleted is the exclusion
of the entries, so 6,4 would delete the entire list except
for the 5th list entry.
string llDeleteSubString(string src, integer start, integer end);
Removes the indicated substring and returns the result.
The start and end are inclusive, so 0,length-1 would
delete the entire string and 0,0 would delete the first character.
Using negative numbers for start and/or end causes the index to
count backwards from the length of the string, so 0,-1 would
delete the entire string. If start is larger than end the sub string
is the exclusion of the entries, so 6,4 would delete the entire string
except for the 5th character.
llDetachFromAvatar(void);
Drop off of avatar.
vector llDetectedGrab(integer number);
Returns the grab offset of detected object number.
Returns <0,0,0> if number is not valid sensed object.
key llDetectedKey(integer number);
Returns the key of detected object number.
Returns NULL_KEY if number is not valid sensed object.
integer llDetectedLinkNumber(integer number);
Returns the link position of the triggered event for touches.
0 for a non-linked object, 1 for the root of a linked
object, 2 for the first child, etc.
string llDetectedName(integer number);
Returns the name of detected object number.
Returns empty string if number is not valid sensed object.
key llDetectedOwner(integer number);
Returns the key of detected number objects owner.
Returns invalid key if number is not valid sensed object.
vector llDetectedPos(integer number);
Returns the position of detected object number.
Returns <0,0,0> if number is not valid sensed object.
rotation llDetectedRot(integer number);
Returns the rotation of detected object number.
Returns <0,0,0,1> if number is not valid sensed object.
integer llDetectedType(integer number);
Returns the type (AGENT, ACTIVE, PASSIVE, SCRIPTED) of detected object
number. Returns 0 if number is not valid sensed object.
Note that number is a bitfield, so comparisons need to be a bitwise
and check. eg:
integer type = llDetectedType(0);
if (type and AGENT)
{
// ...do stuff with the agent
}
vector llDetectedVel(integer number);
Returns the velocity of detected object number.
Returns <0,0,0 and >
if number is not valid sensed object.
llDialog(key avatar, string message, list buttons, integer channel);
Opens a "notify box" in the top-right corner of the given avatars
screen displaying the message. Up to four
buttons can be specified in a list of strings. When the player
clicks a button, the name of the button is chatted on
the specified channel. Channels work just like llSay(),
so channel 0 can be heard by everyone. The chat
originates at the objects position, not the avatars position. e.g.
llDialog(who, "Are you a boy or a girl?", [ "Boy", "Girl" ], 4913);
llDialog(who, "This shows only an OK button.", [], 192);
llDialog(who, "This chats so you can hear it.", ["Hooray"], 0);
llDie(void);
Delete the object which holds the script.
string llDumpList2String(list src, string separator);
Write the list out in a single string using separator between values.
integer llEdgeOfWorld(vector pos, vector dir);
Returns TRUE if the line along dir from poshits the edge
of the world in the current simulator and returns
FALSE if that edge crosses into another simulator.
llEjectFromLand(key pest);
Ejects pestfrom land that you own.
llEmail(string address, string subject, string message);
Sends email to addresswith subjectand message.
rotation llEuler2Rot(vector vec);
Returns the rotation represented by Euler Angle vec.
float llFabs(float val);
Returns the absolute value of val.
integer llFloor(float val);
Returns largest integer value<= val.
float llFrand(float mag);
Returns a pseudo-random number between [0, mag).
vector llGetAccel(void);
Gets the acceleration.
integer llGetAttached(void);
Returns the object attachment point or 0 if not attached.
integer llGetAgentInfo(key id);
Returns information about the given agent id. Returns a bitfield
of agent info constants.
vector llGetAgentSize(key id);
If the agent id is in the same sim as the object, returns
the size of the avatar.
float llGetAlpha(integer face);
Returns the alpha of the given face. If faceis ALL_SIDES
the value returned is the mean average of all faces.
float llGetAndResetTime(void);
Gets the time in seconds since creation and sets the time to zero.
string llGetAnimation(key id);
Returns the currently playing animation for avatar id.
vector llGetCenterOfMass(void);
Returns the center of mass of the root object.
vector llGetColor(integer face);
Returns the color of face as a vector of red, green, and blue values
between 0 and 1. If face is ALL_SIDES
the color returned is the mean average of each channel.
string llGetDate(void);
Returns the current UTC date as YYYY-MM-DD.
float llGetEnergy(void);
Returns how much energy is in the object as a percentage of maximum.
vector llGetForce(void);
Returns the current force if the script is physical.
integer llGetFreeMemory(void);
Returns the available heap space for the current script.
key llGetInventoryKey(string name);
Returns the key of the inventory name.
string llGetInventoryName(integer type, integer number);
Get the name of the inventory item number of type.
Use the inventory constants to specify the type.
inventory item type
inventory item number
integer llGetInventoryNumber(integer type);
Get the number of items of type in the object inventory.
Use the inventory constants to specify the type.
inventory item type
key llGetKey(void);
Get the key for the object which has this script.
key llGetLandOwnerAt(vector pos);
Returns the key of the land owner at posor NULL_KEY if public.
key llGetLinkKey(integer linknum);
Returns the key of linknumin the link set.
string llGetLinkName(integer linknum);
Returns the name of linknumin the link set.
integer llGetLinkNumber(void);
Returns what link number in a link set the for the object
which has this script. 0 means no link, 1 the root, 2 for
first child, etc.
integer llGetListEntryType(list src, integer index);
Returns the type of the variable at index in src.
integer llGetListLength(list src);
Returns the number of elements in src.
vector llGetLocalPos(void);
Returns the local position of a child object relative to the root.
rotation llGetLocalRot(void);
Returns the local rotation of a child object relative to the root.
llGetNextEmail(string address, string subject);
Get the next waiting email with appropriate addressand/or subject.
If the parameters are blank, they are not used for filtering.
key llGetNotecardLine(string name, integer line);
This function fetches line number line of notecard name and returns
the data through the dataserver event. The line count starts at zero.
If the requested line is past the end of the notecard the dataserver
event will return the constant EOF string.
The key returned by this function is a unique identifier which will
be supplied to the dataserver event in the requested parameter.
integer llGetNumberOfSides(void);
Returns the number of sides of the current object which has the script.
string llGetObjectName(void);
Returns the name of the object which has the script.
vector llGetOmega(void);
Returns the omega.
key llGetOwner(void);
Returns the owner of the object.
key llGetOwnerKey(key id);
Returns the owner of object id.
integer llGetPermissions(void);
Returns what permissions have been enabled.eg:
integer perm = llGetPermissions();
if((perm and PERMISSION_DEBIT) == PERMISSION_DEBIT)
{
// code goes here
}
key llGetPermissionsKey(void);
Returns avatar that has enabled permissions.
Returns NULL_KEY if not enabled.
vector llGetPos(void);
Returns the position.
llGetRegionFPS(void);
Returns the mean region frames per second.
string llGetRegionName(void);
Returns the current region name.
float llGetRegionTimeDilation(void);
Returns the current time dilation as a float between 0 and 1.
rotation llGetRot(void);
Returns the rotation.
vector llGetScale(void);
Returns the scale.
string llGetScriptName(void);
Returns the name of this script.
integer llGetStartParameter(void);
Returns the start parameter passed to llRezObject.
If the object was created from agent inventory, this function
returns 0.
integer llGetScriptState(string name);
Resets TRUE if script nameis running
integer llGetStatus(integer status);
Returns the value of status.
The value will be one of the status constants.
string llGetSubString(string src, integer start, integer end);
Returns the indicated substring from src. The startand end are
inclusive, so 0,length-1 would capture the entire string and 0,0
would capture the first character. Using negative numbers for
start and/or end causes the index to count backwards from the length
of the string, so 0,-1 would capture the entire string.
If start is larger than end the sub string is the exclusion of the
entries, so 6,4 would give the entire string
except for the 5th character.
vector llGetSunDirection(void);
Returns the sun direction on the simulator.
string llGetTexture(integer face);
Returns the texture of faceif it is found in object inventory.
vector llGetTextureOffset(integer side);
Returns the texture offset of sidein the x and y components of a vector.
float llGetTextureRot(integer side);
Returns the texture rotation of side.
vector llGetTextureScale(integer side);
Returns the texture scale of sidein the x and y components of a vector.
float llGetTime(void);
Returns the time in seconds since creation of this script.
float llGetTimeOfDay(void);
Gets the time in seconds since midnight in Second Life.
vector llGetTorque(void);
Returns the torque if the script is physical.
vector llGetVel();
Returns the velocity.
float llGetWallclock(void);
Returns the time in seconds since simulator timezone midnight.
llGiveInventory(key destination, string inventory);
Give the named inventory item to the keyed avatar or object in the
same simulator as the giver. If the recipient is an avatar,
the avatar then follows the normal procedure of accepting
or denying the offer. If the recipient is an object,
the same permissions apply as if you were dragging inventory
onto the object by hand, ie if llAllowInventoryDrop has been called
with TRUE, any other object can pass objects to its inventory.
llGiveInventoryList(key destination, string category, list inventory);
Give the list of named inventory items to the keyed avatar or object
in the same simulator as the giver. If the recipient is an avatar,
the avatar then follows the normal procedure of accepting or denying
the offer. The offered inventory is then placed in a folder named
category in the recipients inventory. If the recipient is an object,
the same permissions apply as if you were dragging inventory onto the
object by hand, ie if llAllowInventoryDrop has been called with TRUE,
any other object can pass objects to its inventory.If the
recipient is an object, the category parameter is ignored.
llGiveMoney(key destination, integer amount);
Transfer amountfrom the script owner to destination.
This call will fail if PERMISSION_DEBIT has not been set.
float llGround(vector offset);
Retuns the ground hieght at the object position + offset.
vector llGroundContour(vector offset);
Retuns the ground contour at the object position + offset.
vector llGroundNormal(vector offset);
Retuns the ground contour at the object position + offset.
llGroundRepel(float height, integer water, float tau);
Critically damps to heightif within height* 0.5 of level.
The heightis above ground level if water
is FALSE or above the higher of land and water if water is TRUE.
vector llGroundSlope(vector offset);
Returns the ground slope at the object position + offset.
string llInsertString(string dst, integer position, string src);
Inserts src into dst at position and returns the result.
llInstantMessage(key user, string message);
Send messageto the user as an instant message.
string llKey2Name(key id);
If object id is in the same simulator, return the name of the object.
string llList2CSV(list src);
Create a string of comma separated values from list.
float llList2Float(list src, integer index);
Returns the float at index in the list src.
integer llList2Integer(list src, integer index);
Returns the integer at index in the list src.
key llList2Key(list src, integer index);
Returns the key at index in the list src.
list llList2List(list src, integer start, integer end);
Returns the slice of the list from startto end from the list
srcas a new list. The startand end parameters
are inclusive, so 0,length-1 would copy the entire list and 0,0
would capture the first list entry. Using negative
numbers for startand/or end causes the index to count backwards
from the length of the list, so 0,-1 would
capture the entire list. If startis larger than end the list
returned is the exclusion of the entries, so 6,4 would
give the entire list except for the 5th entry.
list llList2ListStrided(list src, integer start, integer end, integer stride);
Copy the strided slice of src from start to end.
rotation llList2Rot(list src, integer index);
Returns the rotation at index in src.
string llList2String(list src, integer index);
Returns the string at index in src.
llList2Vector(list src, integer index);
Returns the vector at index in src.
integer llListFindList(list src, list test);
Returns the position of the first instance of testin src.
Returns -1 if test is not in src.
list llListInsertList(list dest, list src, integer pos);
Returns the list created by inserting src into dest at pos.
list llListRandomize(list src, integer stride);
Returns srcrandomized into blocks of size stride.
If the length of srcdividided by strideis non-zero,
this function does not randomize the list.
list llListSort(list src, integer stride, integer ascending);
Returns src sorted into blocks of stride in ascending order if
ascending is TRUE. Note that sort only
works in the head of each sort block is the same type.
list to sort
blocks of stride length
TRUE ascending sort result, FALSE = descending sort result
integer llListen(integer channel, string name, key id, string msg);
Sets a listen event callback for msg on channel from name and
returns an identifier that can be used to
deactivate or remove the listen. The name, id and/or msg parameters
can be blank to indicate not to filter on
that argument. Channel 0 is the public chat channel that all avatars
see as chat text. Channels 1 to 2,147,483,648
are hidden channels that are not sent to avatars.
llListenControl(integer number, integer active);
Make a listen event callback active or inactive. Pass in the value
returned from llListen to the number parameter
to specify which event you are controlling.
Use boolean values to spcify active
llListenRemove(integer number);
Removes a listen event callback. Pass in the value returned from
llListen to the number parameter to specify
which event you are removing.
llLookAt(vector target, float strength, float damping);
Cause object to point the forward axis toward target.
Good strengthvalues are around half the mass of the
object and good damping values are less than 1/10th of the strength.
Asymmetrical shapes require smaller
damping. A strength of 0.0 cancels the look at.
llLoopSound(string sound, flaot volume);
Similar to llPlaySound, this function plays a sound attached to an
object, but will continuously loop that sound
until llStopSound or llPlaySound is called. Only one sound may be
attached to an object at a time. A second call
to llLoopSound with the same key will not restart the sound, but the
new volume will be used. This allows
control over the volume of already playing sounds. Setting the
volumeto 0 is not the same as calling
llStopSound; a sound with 0 volume will continue to loop.
To restart the sound from the beginning, call
llStopSound before calling llLoopSound again.
llLoopSoundMaster(string sound, flaot volume);
Behaviour is identical to llLoopSound, with the addition of marking
the source as a "Sync Master", causing
"Slave" sounds to sync to it. If there are multiple masters within
a viewers interest area, the most audible one (a
function of both distance and volume) will win out as the master.
The use of multiple masters within a small area
is unlikely to produce the desired effect.
llLoopSoundSlave(string sound, flaot volume);
Behaviour is identical to llLoopSound,
unless there is a "Sync Master" present. If a Sync Master is already
playing the Slave sound will begin playing from the same point
the master is in its loop syncronizing the loop
points of both sounds. If a Sync Master is started when the Slave
is already playing, the Slave will skip to the
correct position to sync with the Master.
llMakeExplosion(integer particles, float scale, float velocity, float lifetime,float arc, string texture, vector offset);
Make a round explosion of particles using texture from the objects inventory.
llMakeFire(integer particles, float scale, float velocity, float lifetime, float arc, string texture, vector offset);
Make fire particles using texturefrom the objects inventory.
llMakeFountain(integer particles, float scale, float velocity, float lifetime, float arc, string texture, vector offset);
Make a fountain of particles using texturefrom the objects inventory.
llMakeSmoke(integer particles, float scale, float velocity, float lifetime, float arc, string texture, vector offset);
Make smoky particles using texturefrom the objects inventory.
llMessageLinked(integer linknum, integer num, string str, key id);
Sends num, str, and id to members of the link set.
The linknumparameter is either the linked number
available through llGetLinkNumber or a link constant.
llMinEventDelay(float delay);
Set the minimum time between events being handled.
llModifyLand(integer action, integer size);
Modify land with action on size area.
The parameters can be chosen from the land constants.
LAND_LEVEL, LAND_RAISE, LAND_LOWER, LAND_SMOOTH, LAND_NOISE or LAND_REVERT
LAND_SMALL_BRUSH, LAND_MEDIUM_BRUSH or LAND_LARGE_BRUSH
llMoveToTarget(vector target, float tau);
Critically damp to position targetin tau-seconds if the
script is physical. Good tau-values are greater than 0.2.
A tau of 0.0 stops the critical damping.
llOffsetTexture(float offset_s, float offset_t, integer face);
Sets the texture s and t offsets of face.
If faceis ALL_SIDES this function sets the texture offsets for
all faces.
integer llOverMyLand(key id);
Returns TRUE if id is over land owned by the object owner,
FALSE otherwise.
list llParseString2List(string src, list separators, list spacers);
Breaks src into a list, discarding anything in separators,
keeping any entry in spacers. The
separators and spacers must be lists of strings with a maximum
of 8 entries each. So, if you had made the
call:
llParseString2List("Parsethisnow! I dare:you to.", ["this", "!", " "], [":"]);
You would get the list:
["Parse", "now", "I", "dare", ":", "you", "to"]
llParticleSystem(list parameters);
Makes a particle system based on the parameter list.
The parametersare specified as an ordered list of
parameter and value. Valid parameters and their expected
values can be found in the particle system constants.
Here is a simple example:
llParticleSystem([PSYS_PART_FLAGS, PSYS_PART_WIND_MASK,
PSYS_PART_START_COLOR, <1,0,0>,
PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE]);
llPassCollisions(integer pass);
If passis TRUE, land and object collisions are passed from
children on to parents.
llPassTouches(integer pass);
If passis TRUE, touches are passed from children on to parents.
llPlaySound(string sound, float volume);
Plays a sound once. The sound will be attached to an object and
follow object movement. Only one sound may
be attached to an object at a time, and attaching a new sound or
calling llStopSound will stop the previously
attached sound. A second call to llPlaySound with the same sound
will not restart the sound, but the new
volume will be used, which allows control over the volume
of already playing sounds. To restart the sound from
the beginning, call llStopSound before calling llPlaySound again.
llPlaySoundSlave(string sound, float volume);
Behaviour is identical to llPlaySound, unless there is
a "Sync Master" present. If a Sync Master is already
playing the Slave sound will not be played until the Master
hits its loop point and returns to the beginning.
llPlaySoundSlave will play the sound exactly once; if it is
desired to have the sound play every time the Master
loops, either use llLoopSoundSlave with extra silence padded
on the end of the sound or ensure that
llPlaySoundSlave is called at least once per loop of the Master.
llPointAt(vector pos);
Make avatar that owns object point at pos.
llPow(float base, float exp);
Returns baseraised to the exp.
llPreloadSound(string sound);
Preloads sound from object inventory on nearby viewers.
llPushObject(key id, vector impulse, vector angular_impulse, integer local);
Applies impulseand angular_impulseto object id.
llReleaseControls(key avatar);
Stop taking inputs from avatar.
llRemoteLoadScript(key target, string name, integer running, integer param);
If the owner of the object this script is attached can modify target
and the objects are in the same region, copy
script nameonto target, if running == TRUE, start the script with param.
If namealready exists on target, it is replaced.
llRemoveInventory(string inventory);
Remve the name inventory item from the object inventory.
llRemoveVehicleFlags(integer flags);
Sets the vehicle flagsto FALSE. Valid parameters can be found in the vehicle flags constants section.
key llRequestAgentData(key id, integer data);
This function requests data about agent id. If and when the information
is collected, the dataserver event is
called with the returned key returned from this function passed in
the requested parameter. See the agent data
constants for details about valid values of dataand what each will
return in the dataserver event.
key llRequestInventoryData(string name);
Requests data from object inventory item name. When data is available
the dataserver event will be raised with
the key returned from this function in the requested parameter.
The only request currently implemented is to
request data from landmarks, where the data returned is in the
form "<float, float, float>" which can be cast to a
vector. This position is in region local coordinates.
llRequestPermissions(key avatar, iteger perm);
Ask avatar to allow the script to do perm. The permparameter should
be a permission constant. Multiple
permissions can be requested simultaneously by oring the
constants together. Many of the permissions requests
can only go to object owner. This call will not stop script
execution -if the specified avatar grants the requested
permissions, the run_time_permissions event will be called.
llResetScript(void);
Resets this script.
llResetOtherScript(string name);
Resets the script name.
llResetTime(void);
Sets the internal timer to zero.
llRezObject(string inventory, vector pos, vector vel, rotation rot, integer param);
Creates objects inventory object at position poswith velocity
veland rotation rot. The paramvalue
will be available to the newly created object in the on_rez
event or through the llGetStartParameter library
function. The velparameter is ignored if the rezzed object
is not physical.
float llRot2Angle(rotation rot);
Returns the rotation angle represented by rot.
vector llRot2Axis(rotation rot);
Returns the rotation axis represented by rot.
vector llRot2Euler(rotation rot);
Returns the Euler Angle representation of rot.
vector llRot2Fwd(rotation rot);
Returns the forward axis represented by rot.
vector llRot2Left(rotation rot);
Returns the left axis represented by rot.
vector llRot2Up(rotation rot);
Returns the up axis represented by rot.
rotation llRotBetween(vector a, vector b);
Returns the rotation needed to rotate ato b.
llRotLookAt(rotation rot, float strength, float damping);
Cause object to rotate to rot. Good strengthvalues are around
half the mass of the object and good
damping values are less than 1/10th of the strength.
Asymmetrical shapes require smaller damping.A
strengthof 0.0 cancels the look at.
integer llRotTarget(rotation rot, float error);
Set object rotation within error of rotationas a rotational
target and return an integer number for the
target. The number can be used in llRotTargetRemove.
llRotTargetRemove(integer number);
Remove rotational target number.
llRotateTexture(float radians, integer face);
Sets the texture rotation of faceto radians.
If faceALL_SIDES, rotate the texture of all faces.
integer llRound(float val);
returns valrounded to the nearest integer.
integer llSameGroup(key id);
Returns TRUE if the object or agen id is in the same simulator
and has the same active group as this object.
Otherwise, returns FALSE.
llRegionSay(integer channel, string text);
Says the string text on channel number channel that can be heard
anywhere in the region by a script listening on channel.
Any integer value other than zero
Message to be transmitted
llSay(integer channel, string text);
Say text on channel. Channel 0 is the public chat channel that all
avatars see as chat text. Channels 1 to 2,147,483,648 are private
channels that are not sent to avatars but other scripts can listen
for through the llListen api.
Channel to use to say text on
Text to say
llScaleTexture(float horizontal, float vertical, integer side);
Sets the horizontal and vertical repeats per face on side.
If side == ALL_SIDES, all sides are set in one call.
Negative values for horizontal and vertical will flip the texture.
integer llScriptDanger(vector pos);
Returns true if pos is over public land, land that doesnt allow everyone
to edit and build, or land that doesnt allow outside scripts.
llSensor(string name, key id, integer type, float range, float arc);
Performs a single scan for nameand id with typewithin
rangemeters and arcradians of forward vector.
Specifying a blank name or NULL_KEY id will not filter
results for any particular name or id A range of 0.0
does not perform a scan. The typeparameter should be an
object type constant vlaue.
llSensorRemove(void);
Removes the sensor.
llSensorRepeat(string name, key id, integer type, float range, float arc, float rate);
Performs a repeating sensor scan for name and id with type
(AGENT, ACTIVE, PASSIVE, and/or SCRIPTED) within range meters and arc
radians of forward vector (name and/or id can be empty or 0).
A range of 0.0m does perform a scan. The parameters have the same
function as llSensor, except rate, which defines the number of
seconds between repeated sensor or no_sensor event calls.
llSetAlpha(float alpha, integer face);
Sets the alpha value for face. If face is ALL_SIDES,
set the alpha to all faces. The alphavalue is interpreted
as an opacity percentage -1.0 is fully opaque, and 0.2 is
mostly transparent. This api will clamp alphavalues
less 0.1 to .1 and greater than 1.0 to 1.
llSetBuoyancy(float buoyancy);
Set the object buoyancy. A value of 0 is none,
less than 1.0 sinks, 1.0 floats, and greater than 1.0 rises.
llSetCameraAtOffset(vector offset);
Sets the camera at offset used in this object
if an avatar sits on it.
llSetCameraEyeOffset(vector offset);
Sets the camera eye offset used in this object if an avatar sits on it.
llSetColor(vector color, integer face);
Sets the color of face. If face is ALL_SIDES, set the color to all faces.
llSetDamage(float damage);
Sets the amount of damage that will be done to an object
that this object hits. This object will be destoyed on
damaging another object.
llSetForce(vector force, integer local);
If the object is physical, this function sets the force.
The vector is in loal coordinates if local is TRUE, global if
FALSE.
llSetForceAndTorque(vector force, vector torque, integer local);
If the object is physical, this function sets the forceand
torque. The vectors are in loal coordinates if local is
TRUE, global if FALSE.
llSetHoverHeight(float height, float water, float tau);
Critically damps to a height. The height is above ground
and water if water is TRUE.
llSetLinkColor(integer linknumber, vector color, integer face);
Sets the color of the linked child specified by linknumber.
A value of 0 means no link, 1 the root, 2 for first
child, etc. If linknumber is ALL_SIDES, set the color
of all objects in the linked set. If faceis
ALL_SIDES, set the color of all faces.
llSetObjectName(string name);
Sets the object name to name.
llSetPos(vector pos);
If the object is not physical, this function sets the position
in region coordinates. If the object is a child, the
position is treated as root relative and the linked set is adjusted.
llSetRot(rotation rot);
If the object is not physical, this function sets the rotation.
If the object is a child, the position is treated as root
relative and the linked set is adjusted.
llSetScale(vector scale);
Sets the object scale.
llSetScriptState(string name, integer run);
Control the state of a script on the object.
llSetSitText(string text);
Displays textrather than sit in viewer pie menu.
llSetSoundQueueing(integer queue);
Sets whether successive calls to llPlaySound, llLoopSound,
etc., (attached sounds) interrupt the playing sound.
The default for objects is FALSE. Setting this value to
TRUE will make the sound wait until the current playing
sound reaches its end. The queue is one level deep.
llSetStatus(integer status, integer value);
Sets the statusto value. Use status constants for the values of status.
llSetText(string text, vector color, float alpha);
Sets text that floats above object to text,
using the specified color and alpha.
llSetTexture(string texture, integer face);
Sets the texturefrom object inventory of face.
If face is ALL_SIDES, set the texture to all faces.
llSetTextureAnim(integer mode, integer face, integer sizex, integer sizey, float start, float length, float rate);
Animates a texture by setting the texture scale and offset.
The mode is a mask of texture animation constants.
You can only have one texture animation on an object,
calling llSetTextureAnim more than once on an object
will reset it.
You can only do one traditional animation, ROTATE or SCALE
at a time, you cannot combine masks. In the case
of ROTATE or SCALE, sizex and sizey are ignored, and startand
lengthare used as the start and
length values of the animation. For rotation, startand lengthare
in radians.
The facespecified which face to animate. If faceis ALL_SIDES,
all textures on the object are animated.
The sizex and sizey describe the layout of the frames within
the texture. sizex specifies how many
horizontal frames and sizey is how many vertical frames.
startis the frame number to begin the animation on. Frames
are numbered from left to right, top to bottom,
starting at 0.
lengthis the number of frames to animate. 0 means to animate
all frames after the start frame.
rateis the frame rate to animate at. 1.0 means 1 frame per
second, 10.0 means 10 frames per second, etc.
llSetTimerEvent(float sec);
Sets the timer event to be triggered every secseconds.
Passing in 0.0 stops further timer events.
llSetTorque(vector torque, integer local);
If the object is physical, this function sets the torque.
The vector is in loal coordinates if local is TRUE, global
if FALSE.
llSetTouchText(string text);
Displays textin viewer pie menu that acts as a touch.
llSetVehicleFlags(integer flags);
Sets the vehicle flagsto TRUE.
Valid parameters can be found in the vehicle flags constants section.
llSetVehicleFloatParam(integer param_name, float param_value);
Sets the vehicle floating point parameter param_nameto param_value.
Valid parameters and their expected
values can be found in the vehicle parameter constants section.
llSetVehicleType(integer type);
Activates the vehicle action and choose vehicle type.
Valid types and an explination of their characteristeics
can be found in the vehicle type constants section.
llSetVehicleRotationParam(integer param_name, rotation param_value);
Sets the vehicle rotation parameter param_nameto param_value.
Valid parameters can be found in the
vehicle parameter constants section.
llSetVehicleVectorParam(integer param_name, vector param_value);
Sets the vehicle vector parameter param_nameto param_value.
Valid parameters can be found in the
vehicle paramter constants section.
llShout(integer channel, string text);
Shout texton channel. Channel 0 is the public chat channel that
all avatars see as chat text. Channels 1 to
2,147,483,648 are private channels that are not sent to
avatars but other scripts can listen for through the llListen api.
float llSin(float theta);
Returns the sine of thetain radians.
llSitTarget(vector offset, rotation rot);
Set the sit location for this object. If offset == ZERO_VECTOR
clear the sit target.
llSleep(float sec);
Puts the script to sleep for secseconds.
float llSqrt(float val);
Returns the square root of val. If valis less than 0.0,
this function returns 0.0 and raises a math runtime error.
llStartAnimation(string anim);
This function starts animation anim for the avatar that owns the object.
llStopAnimation(string anim);
Stop animation animfor avatar that owns object.
llStopHover(void);
Stop hover to a height.
llStopLookAt(void);
Stop causing object to look at target.
llStopMoveToTarget(void);
Stops critically damped motion.
llStopPointAt(void);
Stop avatar that owns object pointing.
llStopSound(void);
Stops a currently playing attached sound started with
llPlaySound or llLoopSound. Has no effect on sounds
started with llTriggerSound.
integer llStringLength(string src);
Returns the number of characters in src.
integer llSubStringIndex(string source, string pattern);
Finds index in source where pattern first appears.
Returns -1 if no match is found found.
llTakeControls(integer controls, integer accept, integer pass_on);
If (accept== (controls and input)), send input to object.
If the boolean pass_onis TRUE, also send input
to avatar.
float llTan(float theta);
Returns the tangent of thetaradians.
integer llTarget(vector position, float range);
Set object position within rangeof positionas a target
and returns an integer ID for the target.
llTargetOmega(vector axis, float spinrate, float gain);
Attempt to spin at spinratewith strength gainon axis.
A spinrateof 0.0 cancels the spin. This
function always works in object local coordinates.
llTargetRemove(integer tnumber);
Remove target number tnumber.
llTeleportAgentHome(key id);
Teleport agent on the owners land to agents home location.
string llToLower(string src);
Returns src in all lower case.
string llToUpper(string src);
Returns src in all upper case.
llTriggerSound(string sound, float volume);
Plays a transient sound NOT attached to an object.
The sound plays from a stationary position located at the
center of the object at the time of the trigger.
There is no limit to the number of triggered sounds which can be
generated by an object, and calling llTriggerSound does not affect
the attached sounds created by llPlaySound
and llLoopSound. This is very useful for things like collision noises,
explosions, etc. There is no way to stop or
alter the volume of a sound triggered by this function.
llTriggerSoundLimited(string sound, float volume, vector tne, vector bsw);
Plays a transient sound NOT attached to an object with its
audible range limited by the axis aligned bounding
box define by tne(top-north-eash) and bsw (bottom-south-west).
The sound plays from a stationary position
located at the center of the object at the time of the trigger.
There is no limit to the number of triggered sounds
which can be generated by an object, and calling llTriggerSound
does not affect the attached sounds created by
llPlaySound and llLoopSound. This is very useful for things
like collision noises, explosions, etc. There is no
way to stop or alter the volume of a sound triggered by this function.
llUnSit(key id);
If agent identified by id is sitting on the object the script
is attached to or is over land owned by the objects
owner, the agent is forced to stand up.
float llVecDist(vector a, vector b);
Returns the distance from ato b
float llVecMag(vector vec);
Returns the magnitude of vec.
vector llVecNorm(vector vec);
Returns normalized vec.
llVolumeDetect(integer detect);
When detect = TRUE, this makes the entire link set the script
is attached to phantom but if another object
interpenetrates it, it will get a collision_start event.
When an object stops interpenetrating, a collision_end event
is generated. While the other is interpenetrating,
collision events are NOT generated. The script must be applied
to the root object of the link set to get the collision events.
Collision filters work normally.
float llWater(vector offset);
Returns the water height at the object position + offset.
llWhisper(integer channel, string text);
Whisper texton channel. Channel 0 is the public chat channel that
all avatars see as chat text. Channels 1 to 2,147,483,648 are
private channels that are not sent to avatars but other scripts
can listen for through the llListen api.
vector llWind(vector offset);
Returns the wind velocity below the object position + offset.
llAddToLandBanList(key agent, float hours);
Adds agent to the parcel ban list for the specified number of hours.
A value of 0 for hours will add agent indefinitely.
The smallest value hours will accept is 0.01;
anything smaller will be seen as 0.
When values that small are used, it seems the function bans
in 30 second increments (Probably 36 second increments,
as 0.01 of an hour is 36 seconds).
Residents teleporting to a parcel where they are banned
will be redirected to a neighboring parcel.
integer llBase64ToInteger(string str);
Little endian decode the 8 character Base64 string str into an integer.
string llBase64ToString(string str);
Converts a Base 64 string to a conventional string.
If the conversion creates any unprintable characters, they are converted to question marks (this behavior is different then llUnescapeURL).
llClearCameraParams();
Resets all camera parameters to default values and turns
off scripted camera control.
llCloseRemoteDataChannel(key channel);
Closes XML-RPC channel.
integer llDetectedGroup(integer number);
Returns TRUE if detected object or agent number has the same
user group active as this object.
It will return FALSE if the object or agent is in the group,
but the group is not active.
string llEscapeURL(string url);
Returns the string that is the URL-escaped version of url
(replacing spaces with %20, etc).
This function returns the UTF-8 encoded escape codes
for selected characters.
llForceMouselook(integer mouselook);
After calling this function with mouselook set to TRUE,
any agent sitting down on the prim will be forced into mouselook.
Just like llSitTarget, this changes a permanent property
of the prim (not the object) and needs to be reset by calling
this function with mouselook set to FALSE in order to disable it.
list llGetAnimationList(key id);
Returns a list of keys of all playing animations for avatar id.
list llGetBoundingBox(key object);
Returns the bounding box around the object or avatar with
the key object (including any linked prims) relative to the
root prim, in a list: [ (vector) min_corner, (vector) max_corner ]
vector llGetCameraPos();
Returns the position of the camera of the user that granted the
script PERMISSION_TRACK_CAMERA. If no user has granted the permission,
it returns ZERO_VECTOR.
rotation llGetCameraRot();
Returns the rotation of the camera of the user who's granted
this script PERMISSION_TRACK_CAMERA. If no user has granted the
permission, it returns ZERO_ROTATION. The key of the user whose
camera is being tracked can be obtained using llGetPermissionsKey.
key llGetCreator();
Returns the key of the object's original creator. Similar to llGetOwner.
vector llGetGeometricCenter();
Returns the geometric center of the linked set the
script is in relative to the object's position
(the position of the root prim of a linked set).
To get the object's position, use llGetPos.
float llGetGMTclock();
Gets the time in seconds since midnight in GMT/UTC.
key llGetInventoryCreator(string item);
This function returns the UUID of the creator of item.
If item is not found in inventory,
the object says "No item named 'name' ".
integer llGetInventoryPermMask(string item, integer mask);
Returns the requested permission mask for the inventory
item defined by item. If item is not in the object's inventory,
llGetInventoryPermMask returns 0 and causes the object to
say "No item named '<item>'", where "<item>" is item.
If this is used to determine whether or not an inventory item
exists within the object, it will have the side effect of spamming chat.
inventory item
MASK_BASE, MASK_OWNER,MASK_GROUP, MASK_EVERYONE or MASK_NEXT
integer llGetInventoryType(string name);
Returns the type of the inventory item name.
Remember, like the other inventory functions, llGetInventoryType
is case-sensitive.
float llGetMass();
Returns the scripted object's mass. When called from a script
in a linkset, the parent will return the sum of the linkset weights,
while a child will return just its own mass. When called from
a script inside an attachment, this function will return the mass
of the avatar it's attached to, not its own.
key llGetNumberOfNotecardLines(string name);
Returns number of lines in the notecard name via the dataserver event.
(Cast the value returned by the dataserver to an integer.)
The key returned is a query id for identifying the dataserver reply.
integer llGetNumberOfPrims();
Returns the number of prims in (and avatars seated on)
the object the script is in.
string llGetObjectDesc();
Returns the description of the scripted object/prim.
You can set the description using llSetObjectDesc.
float llGetObjectMass(key id);
Gets the mass of the object or avatar corresponding to id.
integer llGetObjectPermMask(integer mask);
Returns the requested permission mask for the root object
the task is attached to.
integer llGetParcelFlags(vector pos);
Returns a bitfield specifying the parcel flags
(PARCEL_FLAG_*) for the parcel under the position pos.
list llGetPrimitiveParams(list params);
Returns primitive parameters specified in the params list.
vector llGetRegionCorner();
Returns the RegionCorner of the simulator containing the task.
integer llGetRegionFlags();
Returns a bitfield specifying the region flags
(REGION_FLAG_*) for the region the object is in.
vector llGetRootPosition();
Gets the position (in region coordinates)
of the root/parent prim of the object containing the script.
This is used to allow a child prim to determine where the root is.
rotation llGetRootRotation();
Gets the global rotation of the root object of the
object script is attached to.
string llGetSimulatorHostname();
Returns the host name (server) of the sim
in which the scripted object is located.
For example, "sim225.agni.lindenlab.com".
string llGetTimestamp();
Returns the current time-and-date (a timestamp)
in the format YYYY-MM-DDThh:mm:ss.ff..fZ,
for example: 2004-08-27T00:56:21.785886Z
The letter Z stands for Zulu,
the military time zone name for UTC. T is just
a separator between date and time.
integer llGetUnixTime();
Returns the number of seconds elapsed since 00:00 hours,
Jan 1, 1970 UTC from the system clock.
In UNIX terms, time_t. This is great for a monotonic
source of time that ticks once a second.
key llHTTPRequest(string url, list parameters, string body);
Sends HTTP request to url with the specified body and parameters.
url must always be a valid HTTP or HTTPS URL, pointing to a
location outside the Linden Lab and Second Life servers.
string llIntegerToBase64(integer number);
Encodes number as an 8-character Base64 string.
list llListReplaceList(list dest, list src, integer start, integer end);
Returns a list replacing the slice of the list dest from
start to end with the list src. start and end are inclusive,
so 0, 1 would replace the first two entries
and 0, 0 would replace only the first list entry.
float llListStatistics(integer operation, list input);
This function allows a script to perform a statistical
operation as defined by operation on a list composed
of integers and floats.
One of LIST_STAT_* values
llLoadURL(key avatar_id, string message, string url);
llLoadURL displays a dialog box to the user offering
to load a web page using the default web browser.
float llLog(float val);
Returns the base e (natural) logarithm of val (value).
float llLog10(float val);
Returns the base 10 (common) logarithm of val (value).
llMapDestination(string simname, vector position, vector lookat);
Shows a given location on the map.
Works in attachments, or during touch events.
Currently the function will open the map window whenever it is called.
There is no way to simply set the map position without
opening the window.
string llMD5String(string src, integer nonce);
Performs a RSA Data Security, Inc. MD5 Message-Digest
Algorithm on string with nonce (also known as salt).
Returns a 32-character hex string. (128-bit in binary.)
integer llModPow(integer a, integer b, integer c);
Returns a raised to the b power, mod c. ( (a ^ b)%c ).
b is capped at 0xFFFF (16 bits).
llOpenRemoteDataChannel();
Creates a channel to listen for XML-RPC calls.
Will trigger a remote_data event with type = REMOTE_DATA_CHANNEL
and a channel ID (key) once it is available.
This channel ID must be referenced in the XML-RPC call
to the script (from the outside internet)--
so the key must somehow get to the scripter's XML-RPC client,
most often via llEmail, llHttpRequest or llLoadUrl.
llOwnerSay(string message);
Says message to only the owner of the object running the script
if the owner has been within the object's simulator since
logging into Second Life, regardless of where they may be are in-world.
llParcelMediaCommandList(list command_list);
Playing QuickTime movies (you have to own the land).
list llParcelMediaQuery(list query_list);
Queries the texture and/or URL for QuickTime-playable
video on the land parcel.
This function will only work if the script is contained
within an object owned by the landowner (or if the land
is owned by a group, only if the object has been deeded
to the group). It will not work for group land if the
object owner is a member of the group. The object
actually has to be owned by the group.
list llParseStringKeepNulls(string src, list separators, list spacers);
llParseStringKeepNulls works almost exactly the same as
llParseString2List, except that if a null is found
it will add a null string instead of discarding it
like llParseString2List does.
llReleaseCamera(key agent);
A FollowCam function that returns the camera to the
key agent after permission to change it with
llSetCameraParams has been granted via
llRequestPermissions(agent_key, PERMISSION_CONTROL_CAMERA).
llRemoteDataReply(key channel, key message_id, string sdata, integer idata);
Send an XML-RPC reply to the request with message_id
on channel with payload of string sdata and integer idata.
The size of sdata is limited to 254 characters.
llRemoteDataSetRegion();
does not work!
llRemoteLoadScriptPin(key target, string name, integer pin, integer running, integer start_param);
If the owner of the object containing this script can modify
the object identified by the key target, and if the pin matches
the PIN previously set using llSetRemoteScriptAccessPin
(on the target prim), then the script name will be copied into target.
llRemoveFromLandBanList(key avatar);
Remove avatar from the land parcel ban list.
llRemoveFromLandPassList(key avatar);
Remove avatar from the land parcel pass list.
llResetLandBanList(void)
Removes all residents from the land ban list.
llResetLandPassList(void)
Removes all residents from the land access/pass list.
key llRequestSimulatorData(string simulator, integer data);
Requests data about the sim with the name simulator.
simulator is case-insensitive.
Returns a dataserver query ID and triggers the dataserver
event when data is found. The sim name is usually not case-sensitive,
but sometimes will return data for a similarly-named sim
if the supplied case doesn't match the intended sim's actual name.
llRezAtRoot(string inventory, vector pos, vector vel, rotation rot, integer param);
Rezzes object's inventory item named inventory at
pos with velocity vel and rotation rot with start parameter param.
key llSendRemoteData(key channel, string dest, integer idata, string sdata);
Send an XML-RPC request to dest (probably an URL)
through channel with payload of channel (in a string),
integer idata and string sdata.
llSetCameraParams(list rules);
Sets multiple camera parameters at once.
List format is [rule1, value1, rule2, value2 . . . ruleN, valueN]
llSetLinkAlpha(integer linknumber, float alpha, integer face);
Sets the side number face on the linked child linknumber
to the transparency alpha.
llSetLocalRot(rotation rot);
Sets the rotation of a child prim relative to the root prim.
llSetObjectDesc(string name);
Sets the description of the scripted prim to name.
You can get the description using llGetObjectDesc.
The description is limited to 127 characters.
llSetParcelMusicURL(string url)
Sets the streaming audio URL for the parcel the
scripted object is on (the object must be owned
by the owner of the parcel, if the parcel is group
owned the object must be owned by that group).
llSetPayPrice(integer price, list quick_pay_buttons);
Sets the values of the buttons and the text box default
for the Pay dialog -- when a user right-clicks on
the object and selects "Pay", llSetPayPrice will affect
what buttons exist, what their values are, and whether
or not there is a manual payment text entry box.
llSetPrimitiveParams(list rule);
This function changes the many properties (or "parameters")
of a prim in one operation. The parameter is a list of changes.
(Don't confuse prim parameters with function parameters.)
llSetRemoteScriptAccessPin(integer pin);
If pin is set to a non-zero number, the task will accept
remote script loads via llRemoteLoadScriptPin
if passed the matching PIN.
Otherwise llRemoteLoadScriptPin is ignored
string llStringToBase64(string str);
Converts a string to the Base 64 representation of the string.
string llUnescapeURL(string url);
Returns the string that is the URL unescaped version
of url, replacing "%20" with spaces, etc.
The function can output raw UTF-8 strings.
string llXorBase64StringsCorrect(string s1, string s2)
Performs an xor on two Base64 strings and returns a Base64 string.
s2 repeats if it is shorter than s1.
This function is for encrypting data. Put your data in s1 and
your key in s2 to encrypt or put the encrypted data into s1
with the same key in s2 to decrypt again.
llSetInventoryPermMask(string item, integer mask, integer value);
Sets the given permission mask to the new value on the inventory item.
llSetObjectPermMask(integer mask, integer value);
Sets the given permission mask to the new value on the root object
the task is attached to.
llSetSoundRadius(float radius);
Establishes a hard cut-off radius for audibility of scripted
sounds (both attached and triggered)
llTakeCamera(key avatar);
Move avatar's viewpoint to task
list llGetObjectDetails(key id, list params);
Returns a list of the details specified in params for the object with key id.
prim or avatar UUID that is in the same region
list of OBJECT_* flags
llSetClickAction(integer action);
Sets the action performed when a prim is clicked upon.
a CLICK_ACTION_* flag
integer llGetRegionAgentCount();
Returns an integer that is the number of avatars in the region.
llTextBox( key avatar, string message, integer chat_channel );
*** Pre-release Documentation Warning ***
Shows a dialog box on avatar's screen with the text message.
It contains a text box for input, any text that is entered
is said on chat_channel when the "OK" button is clicked.
string llGetAgentLanguage( key avatar );
Returns a string that is the language code of the preferred
interface language of the user avatar.
vector llDetectedTouchUV( integer index );
Returns a vector that is the texture coordinates for where
the prim was touched. The x and y vector positions contain
the u and v face coordinates respectively.
TOUCH_INVALID_TEXCOORD is returned
when the touch UV coordinates cannot be determined.
Index of detection information
integer llDetectedTouchFace( integer index );
Returns an integer that is the index of the face the avatar clicked on.
Index of detection information
vector llDetectedTouchPos( integer index );
Returns a vector that is the position where the object
was touched in region coordinates, unless it is attached to
the HUD, in which case it returns the position relative
to the attach point.
Index of detection information
vector llDetectedTouchNormal( integer index );
Returns a vector that is the surface normal
(perpendicular to the surface) where the touch event was triggered.
Index of detection information
vector llDetectedTouchBinormal( integer index );
Returns a vector that is the surface binormal
(tangent to the surface) where the touch event was triggered.
Index of detection information
vector llDetectedTouchST( integer index );
Returns a vector that is the surface coordinates for where the prim was touched.
The x and y vector positions contain the horizontal (s) and vertical (t) face
coordinates respectively.
Each component is in the interval [0.0, 1.0].
TOUCH_INVALID_TEXCOORD is returned when the surface coordinates cannot be determined.
Index of detection information
string llSHA1String( string src );
*** Pre-release Documentation Warning ***
Returns a string of 40 hex characters that is the SHA1 security hash of src.
integer llGetFreeURLs( );
key llRequestURL( );
key llRequestSecureURL( );
llReleaseURL( string url );
llHTTPResponse( key request_id, integer status, string body );
llHTTPResponse( key request_id, integer status, string body );
Every state must have at least one handler. You can choose to
handle an event by defining one of the the reserved
event handlers named here.
at_target(integer tnum, vector targetpos, vector ourpos);
This event handler is triggered when the scripted object comes within
a defined range of the target position targetpos
(defined by the llTarget function call).
at_rot_target(integer number, rotation target_rotation, rotation our_rotation);
This event is triggered when a script comes within a defined
angle of a target rotation. The range is set by a call
to llRotTarget.
not_at_rot_target(void);
When a target is set via the llRotTarget library call,
but the script is outside the specified angle this event is raised.
not_at_target(void);
When a target is set via the llTarget library call,
but the script is outside the specified range this event is raised.
attach(key attached);
This event is triggered whenever a object with this script is
attached or detached from an avatar. If it is attached,
attached is the key of the avatar it is attached to, otherwise
attached is NULL_KEY.
changed(integer change);
Triggered when various events change the object. The change
argument will be a bitfield of change constants.
collision(integer total_number);
This event is raised while another object is colliding with
the object the script is attached to. The number of
detected objects is passed to the script. Information on
those objects may be gathered via the llDetected* library
functions.
(Collisions are also generated if a user walks into an object.)
collision_end(integer total_number);
This event is raised when another object stops colliding with
the object the script is attached to. The number of
detected objects is passed to the script. Information on those
objects may be gathered via the llDetected* library
functions.
(Collisions are also generated if a user walks into an object.)
collision_start(integer total_number);
This event is raised when another object begins to collide with
the object the script is attached to. The number of
detected objects is passed to the script. Information on
those objects may be gathered via the llDetected* library
functions.
(Collisions are also generated if a user walks into an object.)
control(key name, integer levels, integer edges);
Once a script has the ability to grab control inputs from the avatar,
this event will be used to pass the commands
into the script. The levelsand edgesare bitfields
of control constsants.
dataserver(key requested, string data);
This event is triggered when the requested data is returned
to the script. Data may be requested by the
llRequestAgentData, the llRequestInventoryData,
and the llGetNotecardLine function calls.
email(string time, string address, string subject, string body, integer remaining);
This event is triggered when an email sent to this script arrives.
The remaining tells how many more emails are known as still pending.
land_collision(vector position);
This event is raised when the object the script is attached
to is colliding with the ground.
land_collision_end(vector position);
This event is raised when the object the script is attached
to stops colliding with the ground.
land_collision_start(vector position);
This event is raised when the object the script is attached
to begins to collide with the ground.
link_message(integer sender_number, integer number, string message, key id);
Triggered when object receives a link message via llMessageLinked
library function call.
listen(integer channel, string name, key id, string message);
This event is raised whenever a chat message matching the
constraints passed in the llListen command is heard.
The nameand id of the speaker as well as the messageare passed
in as parameters. Channel 0 is the public
chat channel that all avatars see as chat text.
Channels 1 through 2,147,483,648 are private channels that are not
sent to avatars but other scripts can listen on those channels.
money(key giver, integer amount);
This event is triggered when user giver has given an amount
of Linden dollars to the object.
moving_end(void);
Triggered whenever a object with this script stops moving.
moving_start(void);
Triggered whenever a object with this script starts moving.
no_sensor(void);
This event is raised when sensors are active
(via the llSensor library call) but are not sensing anything.
object_rez(key id);
Triggered when object rez-es in another object from its
inventory via the llRezObject api. The id is the globally
unique key for the object.
on_rez(integer start_param);
Triggered whenever a object is rez-ed from inventory
or by another object. The start_paramis the parameter
passed in from the call to llRezObject.
run_time_permissions(integer permissions);
Scripts need permission from either the owner or the avatar
they wish to act on before they perform certain
functions, such as debiting money from their owners account,
triggering an animation on an avatar, or capturing
control inputs. The llRequestPermissions library
function is used to request these permissions and the various
permissions integer constants can be supplied.
The integer returned to this event handler contains the current set
of permissions flags, so if permissionseqal 0 then no permissions are set.
sensor(integer total_number);
This event is raised whenever objects matching the constraints
of the llSensor command are detected.
The number of detected objects is passed to the script
in the total_number parameter. Information on those
objects may be gathered via the llDetected* library functions.
state_entry(void);
The state_entry event occurs whenever a new state is entered,
including program start, and is always the first event handled.
state_exit(void);
The state_exit event occurs whenever the state command
is used to transition to another state. It is handled
before the new states state_entry event.
timer(void);
This event is raised at regular intervals set by the
llSetTimerEvent library function.
touch(integer total_number);
This event is raised while a user is touching the object
the script is attached to. The number of touching objects is
passed to the script in the total_number parameter.
Information on those objects may be gathered via the
llDetected* library functions.
touch_end(integer total_number);
This event is raised when a user stops touching the object
the script is attached to. The number of touching
objects is passed to the script in the total_number parameter.
Information on those objects may be gathered
via the llDetected* library functions.
touch_start(integer total_number);
This event is raised when a user first touches the object the script is
attached to. The number of touching objects is passed to the script in
the total_number parameter. Information on those objects may be gathered
via the llDetected() library functions.
http_response(key request_id, integer status, list metadata, string body);
This event handler is invoked when an HTTP response is received for
a pending llHTTPRequest request or if a pending request fails or times out.
remote_data(integer event_type, key channel, key message_id, string sender, integer idata, string sdata);
Triggered by various XML-RPC calls with event_type specifying the type of data.
To ease scripting, many useful constants are defined by LSL.
The boolean constants represent the values for TRUE and FALSE.
LSL represents booleans as integer values 1
and 0 respectively. Since there is no boolean type these
constants act as a scripting aid usually employed for
testing variables which conceptually represent boolean values.
An integer constant for boolean comparisons. Has the value '1'.
An integer constant for boolean comparisons. Has the value '0'.
The status constants are used in the llSetStatus and llGetStatus
library calls. These constants can be bitwise ored
together when calling the library functions to set the same
value to more than one status flag
Status Constants
Controls whether the object moves physically.
This controls the same flag that the ui checkbox for
Physical controls. The default is FALSE.
Controls whether the object collides or not.
Setting the value to TRUE makes the object non-colliding with
all objects. It is a good idea to use this for most objects
that move or rotate, but are non-physical. It is also
useful for simulating volumetric lighting. The default is FALSE.
Controls whether the object can physically rotate around
the specific axis or not. This flag has no meaning
for non-physical objects. Set the value to FALSE
if you want to disable rotation around that axis. The
default is TRUE for a physical object.
A useful example to think about when visualizing
the effect is a sit-and-spin device. They spin around the
Z axis (up) but not around the X or Y axis.
Controls whether the object can be grabbed.
A grab is the default action when in third person, and is
available as the hand tool in build mode.
This is useful for physical objects that you dont want other
people to be able to trivially disturb.
The default if FALSE
Controls whether the object can cross region boundaries
and move more than 20 meters from its creation
point. The default if FALSE.
Controls whether the object is returned to the owners
inventory if it wanders off the edge of the world. It is
useful to set this status TRUE for things like bullets
or rockets. The default is TRUE
These constants can be combined using the binary | operator
and are used in the llSensor and related calls.
Object Type Constants
Objects in world that are agents.
Objects in world that are running a script or
currently pysically moving.
Static in-world objects.
Scripted in-world objects.
The permission constants are used for passing values
to llRequestPermissions, determing the value of
llGetPermissions, and explicitly passed to the
run_time_permissions event. For many of the basic library
functions to work, a specific permission must be enabled.
The permission constants can be ored together to be
used in conjunction.
Permission Constants
If this permission is enabled, the object can successfully
call llGiveMoney to debit the owners account.
If this permission enabled, the object can successfully
call the llTakeControls libray call.
(not yet implemented)
If this permission is enabled, the object can successfully
call llStartAnimation for the avatar that owns this
object.
If this permission is enabled, the object can successfully
call llAttachToAvatar to attach to the given avatar.
(not yet implemented)
If this permission is enabled, the object can successfully
call llCreateLink, llBreakLink, and
llBreakAllLinks to change links to other objects.
(not yet implemented)
(not yet implemented)
These constants can be used to refer to a specific inventory
type in calls to llGetInventoryNumber
andllGetInventoryName.
Inventory Constants
Each constant refers to the named type of inventory.
These constants are used to refer to attachment points
in calls to llAttachToAvatar.
Attachment Constants
Attach to the avatar chest.
Attach to the avatar head.
Attach to the avatar left shoulder.
Attach to the avatar right shoulder.
Attach to the avatar left hand.
Attach to the avatar right hand.
Attach to the avatar left foot.
Attach to the avatar right foot.
Attach to the avatar back.
Attach to the avatar pelvis.
Attach to the avatar mouth.
Attach to the avatar chin.
Attach to the avatar left ear.
Attach to the avatar right ear.
Attach to the avatar left eye.
Attach to the avatar right eye.
Attach to the avatar nose.
Attach to the avatar right upper arm.
Attach to the avatar right lower arm.
Attach to the avatar left upper arm.
Attach to the avatar left lower arm.
Attach to the avatar right hip.
Attach to the avatar right upper leg.
Attach to the avatar right lower leg.
Attach to the avatar left hip.
Attach to the avatar lower upper leg.
Attach to the avatar lower left leg.
Attach to the avatar belly.
Attach to the avatar right pectoral. (depreciated)
Attach to the avatar left pectoral. (depreciated)
These constants are only used in calls to llModifyLand.
The constants are equivalent to the similarly labelled
user interface elements for editing land in the viewer.
Land Constants
Action to level the land.
Action to raise the land.
Action to lower the land.
Use a small brush size.
Use a medium brush size.
Use a large brush size.
These constants are used in calls to llSetLinkColor and
llMessageLinked.
Link Constants
This targets every object in the linked set.
This targets the root of the linked set.
This targets every object in the linked set except
the object with the script.
This targets every object except the root in the linked set.
These constants are used in llTakeControls as well
as the control event handler.
Control Constants
Test for the avatar move forward control.
Test for the avatar move back control.
Test for the avatar move left control.
Test for the avatar move right control.
Test for the avatar rotate left control.
Test for the avatar rotate right control.
Test for the avatar move up control.
Test for the avatar move down control.
Test for the avatar left button control.
Test for the avatar left button control while in mouse look.
These constants are used in the changed event handler.
Change Constants
The object inventory has changed.
The object inventory has changed because an item was
added through the llAllowInventoryDrop interface.
The object color has changed.
The object shape has changed, eg, a box to a cylinder
The object scale has changed.
The texture offset, scale rotation, or simply the object
texture has changed.
The object has linked or its links were broken.
These constants are used to determine the variable type
stored in a heterogenous list. The value returned from
llGetListEntryType can be used for comparison against
these constants.
Type Constants
The list entry is an integer.
The list entry is a float.
The list entry is a string.
The list entry is a key.
The list entry is a vector.
The list entry is a rotation.
The list entry is invalid.
Each of these constants represents a bit in the integer
returned from the llGetAgentInfo function and can be used
in an expression to determine the specified information
about an agent.
Agent Info Constants
The agent is flying.
The agent has attachments.
The agent has scripted attachments.
These constants are used in the llSetTextureAnim api to
control the animation mode.
Texture Animation Constants
Texture animation is on.
Loop the texture animation.
Play animation in reverse direction.
play animation going forwards, then backwards.
slide in the X direction, instead of playing separate frames.
Animate texture rotation.
Animate the texture scale.
These constants are used in calls to the llParticleSystem
api to specify parameters.
Particle System Parameters
Each particle that is emitted by the particle system is
simulated based on the following flags. To use
multiple flags, bitwise or (|) them together.
PSYS_PART_FLAGS Values
Interpolate both the color and alpha from the start
value to the end value.
Interpolate the particle scale from the start value
to the end value.
Particles have their velocity damped towards the wind velocity.
Particles bounce off of a plane at the objects Z height.
The particle position is relative to the source objects position.
The particle orientation is rotated so the vertical
axis faces towards the particle velocity.
The particle heads towards the location of the target
object as defined by PSYS_SRC_TARGET_KEY.
The particle glows.
(not implemented)
(not implemented)
(not implemented)
The pattern which is used to generate particles.
Use one of the following values:
PSYS_SRC_PATTERN Values
Drop particles at the source position.
Shoot particles out in all directions,
using the burst parameters.
Shoot particles across a 2 dimensional area defined
by the arc created from
PSYS_SRC_OUTERANGLE.
There will be an open area defined by PSYS_SRC_INNERANGLE
within the larger arc.
Shoot particles out in a 3 dimensional cone with
an outer arc of PSYS_SRC_OUTERANGLE and an
inner open area defined by PSYS_SRC_INNERANGLE.
a vector <r,g,b> which determines the starting
color of the object.
a float which determines the starting alpha of the object.
a vector <r, g, b> which determines the ending
color of the object.
a float which determines the ending alpha of the object.
a vector <sx, sy, z>,
which is the starting size of the particle billboard
in meters (z is ignored).
a vector <sx, sy, z>, which is the ending
size of the particle billboard in meters (z is ignored).
age in seconds of a particle at which it dies.
a vector <x, y, z> which is the acceleration
to apply on particles.
an asset name for the texture to use for the particles.
how often to release a particle burst (float seconds).
specifies the inner angle of the arc created
by the PSYS_PART_SRC_PATTERN_ANGLE or
PSYS_PART_SRC_PATTERN_ANGLE_CONE source pattern.
The area specified will not have particles
in it..
specifies the outer angle of the arc created
by the PSYS_PART_SRC_PATTERN_ANGLE or
PSYS_PART_SRC_PATTERN_ANGLE_CONE source pattern.
The area between the outer and inner angle
will be filled with particles..
how many particles to release in a burst.
what distance from the center of the object
to create the particles.
minimum speed that a particle should be moving.
maximum speed that a particle should be moving.
how long this particle system should last,
0.0 menas forever.
the key of a target object to move towards
if PSYS_PART_TARGET_POS_MASK is enabled.
Sets the angular velocity to rotate the axis
that SRC_PATTERN_ANGLE and
SRC_PATTERN_ANGLE_CONE use..
These constants are used in calls to the
llRequestAgentData api to collect information about
an agent which will
be provided in the dataserver event.
Texture Animation Constants
"1" for online "0" for offline.
The name of the agent.
The date the agent was born returned in ISO 8601 format of YYYY-MM-DD.
Returns the agent ratings as a comma separated string
of six integers. They are:
1. Positive rated behavior
2. Negative rated behavior
3. Positive rated appearance
4. Negative rated appearance
5. Positive rated building
6. Negative rated building
LSL provides a small collection of floating point
constants for use in float arithmetic.
These constants are usually
employed while performing trigonometric calculations,
but are sometimes useful for other applications such as
specifying arc radians to sensor or particle system functions.
Float Constants
3.14159265 - The radians of a hemicircle.
6.28318530 - The radians of a circle.
1.57079633 - The radians of a quarter circle.
0.01745329 - Number of radians per degree.
You can use this to convert degrees to radians by multiplying
the degrees by this number.
57.2957795 - Number of degrees per radian.
You can use this number to convert radians to degrees by
multiplying the radians by this number.
1.41421356 - The square root of 2.
There is only one key constant which acts as an invalid key: NULL_KEY.
There is one uncategorized integer constant
which is used in some of the texturing and coloring api: ALL_SIDES
There is one uncategorized string constant
which is used in the dataserver event: EOF
There is only one vector constant which
acts as a zero vector: ZERO_VECTOR = <0,0,0>.
There is only one rotation constant
which acts as a zero rotation: ZERO_ROTATION = <0,0,0,1>.
Parameters
A vector of timescales for exponential
decay of the vehicles linear velocity along its preferred axes of
motion (at, left, up).
Range = [0.07, inf) seconds for each element of the vector.
A vector of timescales for exponential
decay of the vehicles angular velocity about its preferred axes of
motion (at, left, up).
Range = [0.07, inf) seconds for each element of the vector.
The direction and magnitude (in preferred frame)
of the vehicles linear motor. The vehicle will accelerate
(or decelerate if necessary) to match its velocity to its motor.
Range of magnitude = [0, 30] meters/second.
The timescale for exponential approach to full linear motor velocity.
The timescale for exponential decay of the linear motors magnitude.
The direction and magnitude (in preferred frame)
of the vehicles angular motor.The vehicle will accelerate
(or decelerate if necessary) to match its velocity to its motor.
The timescale for exponential approach to full angular motor velocity.
The timescale for exponential decay of the angular motors magnitude.
The height (above the terrain or water, or global)
at which the vehicle will try to hover.
A slider between minimum (0.0 = bouncy)
and maximum (1.0 = fast as possible) damped motion of the
hover behavior.
The period of bounce (or timescale of exponential approach,
depending on the hover efficiency) for the
vehicle to hover to the proper height.
A slider between minimum (0.0) and maximum anti-gravity (1.0).
A slider between minimum (0.0) and maximum (1.0)
deflection of linear velocity. That is, its a simple
scalar for modulating the strength of linear deflection.
The timescale for exponential success of linear
deflection deflection. It is another way to specify how much
time it takes for the vehicles linear velocity
to be redirected to its preferred axis of motion.
A slider between minimum (0.0) and maximum (1.0)
deflection of angular orientation. That is, its a simple
scalar for modulating the strength of angular
deflection such that the vehicles preferred axis of motion
points toward its real velocity.
The timescale for exponential success of linear
deflection deflection. Its another way to specify the strength
of the vehicles tendency to reorient itself so
that its preferred axis of motion agrees with its true velocity.
A slider between minimum (0.0 = wobbly) and
maximum (1.0 = firm as possible) stability of the vehicle to
keep itself upright.
The period of wobble, or timescale for
exponential approach, of the vehicle to rotate such that its preferred
"up" axis is oriented along the worlds "up" axis.
A slider between anti (-1.0), none (0.0),
and maxmum (1.0) banking strength.
A slider between static (0.0) and dynamic (1.0)
banking. "Static" means the banking scales only with the
angle of roll, whereas "dynamic" is a term
that also scales with the vehicles linear speed.
The timescale for banking to exponentially
approach its maximum effect. This is another way to scale the
strength of the banking effect, however it affects the
term that is proportional to the difference between what
the banking behavior is trying to do, and what the
vehicle is actually doing.
A rotation of the vehicles preferred axes of
motion and orientation (at, left, up) with respect to the vehicles
local frame (x, y, z).
Flags
Old, changed to VEHICLE_FLAG_NO_DEFLECTION_UP
This flag prevents linear deflection parallel to world z-axis.
This is useful for preventing ground vehicles
with large linear deflection, like bumper cars,
from climbing their linear deflection into the sky.
For vehicles with vertical attractor
that want to be able to climb/dive, for instance,
airplanes that want to use the banking feature.
Ignore terrain height when hovering.
Ignore water height when hovering.
Hover at global height.
Hover doesnt push down. Use this flag for hovering vehicles
that should be able to jump above their hover
height.
Prevents ground vehicles from motoring into the sky.
Types
Simple vehicle that bumps along the ground,
and likes to move along its local x-axis.
// most friction for left-right, least for up-down
llSetVehicleVectorParam( VEHICLE_LINEAR_FRICTION_TIMESCALE, <30, 1, 1000> );
// no angular friction
llSetVehicleVectorParam( VEHICLE_ANGULAR_FRICTION_TIMESCALE, <1000, 1000, 1000> );
// no linear motor
llSetVehicleVectorParam( VEHICLE_LINEAR_MOTOR_DIRECTION, <0, 0, 0> );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_TIMESCALE, 1000 );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, 120 );
// no agular motor
llSetVehicleVectorParam( VEHICLE_ANGULAR_MOTOR_DIRECTION, <0, 0, 0> );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_TIMESCALE, 1000 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 120 );
// no hover (but with timescale of 10 sec if enabled)
llSetVehicleFloatParam( VEHICLE_HOVER_HEIGHT, 0 );
llSetVehicleFloatParam( VEHICLE_HOVER_EFFICIENCY, 10 );
llSetVehicleFloatParam( VEHICLE_HOVER_TIMESCALE, 10 );
llSetVehicleFloatParam( VEHICLE_BUOYANCY, 0 );
// maximum linear deflection with timescale of 1 second
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_EFFICIENCY, 1 );
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 1 );
// no angular deflection
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY, 0 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 10 );
// no vertical attractor (doesnt mind flipping over)
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 1 );
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 1000 );
// no banking
llSetVehicleFloatParam( VEHICLE_BANKING_EFFICIENCY, 0 );
llSetVehicleFloatParam( VEHICLE_BANKING_MIX, 1 );
llSetVehicleFloatParam( VEHICLE_BANKING_TIMESCALE, 10 );
// default rotation of local frame
llSetVehicleRotationParam( VEHICLE_REFERENCE_FRAME, <0, 0, 0, 1> );
// remove these flags
llRemoveVehicleFlags( VEHICLE_FLAG_HOVER_WATER_ONLY
| VEHICLE_FLAG_HOVER_TERRAIN_ONLY
| VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT
| VEHICLE_FLAG_HOVER_UP_ONLY );
// set these flags (the limit_roll flag will have no effect
// until banking is enabled, if ever)
llSetVehicleFlags( VEHICLE_FLAG_NO_DEFLECTION_UP
| VEHICLE_FLAG_LIMIT_ROLL_ONLY
| VEHICLE_FLAG_LIMIT_MOTOR_UP );
Another vehicle that bounces along the ground but needs
the motors to be driven from external controls or
timer events.
// most friction for left-right, least for up-down
llSetVehicleVectorParam( VEHICLE_LINEAR_FRICTION_TIMESCALE, <100, 2, 1000> );
// no angular friction
llSetVehicleVectorParam( VEHICLE_ANGULAR_FRICTION_TIMESCALE, <1000, 1000, 1000> );
// linear motor wins after about a second, decays after about a minute
llSetVehicleVectorParam( VEHICLE_LINEAR_MOTOR_DIRECTION, <0, 0, 0> );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_TIMESCALE, 1 );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, 60 );
// agular motor wins after a second, decays in less time than that
llSetVehicleVectorParam( VEHICLE_ANGULAR_MOTOR_DIRECTION, <0, 0, 0> );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_TIMESCALE, 1 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 0.8 );
// no hover
llSetVehicleFloatParam( VEHICLE_HOVER_HEIGHT, 0 );
llSetVehicleFloatParam( VEHICLE_HOVER_EFFICIENCY, 0 );
llSetVehicleFloatParam( VEHICLE_HOVER_TIMESCALE, 1000 );
llSetVehicleFloatParam( VEHICLE_BUOYANCY, 0 );
// maximum linear deflection with timescale of 2 seconds
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_EFFICIENCY, 1 );
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 2 );
// no angular deflection
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY, 0 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 10 );
// critically damped vertical attractor
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 1 );
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 10 );
// weak negative critically damped banking
llSetVehicleFloatParam( VEHICLE_BANKING_EFFICIENCY, -0.2 );
llSetVehicleFloatParam( VEHICLE_BANKING_MIX, 1 );
llSetVehicleFloatParam( VEHICLE_BANKING_TIMESCALE, 1 );
// default rotation of local frame
llSetVehicleRotationParam( VEHICLE_REFERENCE_FRAME, <0, 0, 0, 1> );
// remove these flags
llRemoveVehicleFlags( VEHICLE_FLAG_HOVER_WATER_ONLY
| VEHICLE_FLAG_HOVER_TERRAIN_ONLY
| VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT);
// set these flags
llSetVehicleFlags( VEHICLE_FLAG_NO_DEFLECTION_UP
| VEHICLE_FLAG_LIMIT_ROLL_ONLY
| VEHICLE_FLAG_HOVER_UP_ONLY
| VEHICLE_FLAG_LIMIT_MOTOR_UP );
Hovers over water with lots of friction and some anglar deflection.
// least for forward-back, most friction for up-down
llSetVehicleVectorParam( VEHICLE_LINEAR_FRICTION_TIMESCALE, <10, 3, 2> );
// uniform angular friction (setting it as a scalar rather than a vector)
llSetVehicleFloatParam( VEHICLE_ANGULAR_FRICTION_TIMESCALE, 10 );
// linear motor wins after about five seconds, decays after about a minute
llSetVehicleVectorParam( VEHICLE_LINEAR_MOTOR_DIRECTION, <0, 0, 0> );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_TIMESCALE, 5 );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, 60 );
// agular motor wins after four seconds, decays in same amount of time
llSetVehicleVectorParam( VEHICLE_ANGULAR_MOTOR_DIRECTION, <0, 0, 0> );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_TIMESCALE, 4 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 4 );
// hover
llSetVehicleFloatParam( VEHICLE_HOVER_HEIGHT, 0 );
llSetVehicleFloatParam( VEHICLE_HOVER_EFFICIENCY, 0.5 );
llSetVehicleFloatParam( VEHICLE_HOVER_TIMESCALE, 2.0 );
llSetVehicleFloatParam( VEHICLE_BUOYANCY, 1 );
// halfway linear deflection with timescale of 3 seconds
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_EFFICIENCY, 0.5 );
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 3 );
// angular deflection
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY, 0.5 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 5 );
// somewhat bounscy vertical attractor
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 0.5 );
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 5 );
// weak negative damped banking
llSetVehicleFloatParam( VEHICLE_BANKING_EFFICIENCY, -0.3 );
llSetVehicleFloatParam( VEHICLE_BANKING_MIX, 0.8 );
llSetVehicleFloatParam( VEHICLE_BANKING_TIMESCALE, 1 );
// default rotation of local frame
llSetVehicleRotationParam( VEHICLE_REFERENCE_FRAME, <0, 0, 0, 1> );
// remove these flags
llRemoveVehicleFlags( VEHICLE_FLAG_HOVER_TERRAIN_ONLY
| VEHICLE_FLAG_LIMIT_ROLL_ONLY
| VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT);
// set these flags
llSetVehicleFlags( VEHICLE_FLAG_NO_DEFLECTION_UP
| VEHICLE_FLAG_HOVER_WATER_ONLY
| VEHICLE_FLAG_HOVER_UP_ONLY
| VEHICLE_FLAG_LIMIT_MOTOR_UP );
Uses linear deflection for lift, no hover, and banking to turn.
// very little friction along forward-back axis
llSetVehicleVectorParam( VEHICLE_LINEAR_FRICTION_TIMESCALE, <200, 10, 5> );
// uniform angular friction
llSetVehicleFloatParam( VEHICLE_ANGULAR_FRICTION_TIMESCALE, 20 );
// linear motor
llSetVehicleVectorParam( VEHICLE_LINEAR_MOTOR_DIRECTION, <0, 0, 0> );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_TIMESCALE, 2 );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, 60 );
// agular motor
llSetVehicleVectorParam( VEHICLE_ANGULAR_MOTOR_DIRECTION, <0, 0, 0> );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_TIMESCALE, 4 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 8 );
// no hover
llSetVehicleFloatParam( VEHICLE_HOVER_HEIGHT, 0 );
llSetVehicleFloatParam( VEHICLE_HOVER_EFFICIENCY, 0.5 );
llSetVehicleFloatParam( VEHICLE_HOVER_TIMESCALE, 1000 );
llSetVehicleFloatParam( VEHICLE_BUOYANCY, 0 );
// linear deflection
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_EFFICIENCY, 0.5 );
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 0.5 );
// angular deflection
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY, 1.0 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 2.0 );
// vertical attractor
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 0.9 );
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 2 );
// banking
llSetVehicleFloatParam( VEHICLE_BANKING_EFFICIENCY, 1 );
llSetVehicleFloatParam( VEHICLE_BANKING_MIX, 0.7 );
llSetVehicleFloatParam( VEHICLE_BANKING_TIMESCALE, 2 );
// default rotation of local frame
llSetVehicleRotationParam( VEHICLE_REFERENCE_FRAME, <0, 0, 0, 1> );
// remove these flags
llRemoveVehicleFlags( VEHICLE_FLAG_NO_DEFLECTION_UP
| VEHICLE_FLAG_HOVER_WATER_ONLY
| VEHICLE_FLAG_HOVER_TERRAIN_ONLY
| VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT
| VEHICLE_FLAG_HOVER_UP_ONLY
| VEHICLE_FLAG_LIMIT_MOTOR_UP );
// set these flags
llSetVehicleFlags( VEHICLE_FLAG_LIMIT_ROLL_ONLY );
Hover, and friction, but no deflection.
// uniform linear friction
llSetVehicleFloatParam( VEHICLE_LINEAR_FRICTION_TIMESCALE, 5 );
// uniform angular friction
llSetVehicleFloatParam( VEHICLE_ANGULAR_FRICTION_TIMESCALE, 10 );
// linear motor
llSetVehicleVectorParam( VEHICLE_LINEAR_MOTOR_DIRECTION, <0, 0, 0> );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_TIMESCALE, 5 );
llSetVehicleFloatParam( VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE, 60 );
// agular motor
llSetVehicleVectorParam( VEHICLE_ANGULAR_MOTOR_DIRECTION, <0, 0, 0> );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_TIMESCALE, 6 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE, 10 );
// hover
llSetVehicleFloatParam( VEHICLE_HOVER_HEIGHT, 5 );
llSetVehicleFloatParam( VEHICLE_HOVER_EFFICIENCY, 0.8 );
llSetVehicleFloatParam( VEHICLE_HOVER_TIMESCALE, 10 );
llSetVehicleFloatParam( VEHICLE_BUOYANCY, 1 );
// no linear deflection
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_EFFICIENCY, 0 );
llSetVehicleFloatParam( VEHICLE_LINEAR_DEFLECTION_TIMESCALE, 5 );
// no angular deflection
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY, 0 );
llSetVehicleFloatParam( VEHICLE_ANGULAR_DEFLECTION_TIMESCALE, 5 );
// no vertical attractor
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 1 );
llSetVehicleFloatParam( VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 1000 );
// no banking
llSetVehicleFloatParam( VEHICLE_BANKING_EFFICIENCY, 0 );
llSetVehicleFloatParam( VEHICLE_BANKING_MIX, 0.7 );
llSetVehicleFloatParam( VEHICLE_BANKING_TIMESCALE, 5 );
// default rotation of local frame
llSetVehicleRotationParam( VEHICLE_REFERENCE_FRAME, <0, 0, 0, 1> );
// remove all flags
llRemoveVehicleFlags( VEHICLE_FLAG_NO_DEFLECTION_UP
| VEHICLE_FLAG_HOVER_WATER_ONLY
| VEHICLE_FLAG_LIMIT_ROLL_ONLY
| VEHICLE_FLAG_HOVER_TERRAIN_ONLY
| VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT
| VEHICLE_FLAG_HOVER_UP_ONLY
| VEHICLE_FLAG_LIMIT_MOTOR_UP );
DEBUG_CHANNEL is an integer constant that, when passed to
llSay, llWhisper, or llShout as a channel parameter,
will print text to the Script Warning/Error Window.
It has the value '2147483647'.
Use this to get or set the parcel media MIME type (e.g. "text/html").
Use this to get or set the parcel media pixel resolution.
Use this to get or set the parcel media description.
Used to get or set the parcel's media looping variable.
PRIM_GLOW is used to get or set the glow status of the face.
Area in radians specifying where particles
will NOT be created (for ANGLE patterns)
Area in radians filled with particles
(for ANGLE patterns) (if lower than PSYS_SRC_ANGLE_BEGIN,
acts as PSYS_SRC_ANGLE_BEGIN itself,
and PSYS_SRC_ANGLE_BEGIN acts as PSYS_SRC_ANGLE_END)
PUBLIC_CHANNEL is an integer constant that, when passed to
llSay, llWhisper, or llShout as a channel parameter,
will print text to the publicly heard chat channel. Has the value '0'.
Gets the object's name.
Gets the object's description.
If id is an avatar, an empty string is returned.
Gets the object's position in region coordinates.
Gets the object's rotation.
Gets the object's velocity.
Gets an object's owner's key.
If id is group owned, a NULL_KEY is returned.
Gets the prims's group key.
If id is an avatar, a NULL_KEY is returned.
Gets the object's creator key.
If id is an avatar, a NULL_KEY is returned.
Performs the default action: when the prim is touched, touch events are triggered"
When the prim is touched, touch events are triggered"
When the prim is touched, the avatar sits upon it
When the prim is touched, the buy dialog is opened
When the prim is touched, the pay dialog is opened
When the prim is touched, the object inventory dialog is opened
When the prim is touched, html-on-a-prim is enabled?
When the prim is touched, the web media dialog is opened"