Jump to content

Bug in using mouselook left click with an experience?


ItHadToComeToThis
 Share

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

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

Recommended Posts

So, after coming up against some issues I wrote a small test script to make sure that there wasn't an error in the system I am working on.

So here is the script....

default{
    attach(key av){
        if(av){
            //Tried with llGetOwner also
            llRequestExperiencePermissions(av,"");
        }
    }
    experience_permissions(key user){
        if(user){
            //This runs
            llTakeControls(CONTROL_ML_LBUTTON,TRUE,TRUE);
        }
    }
    experience_permissions_denied(key user, integer reason){
        //No errors returned
        llOwnerSay((string)reason);
    }
    control(key id, integer level, integer edge){
        //This doesnt
        integer p=level&edge;
        if(p&CONTROL_ML_LBUTTON){
            llOwnerSay("Working");
        }
    }
}

It grants the experience, it runs the llTakeControls, however, mouse look left click just is not working.

The script is enabled for an experience, the experience is enabled on the land.

I can't see any reason why this is not working

 

**Edit**

This script runs fine if you use a normal permissions request instead of the experience permissions request

Edited by ItHadToComeToThis
Link to comment
Share on other sites

Odd.  It works fine for me.  I just slapped your script into a prim, attached it as a HUD, went into mouselook, and clicked left.  I got the message "Working".  I can make it fail in either of two ways: (1) By failing to set it into an experience or (2) By restarting the script after it has attached.

Try adding an llOwnerSay diagnostic in the experience_permissions event to be sure that you are actually activating llTakeControls

experience_permissions(key user){
        if(user){
            //This runs
            llOwnerSay("Taking controls");
            llTakeControls(CONTROL_ML_LBUTTON,TRUE,TRUE);
        }
    }

 

Link to comment
Share on other sites

2 hours ago, Rolig Loon said:

Odd.  It works fine for me.  I just slapped your script into a prim, attached it as a HUD, went into mouselook, and clicked left.  I got the message "Working".  I can make it fail in either of two ways: (1) By failing to set it into an experience or (2) By restarting the script after it has attached.

Try adding an llOwnerSay diagnostic in the experience_permissions event to be sure that you are actually activating llTakeControls


experience_permissions(key user){
        if(user){
            //This runs
            llOwnerSay("Taking controls");
            llTakeControls(CONTROL_ML_LBUTTON,TRUE,TRUE);
        }
    }

 

I did, it says "Taking controls" but still doesn't work. The script compiled for an experience. I just can not get mouse look left click to work with experience permissions. The more I try the more I have a vague memory of this being an issue at some point in the past for others

Link to comment
Share on other sites

Hm, there's a sense of ambivalence with this.

On the one hand I'm happy I am not going crazy.

On the other hand im sad that it was reported five flipping years ago and still hasn't been fixed.

Thank you for your responses though. I found a work around by requesting run time perms when I needed to use the mouse look left click and then calling experience perms once more to work the other features of the script immediately after. Bit of a pain but it now works

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1450 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...