Jump to content

Revoking permissions with Firestorm -- does it work?


Innula Zenovka
 Share

You are about to reply to a thread that has been inactive for 4473 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I've never tried this feature before, but, since I was wondering how it works, I put together this script to test it.

 

string anim1;
string anim2;
string current_anim;
integer toggle;
list gAnims;
default
{
    state_entry()
    {
       llSitTarget(<0.0,0.0,0.5>,ZERO_ROTATION);
       gAnims=[llGetInventoryName(INVENTORY_ANIMATION,0)]+[llGetInventoryName(INVENTORY_ANIMATION,1)];
    }
    
    changed(integer change){
        if(change & CHANGED_INVENTORY){
         gAnims=[llGetInventoryName(INVENTORY_ANIMATION,0)]+[llGetInventoryName(INVENTORY_ANIMATION,1)];
        }
        if(change & CHANGED_LINK){
            key k = llAvatarOnSitTarget();
            if(k){
                if(k==llGetPermissionsKey()){
                    llOwnerSay("don't need to request permisssions");
                    llStopAnimation("sit");
                    llStartAnimation(llList2String(gAnims,0));
                }
                else{
                    llOwnerSay("need to request permissions");
                    llRequestPermissions(k,PERMISSION_TRIGGER_ANIMATION);
                } 
                
            }
        }
    }
    
    run_time_permissions(integer perm){
        if(perm & PERMISSION_TRIGGER_ANIMATION){
            llStopAnimation("sit");
            llStartAnimation(llList2String(gAnims,0));
        }
    }

    touch_start(integer total_number)
    {
        if(llGetPermissions()&PERMISSION_TRIGGER_ANIMATION){
             if(current_anim==""){
                 current_anim="stand";
             }
             toggle=!toggle;
             llStopAnimation(current_anim);
             current_anim=llList2String(gAnims,toggle);
             llStartAnimation(current_anim);
        }
    }
}

 

It behaves as expected in V3 -- that is, the first time I sit down, it says "need to request permissions" and animates me, but each subsequent time -- unless someone else sits on it in the meantime -- it says "don't need to request permissions" and animates me.   

And if I stand up, and touch it, it toggles between the two animations, without asking my permission to do anything.

However, it behaves in exactly the same way in Firestorm, no matter what I do with  the "revoke permissons" buttons that viewer has, except when I stand it stops the animation that's currently playing.   But it still animates me when I touch it, without asking me anything, and still says "don't need to request permissions" the next time I sit down.

Is there something wrong with my logic here, or does "Revoke Permissions" in this context actually mean no more than "Stop the current animation"?

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4473 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...