G General

Semicolon; Bumper

Semicolon; Bumper
Details
Features
Contents
Reviews

## What is this script for?

This script allows you to set up a menu in your Second Life object that lets the owner:
- Choose which animation and sound (from object's inventory) to trigger on collision.
- Disable animation or sound at any time.
- Set how many seconds the animation/sound lasts.
- Set the minimum delay (in seconds) between triggerings (to prevent spam).

---

## How to set up

1. **Add your animations and sounds**
- Right-click your object > Edit > Contents tab.
- Drop your animation and sound files into the contents.

2. **Add the script**
- Copy and paste the script into a new script inside the object (use the suggested name: `animated_collision_menu.lsl`).

---

## How the menu works

- **To open the menu:**
- Owner touches and holds the object for 1 second.

- **Main menu options:**
- **Animations:** Pick which animation to use, or disable animations.
- **Sounds:** Pick which sound to use, or disable sounds.
- **Set Duration:** Set how many seconds the animation/sound effect lasts (you type a number).
- **Set Collision Delay:** Set the minimum delay between triggers (you type a number).

- **Submenus (Animations/Sounds):**
- Shows all animation/sound files in the object.
- Has an option to "Disable animation"/"Disable sound".
- Has "Back" to return to main menu.

- **Duration and Delay:**
- When you select "Set Duration" or "Set Collision Delay", a text box appears.
- Type the desired number of seconds and click "Submit".

---

## What happens on collision?

- When **another avatar (not the owner)** collides with the object:
- The chosen animation and/or sound will play.
- The script will respect your set delay and effect duration.
- If animation or sound was disabled, only the enabled effect will play.

---

## Owner feedback & tips

- The owner gets chat feedback for every choice (e.g., "Selected animation: wave", "Animation disabled", "Effect duration set to: 5 seconds").
- If the script needs animation permission, touch the object to grant it (you'll see "Animation permission granted!" in chat).
- Settings are always changeable via the menu.

---

## Troubleshooting

- **No menu appears?**
- Make sure you are the owner and you touch/hold for at least 1 second.

- **No animations or sounds appear in menu?**
- Make sure you added them to the object’s contents.

- **Animations don’t play and you see a permission error?**
- Touch the object to grant animation permissions.

- **Collision triggers too fast or too slow?**
- Adjust the "Collision Delay" to suit your needs.