[Opensim-users] Fucntion to read a landmark

M.E. Verhagen marceled9 at gmail.com
Sun Mar 11 11:48:26 UTC 2012


Ah that is cool, apparently hg landmarks are saved :)

There seems to be no lsl function the get the description of an inventory
object, so you can not get the hg adres out of the landmark.

You have to recalculate the global to local coordinates. You can do that
with some script like this:

key requestid;
string name;
default
{
    state_entry()
    {
        //request the LM data
        name = llGetInventoryName(INVENTORY_LANDMARK, 0);
        requestid = llRequestInventoryData(name);
    }
    dataserver(key id, string data)
    {
        if (id == requestid)
        {
            vector dest = (vector)data;
            float globalcoordx=dest.x;
            integer localx = (integer)globalcoordx/256;
            float localcoordx = globalcoordx - (localx*256);
            float globalcoordy=dest.y;
            integer localy = (integer)globalcoordy/256;
            float localcoordy = globalcoordy - (localy*256);
            llSay(0, "Teleport to " + name);
            llSay(0, "x coord " +(string) localcoordx);
            llSay(0, "y coord " +(string) localcoordy);
            llSay(0, "z coord " +(string) dest.z);

        }
    }
}

2012/3/11 Gudule Lapointe <gudule at spekuloos.be>

> Hum. If I am in another grid, and try to add a landmark
> - the landmark is created
> - the landmark works when I use it from my grid
> - it's name begins with "HG"…
>
> Particularly last point confirms that not only there are HG landmarks, but
> also that OpenSim handle them by design.
>
> --
> http://www.speculoos.net/
> secondlife://speculoos.net:8002/
> Speculoos, the belgian cookie-flavored metaverse
>
> Le 11 mars 2012 à 01:06, M.E. Verhagen a écrit :
>
> there aren't hypergrid landmarks yet
>
>
>
> 2012/3/10, Miller, Peter <pmiller at liverpool.ac.uk>:
>
> That wasn't the question you asked ;)
>
>
>
>
> You could manually encode the extra info in the landmark name and retrieve
>
> it using llGetInventoryName. Can't help beyond that.
>
>
>
>
> Best wishes
>
>
>
>
> Peter
>
>
>
>
> ________________________________
>
> From: opensim-users-bounces at lists.berlios.de
>
> [opensim-users-bounces at lists.berlios.de] on behalf of Gudule Lapointe
>
> [gudule at spekuloos.be]
>
> Sent: 10 March 2012 18:57
>
> To: opensim-users at lists.berlios.de
>
> Subject: [Opensim-users] Fucntion to read a landmark
>
>
> Is there a way to read the coordinates of a landmark from within a script?
>
>
> I made several flavors of blame gates and I would like to be able to drop a
>
> landmark in the prim instead of encoding the uri
>
>
>
>
>
> --
>
> http://www.speculoos.net/
>
>
> secondlife://speculoos.net:8002/<https://owa.liv.ac.uk/owa/UrlBlockedError.aspx>
>
> Speculoos, the belgian cookie-flavored metaverse
>
>
>
>
>
> --
> Groningen en Hannover Opensims:   secondlife://meverhagen.nl:8002:Hannover
> ZW/
> _______________________________________________
> Opensim-users mailing list
> Opensim-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-users
>
>
>
> _______________________________________________
> Opensim-users mailing list
> Opensim-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-users
>
>


-- 
Groningen en Hannover Opensims:   secondlife://meverhagen.nl:8002:Hannover
ZW/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-users/attachments/20120311/2e9236ee/attachment.html>


More information about the Opensim-users mailing list