Who Is Online

1
Online

Friday, 17 November 2017 22:53

Animate on Attach

This script will animate your avatar when attached and then loop the animation.  All you need to do is change the name of the animation:

// Basic Animation / Attachment 1.0
// Catherine Omega Heavy Industries
// Heavily modified by ArchTx Edo who is fully responsible for any stupid mistakes.

string gAnimName = "express_open_mouth"; // what animation to play?

default
{
state_entry()
{
llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); // ask the owner for permission to trigger animations
llSetTimerEvent(0.5);//I added this line.
//llStartAnimation(gAnimName);

}

on_rez(integer param)
{
llResetScript(); // reset the script as soon as it starts.
}

attach(key id)
{
integer perm = llGetPermissions();

if (id != NULL_KEY) // make sure we're actually attached.
{ 
if (! (perm & PERMISSION_TRIGGER_ANIMATION)) // remember to use bitwise operators!
{
llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); // request permissions from the owner.
} 
}
else
{
if (perm & PERMISSION_TRIGGER_ANIMATION)
{
llStopAnimation(gAnimName); // stop the animation

}
}
}
timer()
        {
        llStopAnimation(gAnimName);
        llStartAnimation(gAnimName);
        }
}

 

Flash Scratch to SL - Your Scripting Tool

Script ImageNeed to write a LSL script and don't know how to script?  I know I hate trying to get my head around LSLS when I an in a time crunch. So why not give Flash Scratch a try! Its a great tool for learning and scoding your own scripts for Second Life without having to pay someone to do it and without a crash course in LSL

A Huge thanks to John Bennet of ATLAS Institute at University of Colorado and Eric Rosenbaum at MIT for writing Scratch for SL to begin with.

Read more: Flash Scratch to SL - Your Scripting Tool