Jump to content

LoadURL when you sit


Alexus Minotaur
 Share

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

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

Recommended Posts

Hello everybody, I have several years in SL but I'm just starting to learn the LSL.

I was wondering if it's possible to use the load url function but trigger it only when an user is sit on an object. For example the user sits on a chair and the url popup window appears.

 

Any idea how to do this?

Thanks.

Link to comment
Share on other sites

Of course.  llLoadURL is just another function.  You can put it in any event you wish.  In this case, put it in the changed event and only activate it if an avatar sits:

changed (integer change)
{
    if (change & CHANGED_LINK)
    {
        key kAv = llAvatarOnSitTarget();
        if ( kAv != NULL_KEY)
        {
            llLoadURL (kAv,"My web page", "http://my_webpage.com");
        }
    }
}

 

  • Like 1
Link to comment
Share on other sites

On 22/3/2018 at 7:07 PM, Rolig Loon said:

Of course.  llLoadURL is just another function.  You can put it in any event you wish.  In this case, put it in the changed event and only activate it if an avatar sits:


changed (integer change)
{
    if (change & CHANGED_LINK)
    {
        key kAv = llAvatarOnSitTarget();
        if ( kAv != NULL_KEY)
        {
            llLoadURL (kAv,"My web page", "http://my_webpage.com");
        }
    }
}

 

Thank you for your answer @Rolig Loon. I tried your example but nothing happens. Maybe I'm doing something wrong? I added the default { at the begining to properly run your script.

Link to comment
Share on other sites

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