Table of Contents

About

Huggable toys are created using an animation applier script and an animation that raises the arm of the avatar for the visual effect. An example script can be found in the code section and is responsible for nothing more other than applying the animation.

Animation

The animation in BVH format used:

Code

///////////////////////////////////////////////////////////////////////////
//  Copyright (C) Wizardry and Steamworks 2021 - License: GNU GPLv3      //
//  Please see: http://www.gnu.org/licenses/gpl.html for legal details,  //
//  rights of fair usage, the disclaimer and warranty conditions.        //
///////////////////////////////////////////////////////////////////////////
 
default
{
    state_entry() {
        llSetTimerEvent(1);
    }
    run_time_permissions(integer perm) {
        if (perm & PERMISSION_TRIGGER_ANIMATION) {
            llStartAnimation(
                llGetInventoryName(
                    INVENTORY_ANIMATION, 
                    0
                )
            );
        }
    }
    timer() {
        llRequestPermissions(
            llGetOwner(), 
            PERMISSION_TRIGGER_ANIMATION
        );
    }
    changed(integer change) {
        llResetScript();
    }
    on_rez(integer num) {
        llResetScript();
    }
}

secondlife/huggable_toys.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.