Jump to content

Using llTeleportgent in an Experience


Founder Helix
 Share

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

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

Recommended Posts

Hi there

I am experimenting with experiences, and have sucessfully got a system that attaches a HUDwithin my experience, and monitors a health value.

 

Has anyone got a workign example of how to set up a teleport within an experience. ie. I would like somone who has acceted permissions to teleport when they stop on a plate, or be teleported to a location when their health reaches zero.

 

I have tried doing this myself, but keep getting an error: "Script trying to teleport other avatars!"

 

Can anyone help?

Link to comment
Share on other sites

Yes, that's an annoyingly unhelpful error messge. In general, the clean way to use llTeleportAgent or other functions that depend on the user being in an Experience is to be sure that the function call is in the experience_permissions event in your script and that you have identified the av unambiguously. So, something like this ....

default{    collision_start(integer num)    {        key Av = llDetectedKey(0);        llRequestExperiencePermissions(Av,"");    }    experience_permissions (key av)    {        llTeleportAgent(av, "", <128,128,22>, ZERO_VECTOR);    }}

And then be sure that your script is actually in the Experience, of course.  I have sometimes been able to get away with calling llTeleportAgent or llStartAnimation or llTakeControls outside of an experience_permissions event, but I have more often had confusing error messages like yours. 

Also, be aware that teleports appear to be throttled, so that you get the message "Too many llTeleportAgent requests received" or words to that effect if you try to move an av too quickly after a previous TP.  I've had that happen when one script TP's an av to Spot A and the detector at Spot A tries to TP him immediately to Spot B.

 

Link to comment
Share on other sites

Maybe show us the code that's causing trouble?

I don't specifically recognize that error message, so I'm not sure this is the problem, but in case it isn't obvious: a script that uses Experience permissions must request of Experience-enrolled agents the permissions it will use. (That is, an agent being enrolled in the Experience for which a script is compiled doesn't mean that script automatically gets permissions without requesting them of each individual agent -- just that those requests won't need to be approved by the agent.)

Link to comment
Share on other sites

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...