Jump to content

What is the use of llTeleportAgent?


Dora Gustafson
 Share

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

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

Recommended Posts

I'm still hoping -- possibly without much good cause -- that, once LL is satisfied all the bugs with permissions are sorted out, they'll revert to letting the object tp anyone who gives it permission.   That was, as I recall, how it worked on Magnum before they had to roll it back after the fiasco a few weeks ago.

 

Link to comment
Share on other sites

Right now it seems like it's fairly useless for any kind of public teleporter like for example the stargate network. Worse, you can't give people a temp HUD since it specifically excludes that as well.

I suppose in group RP it could be useful if everyone had a HUD/attachment that'd teleport the owner, and a central "server" that just communicates the target destinations.

My hope is that it's a temporary restriction. But since LL isn't talking... I'm not holding my breath. Classic communication fail - again.

Link to comment
Share on other sites


Loki Eliot wrote:

Currently yud have to do a work around where llAttachToAvatarTemp attaches a HUD or object that contains the llTeleportAgent script then trigger the attached object by some means?

Temporary attach with llAttachToAvatarTemp will not work with llTeleportAgent

What we have got is this function:

llTeleportOwner( string landmark, vector position, vector look_at );

Agent == Owner; always

Link to comment
Share on other sites

There is actually one use for it at the moment... RLV teleports without the need of an RLV client. I've just used that to write a stargate-HUD that allows me to just walk through stargates, no clicky needed. All I did was listen for the RLV TP command. Not really a secure way to do it, good enough for testing though.

Link to comment
Share on other sites

  • 2 weeks later...
  • 5 months later...

I agree its of little use without allowing the obvious, but I'd like to throw in another "wish".  That is, if the landmark name is a region and not an inventory item then that region plus the co-ords are used to TP the av to that position in that region. That way we can teleport anywhere without the need to create a LM and update the object - I think that would be a requirement for the Stargate to work properly too.

Link to comment
Share on other sites

See llTeleportAgentGlobalCoords() ... which reminds me: I don't see why I'd ever need llTeleportAgent when I have the -GlobalCoords() version, together with llRequestInventoryData() ... unless maybe at one time there was to have been some distinction in permissions required.

(ETA: Now thinking it may not be obvious: use llRequestSimulatorData() to get global coords for a sim name.)

Link to comment
Share on other sites

Yeah, there is a way but it's not pretty at all, and it's complicated by the fact that LL apparently broke the MapAPI cap (see also this discussion)

Anyway, here's how I ended up extracting the target vectors from a landmark, when I can't be sure what the landmark is going to be called:

 

key gLandmarkQuery;key gLocationCoordsQuery;key gWebQuery;vector gGlobalCoordinates;vector gRegionCoordinates;vector coordinates;default {    touch_start(integer num_detected) {        if (llGetInventoryNumber(INVENTORY_LANDMARK)) { // got a landmark?            gLandmarkQuery = llRequestInventoryData(llGetInventoryName(INVENTORY_LANDMARK, 0));        }    }    dataserver(key queryid, string data) {        if (queryid == gLandmarkQuery) {            coordinates = (vector)data + llGetRegionCorner();            gGlobalCoordinates = coordinates / 256;            string coordsX = (string)((integer)gGlobalCoordinates.x);            string coordsY = (string)((integer)gGlobalCoordinates.y);            gWebQuery = llHTTPRequest(//uses Tyche Shepherd's Gridsurvey.com API                "http://api.gridsurvey.com/simquery.php?xy="+coordsX+","+coordsY+"&item=name",                [],""                    );        }        else if (queryid == gLocationCoordsQuery){            llOwnerSay("location coords are "+data);            gGlobalCoordinates =(vector)data;            gRegionCoordinates.x = (integer)coordinates.x - (gGlobalCoordinates.x);            gRegionCoordinates.y = (integer) coordinates.y - (gGlobalCoordinates.y);            gRegionCoordinates.z = (integer) coordinates.z;            llOwnerSay("region coordinates are "+(string)gRegionCoordinates);            llRequestPermissions(llGetOwner(),PERMISSION_TELEPORT);        }    }    run_time_permissions(integer permissions)    {        if(permissions & PERMISSION_TELEPORT){            llTeleportAgentGlobalCoords(llGetOwner(),gGlobalCoordinates,gRegionCoordinates,ZERO_VECTOR);        }    }    http_response(key request_id, integer status, list metadata, string body) {        if (request_id == gWebQuery) {            llOwnerSay(body);            if(llGetSubString(body,0,4)=="Error"){                llOwnerSay("Unknown Region");                return;            }            string destination = llDumpList2String(llParseString2List(body,["+"],[])," ");            gLocationCoordsQuery = llRequestSimulatorData(destination,DATA_SIM_POS);        }    }}

 

Link to comment
Share on other sites

Oh, I'm far too lazy for that.  How 'bout this?

key landmarkQueryID;key teleportee;vector globalCoords;vector regionCoords;default{    touch_start(integer total_number)    {        string landmarkName = llGetInventoryName(INVENTORY_LANDMARK, 0);        if ("" == landmarkName)            llWhisper(DEBUG_CHANNEL, "No landmark");        else        {            teleportee = llDetectedKey(0);  // as if it could be anybody but owner            landmarkQueryID = llRequestInventoryData(landmarkName);        }    }    dataserver(key queryid, string data)    {        if (landmarkQueryID != queryid)            return;        vector coords = (vector)data + llGetRegionCorner();        regionCoords = <(float)((integer)(coords.x) % 256), (float)((integer)(coords.y) % 256), coords.z>;        globalCoords = coords - regionCoords;        llRequestPermissions(teleportee, PERMISSION_TELEPORT);    }    run_time_permissions(integer perms)    {        if (PERMISSION_TELEPORT & perms)            llTeleportAgentGlobalCoords(teleportee, globalCoords, regionCoords, ZERO_VECTOR);    }}

 

(Embarrassed to ask at this late date: How do you all get the snazzy syntax highlighting on embedded code samples? I must have been out sick the day they taught that. :matte-motes-bashful-cute:)

Link to comment
Share on other sites

  • 4 months later...
You are about to reply to a thread that has been inactive for 3981 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...