Jump to content

MonicaBahaghari

Resident
  • Posts

    4
  • Joined

  • Last visited

Posts posted by MonicaBahaghari

  1. 18 minutes ago, KT Kingsley said:

    According to the wiki entry for llMapDestination (http://wiki.secondlife.com/wiki/LlMapDestination) this function only works in touch events or if the script is attached to the avatar.

    How about foregoing the Yes/No dialog, which doesn't really add anything to the interaction, and just opening the map when the avatar clicks on the object? Or, perhaps, using the viewer URI namespace thingy that'll chat a clickable link which opens the Place Details window with its map and teleport buttons:

    llRegionSayTo (user, PUBLIC_CHANNEL, "Click: secondlife://Perlanera/248/146/3694");

    or

    (llGetOwner (), PUBLIC_CHANNEL, "Click: secondlife:///app/teleport/Perlanera/248/146/3694");

    or

    llRegionSayTo (llGetOwner (), PUBLIC_CHANNEL, "Click: secondlife:///app/worldmap/Perlanera/248/146/3694");

    I see. I was planning to put this script in a rental vendor so that once they click it a dialog box with some brief text / information about what they on the vendor with 2 buttons at bottom area to teleport back to the office (option 1) or just close the dialog box with no further action (option 2) because the vendor itself immediately opens the world map once clicked. I'm just giving it a try if I can combine the 2 scripts from the open source but I guess this is too complicated for me given my very newbie level of scripting knowledge. Lol. Thanks for the reply.

  2. Hi. I'm not a scripter. Just trying to edit and combine some codes from open sources. Basically what I'm trying to achieve is when the object is touched, a dialog will appear and when certain option / answer is clicked the Map Destination opens. I did not get any error message when I saved the script but the "llMapDestination" command is seemingly being ignored in the "if" clause. When I tried it with "llSay", it worked just fine. My scripting skills is very basic and limited to editing only so I definitely must be missing something.

     

    * This one worked *

    integer gListener;
     
    default
    {
        touch_start(integer total_number)
        {
            llListenRemove(gListener);
            key user = llDetectedKey(0);
            gListener = llListen(-99, "", user, "");
            llDialog(user, "\nDo you want to use the World Map?", ["Yes", "No" ] , -99);
            llSetTimerEvent(60.0);
        }
        listen(integer chan, string name, key id, string msg)
        {
            if (msg == "Yes")
            {
            llSay(0, "It worked!");
            }
            llSetTimerEvent(0.1);        
        }
        timer()
        {
            llListenRemove(gListener);
            llSetTimerEvent(0.0);
        }
    }

    image.png.26b86628584a335944055892b7269b77.png

    -----------------------------------------------------

    * This one didn't work, no error but world map doesn't open *

     
    integer gListener;
     
    default
    {
        touch_start(integer total_number)
        {
            llListenRemove(gListener);
            key user = llDetectedKey(0);
            gListener = llListen(-99, "", user, "");
            llDialog(user, "\nDo you want to use the World Map?", ["Yes", "No" ] , -99);
            llSetTimerEvent(60.0);
        }
        listen(integer chan, string name, key id, string msg)
        {
            if (msg == "Yes")
            {
            llMapDestination("Perlanera", <248.0, 146.0, 3694.0>, ZERO_VECTOR);
            }
            llSetTimerEvent(0.1);        
        }
        timer()
        {
            llListenRemove(gListener);
            llSetTimerEvent(0.0);
        }
    }

×
×
  • Create New...