Skip to content
Tonaie edited this page Jan 24, 2017 · 4 revisions

libJas is a library of LSL functions. This page lists some of the most common ones

Function Description
list listNormalize(list input, float norm) Normalizes a list of floats to norm. listNormalize([3.0,1.0],1) will return [0.75, 0.25]
string trimZeros(float input) Returns a string of input with any trailing zeros removed. If no decimal places are found, the . is removed to.
trimZeros(1.136000) returns "1.136"
trimZeros(1.000) returns "1"
integer triggerAnim(string anim, integer start) Tries to start or stop an animation. Returns TRUE on success, FALSE if animation was not found or permissions aren't set.
translateTo(vector to, rotation rota, float time, integer mode) Attempts to smoothly move a linkset to a global position and rotation using keyframed motion and a sinusoidal ease.
reverseList(list input, integer stride) Reverses a strided list
outputAs(string name, string message) Attempts to set object name to name, then llSay(0, message), then change name back to what it was before
multiTimer(list data) Handle multiple timers from a single script. See MultiTimer on how to set it up
mathToFloat(string al, integer part, string varObj) Takes a string and parses it as a math algorithm. See mathToFloat for more info.
jsonUnset(string json, list ident) Safely removes a value from a JSON string without the risk of the entire string getting corrupted if ident doesn't exist
jsonTypeName(string value) Takes in a JSON value and returns a human readable type name for it
isDay() Returns TRUE if sim sun is over the horizon
Clone this wiki locally