[sldev] Teleportation woes

Soft Linden soft at lindenlab.com
Sun Sep 16 09:31:21 PDT 2007


On 9/14/07, Michael Miller <1337mail at gmail.com> wrote:
> I'm trying to get my client to automatically teleport to a location at
> the start of the game. The jist of the code is as such:
>
> if(gStartupState == STATE_STARTED)
> gAgent.teleportViaLocation(LLVector3d(98,143,120));
>
> This(the teleportViaLocation method) generates the following message:
>
> 2007-09-15T01:00:09Z WARNING: teleportViaLocation: Using deprecated
> teleportlocationrequest.
> 2007-09-15T01:00:09Z WARNING: createXml: Alert: [CouldNotTeleportReason]
> 2007-09-15T01:00:09Z WARNING: createDialog: Alert: Could not teleport.
> Problem encountered processing your teleport request. You may
>                         need to log back in before you can teleport. If you continue
>                         to get  this message, please check the Tech Support FAQ at:
>                         www.secondlife.com/support
>
> I have even tried waiting 60 seconds(while the game is fully running
> for some time) before executing this request. Is this due to the
> teleportViaLocation method? Am I calling it correctly? Should I be
> calling something else?

With this kind of question, I usually start by asking where the code
does something similar to what I want. Teleporting via the map dialog
would seem to do it exactly, so I'd begin by looking at what happens
when you click "teleport" there. The easiest way to find that code is
to find the map UI file by searching for a visible string in the UI
descriptions in indra/newview/skins/xui/en-us. "Copy slurl to
clipboard" looks like a pretty unique string.

When you find that file, look for two things. First, the name of the
file. Somewhere in the code there will be a call to buildFloater()
that takes the filename as an argument. Searching for this should get
you to the right file. Also, inside the UI description file, look for
the "Teleport" string. The element that identifies the label attribute
(the visible part) will also have a name attribute, which is used for
identifying that button in code. Search for that name in the source
file that builds up that floater.

>From there, you should see code that sets up a callback for when the
teleport button is clicked. All you have to do now is set a breakpoint
on the callback function and follow through in the debugger. That
should put you right on top of the most current location teleport
logic.


More information about the SLDev mailing list