Jump to content

llLoadURL on rez ??


JenniferC String
 Share

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

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

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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...