Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

animation touch help

Linnian Sugar
Registered User
Join date: 30 Mar 2005
Posts: 31
08-26-2006 11:13
I just want it to animate who ever touches it so I can let people preview animations at my store. when ever I touch it it asks for permision and gives an error that it can't play animation without permissions set but if you click yes and ckick it again it plays the anim but does every thing else over again compleatly ignoring the if() statements.

CODE

integer perm;
default
{
state_entry()
{
perm = 1;
}
touch_start(integer total_number)
{
if(perm == 1)
{
perm = 2;
llRequestPermissions(llDetectedKey(0),PERMISSION_TRIGGER_ANIMATION);
}

if(perm == 2 && PERMISSION_TRIGGER_ANIMATION)
{
llStartAnimation("drill dig");
llResetScript();
}
}


}


I don't need a long explanation just show me what this script should look like in PHP code
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
08-26-2006 12:23
CODE

run_time_permissions(integer perm)
{
if(perm & PERMISSION_TRIGGER_ANIMATION)
{
llStartAnimation("drill dig");
}
else return;
}


accepting permissions is a totally different event

and get rid of all the extra integer perm's :) its handled by the event
Linnian Sugar
Registered User
Join date: 30 Mar 2005
Posts: 31
08-26-2006 14:12
thankies