Jump to content

llLoadURL on rez ??


JenniferC String
 Share

Recommended Posts

Hi. Im not so good in scripting so far :)  So i would need your help please^^

I have the script to load an URL on touch. Means when someone touches the prim a menu pops up and you can choose if you want to go to the page or you can cancel.

 

string text = "Visit my Website";
string url = "http://MyWebsite.com"; //must include 'http://'

default
{
    touch_start(integer num_detected)
    {
        llLoadURL(llDetectedKey(0), text, url);
    }
}
 

 

I just wanted to ask if its possible to get the same effect (the upcoming menu) on rezz. ?? So when someone rezzes a prim the menu pops up and you ccan choose if you want to go to the site or cancel.

If its possible what do i need to change in the script ?

 

Thanks much for your help <3

Link to comment
Share on other sites

Simply move the load function to the on_rez event

string text = "Visit my Website";string url = "http://MyWebsite.com"; //must include 'http://'default{    on_rez(integer start_param)    {        llLoadURL(llGetOwner(), text, url);    }}

 Since the rez event doesn't pass a parameter that gives you a key of an ava, you have to use a different way to pass a key - most likely this would be the owner as in the example

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...