G General

Privacy Bubble Controller — LSL Sphere Privacy Shield (Easy Install, Owner-Only, Timer)

Privacy Bubble Controller — LSL Sphere Privacy Shield (Easy Install, Owner-Only, Timer)
Detalles
Funciones
Contenidos
Reseñas

Here’s the short version: this is a compact LSL script that turns a prim into a temporary privacy bubble — a hollow sphere you can rez that blocks/contains space for a set time, tells the owner when it’s activated, and automatically resets after the timer expires. It’s intended as a drop-in script for a single prim (or linkset) you want to use as a visible privacy zone in Second Life.

What it does

Replaces the prim with a sphere scaled to the configured radius.

Sets colors and transparency so the bubble is visible from the outside and clear-ish inside.

Makes the prim non-phantom so it acts as a physical barrier (people can’t simply walk through it).

Announces activation/deactivation to the owner and to nearby users when the timer runs out.

Listens on a configurable chat channel for simple on/off commands, with an owner-only safety flag.

Why this is useful
If you need a quick way to create a temporary private area (for RP, vendor privacy, small meetings, or photo setups), this script gives you a plug-and-play privacy bubble with basic protections and controls. It’s small, easy to edit, and provides sensible defaults so it works out of the box.

How to use — step-by-step

Rez the prim you want to become the bubble (a single prim or root prim of a linkset is fine).

Open the script, paste this script into the prim’s Scripts tab (or add it to your existing controller prim) and save.

Make sure the script’s CHANNEL variable (top of script) is a chat channel you’re comfortable using (default is 1).

Use the chat command in local chat with the leading slash. Example: to activate on the default channel type:
/1 on
and to turn it off:
/1 off
(Replace 1 with your channel if you changed CHANNEL in the script.)

Only the owner can activate/deactivate by default (because OWNER_ONLY = TRUE). If you want anyone to be able to use it, set OWNER_ONLY = FALSE in the script and save.

The bubble will automatically deactivate after the configured BUBBLE_DURATION (default 300 seconds). When the timer expires, the script announces "Privacy bubble timer expired." and returns the prim to its original size/appearance.

Exact commands

Activate: /1 on

Deactivate: /1 off
(If you change CHANNEL at the top of the script, replace 1 with that number.)

Configuration points you’ll care about (what to edit)
At the very top of the script there are simple variables you can edit without touching the rest of the code:

BUBBLE_RADIUS — radius in meters. Default 10.0 (so the sphere diameter = 20m).

BUBBLE_DURATION — how long the bubble stays active in seconds. Default 300.0 (5 minutes).

CMD_ON, CMD_OFF — text commands ("on"/"off" by default).

CHANNEL — chat channel number used to control the bubble (default 1).

OWNER_ONLY — TRUE (only owner can use commands) or FALSE.

OUTSIDE_TRANSPARENCY and OUTSIDE_COLOR — appearance of the outside face.

Practical tips and small caveats

The script uses llSetLinkPrimitiveParamsFast and configures PRIM_SIZE to the computed bubble diameter. That works best if your prim is the root prim or a single prim. If you use a complex linkset, test it: gOriginalScale is recorded and the script attempts to restore it on shutdown/reset.

The script sets PRIM_PHANTOM to FALSE while the bubble is active. That makes the bubble solid — avatars and objects can be blocked by it. If you want a non-blocking visual only bubble, change PRIM_PHANTOM to TRUE in both turnOn() and turnOff() blocks.

The script assumes certain face indices (it explicitly sets face 0 and face 2). If your prim has a different topology or you see odd coloring, tweak those face indices or use ALL_SIDES to simplify.

Ownership and rez rights: the bubble’s protection relies on OWNER_ONLY checking id != gOwner. If ownership changes (transfer or taking the object), the script will llResetScript() on CHANGED_OWNER to avoid accidental runaway states.

When rezzed or reset the script sets a findable semi-transparent default look so you can locate the controller in world.

What you can change quickly — real examples

Make the bubble last longer: change BUBBLE_DURATION from 300.0 to 900.0 for 15 minutes.

Make it larger: increase BUBBLE_RADIUS from 10.0 to 20.0. Remember the sphere’s diameter will be double the radius.

Allow friends to activate it: set OWNER_ONLY = FALSE or add a permission check and a list of allowed keys if you want fine control.

Limitations to be aware of

This is primarily a visual/physical barrier implemented via prim params. It does not provide any ACL-level privacy like blocking scripts or preventing chat visibility inside the bubble — it creates a private space but not a secure communications channel.

Face indexing and prim shape nuances may require minor tuning for perfect visuals.

  • Easy one-command activation: /1 on and /1 off.
  • Owner-only safety flag (prevent others from toggling the bubble).
  • Configurable radius and auto-timeout(edit top variables, no deep LSL skills need
  • Restores original prim scale and appearance when deactivated.
  • Uses efficient llSetLinkPrimitiveParamsFast for smooth visual changes