Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

[BUG-7159] [Experience Tools] llAgentInExperience() Returns FALSE for a script compiled for an experience on a region that doesn't have the experience "enabled". #14899

Closed
1 task
sl-service-account opened this issue Aug 30, 2014 · 4 comments

Comments

@sl-service-account
Copy link

sl-service-account commented Aug 30, 2014

Steps to Reproduce

vector my_desitnation = <128, 128, 45>;

key col_store_av;

default {
state_entry() {
llVolumeDetect(TRUE);
}

experience_permissions(key av) {
	llTeleportAgent(col_store_av, "", my_desitnation, <1.,1.,0.>);
}

experience_permissions_denied( key agent_id, integer reason) {
    llOwnerSay("Why do this?: " +  llGetExperienceErrorMessage(reason));
}

collision_start(integer num_detected) {
	col_store_av	= llDetectedKey(0);
	if (llAgentInExperience(col_store_av)) {
		llRequestExperiencePermissions(col_store_av, "");
	} else {
        llOwnerSay("Not in experience.");
    }
}

}

Actual Behavior

llAgentInExperience() Returns false on a region where the experience isn't Trusted, possibly "Banned" too, but I don't have a global key to test with.

Expected Behavior

I expected llAgentInExperience to return TRUE for a script compiled against that experience, because technically the avatar IS part of that experience – but the experience is disabled or not allowed on the region.

Instead, when running llRequestExperiencePermissions() I expected that to raise the experience_permissions_denied() event with XP_ERROR_NOT_PERMITTED.

The current way it works seems backwards and counter-intuitive.

Other information

Links

Related

Original Jira Fields
Field Value
Issue BUG-7159
Summary [Experience Tools] llAgentInExperience() Returns FALSE for a script compiled for an experience on a region that doesn't have the experience "enabled".
Type Bug
Priority Unset
Status Closed
Resolution Expected Behavior
Reporter NeoBokrug Elytis (neobokrug.elytis)
Created at 2014-08-30T20:06:38Z
Updated at 2014-12-16T01:24:36Z
{
  'Business Unit': ['Platform'],
  'Date of First Response': '2014-08-31T03:14:01.258-0500',
  'System': 'SL Simulator',
  'Target Viewer Version': 'viewer-development',
  'What just happened?': 'llAgentInExperience() Returns false on a region where the experience isn\'t Trusted, possibly "Banned" too, but I don\'t have a global key to test with.',
  'What were you doing when it happened?': "Scriptin', testin', etc.",
  'What were you expecting to happen instead?': 'I expected llAgentInExperience to return TRUE for a script compiled against that experience, because technically the avatar *IS* part of that experience -- but the experience is disabled or not allowed on the region.\r\n\r\nInstead, when running llRequestExperiencePermissions() I expected that to raise the experience_permissions_denied() event with XP_ERROR_NOT_PERMITTED.\r\n\r\nThe current way it works seems backwards and counter-intuitive.',
}
@sl-service-account
Copy link
Author

Lucia Nightfire commented at 2014-08-31T08:14:01Z

This is one of the many reasons I filed https://jira.secondlife.com/browse/BUG-6912

XP_ERROR_NOT_PERMITTED is returned with far too many conditions.

@sl-service-account
Copy link
Author

Maestro Linden commented at 2014-09-02T17:05:01Z

Looking at the spec for the function at https://wiki.secondlife.com/wiki/LlAgentInExperience ,

Returns a boolean (an integer) that is TRUE if the agent is in the experience and the experience can run in the current region.
Shouldn't it return FALSE since the experience cannot run in the current region?

@sl-service-account
Copy link
Author

NeoBokrug Elytis commented at 2014-09-02T17:34:05Z

You are correct, I did not read the description fully. But, knowing why an experience script doesn't work at a location would be very helpful. Because technically they ARE part of the experience, it's just that the script can't interpret why it can't act.

experience_permissions_denied() returns way more valuable information as to why a script cannot function, other than it just can't.

If content for an experience is going to be distributed grid wide (as I do) but only works at the experience enabled locations; I would like to let the user know that they must go to a certain area on the grid, instead of telling them that they're not (what the script would assume) part of the experience.

@sl-service-account
Copy link
Author

Maestro Linden commented at 2014-09-02T18:32:48Z

Okay, if BUG-6912 doesn't cover your use case, then I would recommend filing another issue as a feature request.

I believe that BUG-6912 wouldn't completely cover what you're trying to do; even though those functions would determine whether the location settings are blocking the experience (and causing llAgentInExperience() to return FALSE against any agent there), you still wouldn't know if the agent would be in the experience after moving into a more permissive location. Changing the spec of llAgentInExperience() is a possibility, but that would run a risk of breaking scripts which rely on existing behavior.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant