Table of Contents

Set-N-Delete: Simple Scripts

A bunch of scripts to reset one property each

no-animation

Reset texture animation on all faces of a prim

no-animation.lua
-- no-animation - Reset texture animation on all faces
-- self-deleting
 
local function main()
    ll.SetTextureAnim(0, ALL_SIDES, 1, 1, 0.0, TWO_PI, 0.0)
    ll.RemoveInventory(ll.GetScriptName())
end
 
main()

no-camera-offset

Reset camera at offset and eye offset

no-camera-offset.lua
-- no-camera-offset - Reset camera offset prim properties
-- self-deleting
 
local function main()
    ll.SetCameraAtOffset(ZERO_VECTOR)
    ll.SetCameraEyeOffset(ZERO_VECTOR)
    ll.RemoveInventory(ll.GetScriptName())
end
 
main()

no-float

Reset primt text (aka float text or hover text)

no-float.lua
-- no-float - Set float text from object name or string
-- self-deleting
 
local function main()
    ll.SetText("", ZERO_VECTOR, 1.0)
    ll.RemoveInventory(ll.GetScriptName())
end
 
main()

no-keyframe

Reset keyframe animation

no-keyframe.lua
-- no-keyframe - Reset key frame animation
-- self-deleting
 
local function main()
    ll.SetKeyframedMotion({}, {})
    ll.RemoveInventory(ll.GetScriptName())
end
 
main()

no-particles

Reset particles in a prim

no-particles.lua
-- no-particles - Reset particle system
-- self-deleting
 
local function main()
    ll.ParticleSystem({})
    ll.RemoveInventory(ll.GetScriptName())
end
 
main()
no-particles-all.lua
-- no-particles-all - Reset particle system on all links in object
-- self-deleting
 
local function main()
    local num_links = ll.GetObjectPrimCount(ll.GetKey())
    for i = 0, num_links do
        ll.LinkParticleSystem(i, {})
    end
    ll.RemoveInventory(ll.GetScriptName())
end
 
main()

no-media

Reset media and params on all faces of a prim

no-media.lua
-- no-media- - Reset media and params from all faces
-- self-deleting
 
local function main()
    local num_sides = ll.GetLinkNumberOfSides(LINK_THIS)
    for sice = 0, num_sides-1 do
        ll.ClearLinkMedia(LINK_THIS, sice)
    end
 
    ll.RemoveInventory(ll.GetScriptName())
end
 
main()

Reset media and params on all faces of all prims in a linkset

no-media-linkset.lua
-- no-media-linkset - Reset media and params from all faces in linkset
-- self-deleting
 
local function main()
    local num_links = ll.GetObjectPrimCount(ll.GetKey())
    for link = 0, num_links-1 do
        local num_sides = ll.GetLinkNumberOfSides(link)
        for side = 0, num_sides-1 do
            ll.ClearLinkMedia(link, side)
        end
    end
 
    ll.RemoveInventory(ll.GetScriptName())
end
 
main()

no-sit-target

Reset the sit target in a single prim

no-sit-target-link.lua
-- no-sit-target-link - Reset sit target in LINK_THIS
-- self-deleting
 
local function main()
    ll.LinkSitTarget(LINK_THIS, ZERO_VECTOR, ZERO_ROTATION);
    ll.RemoveInventory(ll.GetScriptName())
end
 
main()

Reset the sit target in the root prim

no-sit-target-root.lua
-- no-sit-target-root - Reset sit target in LINK_ROOT
-- self-deleting
 
local function main()
    ll.LinkSitTarget(LINK_ROOT, ZERO_VECTOR, ZERO_ROTATION);
    ll.RemoveInventory(ll.GetScriptName())
end
 
main()

no-target-omega

Reset target omega object rotation

no-target-omega.lua
-- no-target-omega - Reset target omega rotation
-- self-deleting
 
local function main()
    ll.TargetOmega(ZERO_VECTOR, 0, 0)
    ll.RemoveInventory(ll.GetScriptName())
end
 
main()

LSL