Jump to content
ItHadToComeToThis

Bug in using mouselook left click with an experience?

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

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

Recommended Posts

Posted (edited)

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

Share this post


Link to post
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);
        }
    }

 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Very odd indeed.  It really does work as designed when I try it. It's a mystery.  Maybe it will fail for someone else.  I'm off to bed at the moment but I'll have my alt try again in the morning.

Share this post


Link to post
Share on other sites
Posted (edited)

This is why it can be helpful to check the jira for issues relating to scripting bugs.

See this and related issues.

The workaround has been to request run-time perms on attach instead.

Edited by Lucia Nightfire
  • Thanks 1

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 73 days.

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...