Jump to content

How To Attach a landmark to a sign, so when people click it , it teleports them to my shop?


Luxz Blessed
 Share

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

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

Recommended Posts

You can't directly teleport people as a result of a touch event (unless they use RLV), so you'll need to look at llMapDestination or have the item use llRegionSayTo or an IM to ask them to click on a slurl in the chat history.

You can fake teleport people on the same sim with a variety of methods, or (under some circumstances) to an adjacent one, by having them touch things, though.   Which are you trying to do?

Link to comment
Share on other sites

This is the most simple solution. Just drop this script into a prim together with a landmark. It hands out the landmark when the prim is clicked:

 

default{    touch_start(integer total_number)    {        llGiveInventory(llDetectedKey(0), llGetInventoryName(INVENTORY_LANDMARK,0));    }}

 

The following script (courtesy of Cherry Hainsworth) opens the world map with the teleport destination instead. It also requires a landmark. This is as close to direct cross-sim teleporting as it gets, but some third party viewers allow the user to disable llMapDestination as a form of spam protection:

 

// Map teleport.// Cherry Hainsworth, November 2007GlobalMapDestination(vector position, vector lookat){    vector c = llGetRegionCorner();    llMapDestination(llGetRegionName(), position - c, lookat - c);}key request;string name;string sim_name;vector pos;default{    state_entry()    {        llSetStatus(STATUS_BLOCK_GRAB, TRUE);        llSetSitText("  ");        llSetTouchText("Teleport");        llAllowInventoryDrop(1);        if(llGetInventoryNumber(INVENTORY_LANDMARK))        {            name = llGetInventoryName(INVENTORY_LANDMARK,0);            request = llRequestInventoryData(name);        }        else            llWhisper(0,"Please drop a landmark on me");    }    dataserver(key id, string data)    {        if(id == request)        {            pos = (vector)data;            sim_name = llGetRegionName();            llSetText("Touch to go to " + name ,<1.0,1.0,1.0>,0.65);        }    }    touch_start(integer a)    {        if(name != "")            llMapDestination(sim_name, pos, pos);    }    changed(integer a)    {        if(a & (CHANGED_INVENTORY | CHANGED_ALLOWED_DROP))            if(llGetInventoryNumber(INVENTORY_LANDMARK))                request = llRequestInventoryData(name = llGetInventoryName(INVENTORY_LANDMARK,0));    }}

 

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4634 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...