Table of Contents

About

This script was tested and works on OpenSim version 0.7.4!

A script that Evilmorgan wanted me to create for her. It is a script that, along with an animation, should be placed in a donut. Whenever you equip the donut, it says on the main channel and triggers a dance animation. Since I do not posses any good animations, the script is made to trigger the very first animation in the inventory.

Setup

  • Create a primitive - perhaps use a donut sculpt texture to make it into a sculpt.
  • Drop an animation along with the script below in the primitive you just created.
  • Take the primitive to your inventory and equip it to trigger the sequence.

Code

donut_dance.lsl
///////////////////////////////////////////////////////////////////////////
//  Copyright (C) Wizardry and Steamworks 2011 - License: GNU GPLv3      //
//  Please see: http://www.gnu.org/licenses/gpl.html for legal details,  //
//  rights of fair usage, the disclaimer and warranty conditions.        //
///////////////////////////////////////////////////////////////////////////
 
integer o = -1;
 
default
{
    attach(key id)
    {
        llSetTimerEvent(2);
    }
    run_time_permissions(integer perm)
    {
        if(perm & PERMISSION_TRIGGER_ANIMATION && llGetInventoryNumber(INVENTORY_ANIMATION)) {
            llStartAnimation(llGetInventoryName(INVENTORY_ANIMATION, 0));
            llSetTimerEvent(5);
        }
    }
    timer() {
        if(o = ~o) {
            llStopAnimation(llGetInventoryName(INVENTORY_ANIMATION, 0));
            llDetachFromAvatar();
            llSetTimerEvent(0);
            return;
        }
        llSay(0, "Dimple donuts!!....nom nom nom");
        llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION | PERMISSION_ATTACH);
        llSetTimerEvent(0);
    }
}

secondlife/donut_dance.txt ยท Last modified: 2022/11/24 07:45 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.