Page 1 of 1

Script clickable button to send a differet MOAP to a web address?

Posted: Sat Feb 19, 2022 3:44 pm
by Lunk Portal
Hey everyone, just setting up a display for one of my shops, and I have the home address set with MOAP script, but after someone surfs around the site I need an easy way to return the display to the first page again.

I would like to have a single prim "button" that sends the display back to page 1 web address when touched.

I've been away from scripting for years, and know this is possible, I just cannot for the life of me remember how.

Thanks

Re: Script clickable button to send a differet MOAP to a web address?

Posted: Sun Feb 20, 2022 3:02 am
by Gusher Castaignede
You might want to ask at SL scripting forums, you'll get better response, but don't
mention opensim, some of those people down there are biased over opensim,
though mostly all script examples are compatible...

Re: Script clickable button to send a differet MOAP to a web address?

Posted: Sun Feb 20, 2022 10:29 am
by Graham Mills
Lunk Portal wrote: Sat Feb 19, 2022 3:44 pm Hey everyone, just setting up a display for one of my shops, and I have the home address set with MOAP script, but after someone surfs around the site I need an easy way to return the display to the first page again.

I would like to have a single prim "button" that sends the display back to page 1 web address when touched.

I've been away from scripting for years, and know this is possible, I just cannot for the life of me remember how.

Thanks
Assumes two prim linkset with MOAP on face 1 of root. Insert code in linked button prim. Change URL to suit.

Code: Select all

integer FACE = 1;
string URL = "https://www.bbc.co.uk/news" ;

default
{

    touch_start(integer n)
    {
        llSetLinkMedia(LINK_ROOT, FACE, [PRIM_MEDIA_CURRENT_URL, URL]);
    } 
}

Re: Script clickable button to send a differet MOAP to a web address?

Posted: Sun Feb 20, 2022 11:58 am
by Lunk Portal
Thank you! I'll have to try this after church today! I appreciate it.

Re: Script clickable button to send a differet MOAP to a web address?

Posted: Sun Feb 20, 2022 12:27 pm
by Graham Mills
Lunk Portal wrote: Sun Feb 20, 2022 11:58 am Thank you! I'll have to try this after church today! I appreciate it.
Very basic, no error handling but it will get you started.

Re: Script clickable button to send a differet MOAP to a web address?

Posted: Sun Feb 20, 2022 1:20 pm
by Selby Evans
On my place, Creative Collaborators, you can pick up a MOAP panel that is scripted to reset itself to a specified url every 15 minutes or so. It should be free to copy