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

Creating scripts
Post Reply
User avatar
Lunk Portal
Posts: 133
Joined: Wed Jan 26, 2022 10:03 am
Location: Northern Michigan
Has thanked: 92 times
Been thanked: 141 times
Contact:

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

Post 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
These users thanked the author Lunk Portal for the post (total 2):
Ilan TochnerGusher Castaignede
B. A. Shields (Lunk Portal)
TatooineRP Region
TatooineRP Website
Kitely Market - Lunk's Loot
My Novels and other Projects
https://linktr.ee/bashields
User avatar
Gusher Castaignede
Posts: 258
Joined: Tue Mar 17, 2015 10:03 pm
Has thanked: 285 times
Been thanked: 250 times

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

Post 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...
These users thanked the author Gusher Castaignede for the post:
Lunk Portal
Image
"lnteractivity, Variety, Ease of Use"
Visit my store at Country Manor
Graham Mills
Posts: 1314
Joined: Sun Dec 23, 2012 2:26 pm
Has thanked: 1134 times
Been thanked: 1141 times

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

Post 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]);
    } 
}
These users thanked the author Graham Mills for the post (total 2):
Lunk PortalShandon Loring
User avatar
Lunk Portal
Posts: 133
Joined: Wed Jan 26, 2022 10:03 am
Location: Northern Michigan
Has thanked: 92 times
Been thanked: 141 times
Contact:

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

Post by Lunk Portal »

Thank you! I'll have to try this after church today! I appreciate it.
These users thanked the author Lunk Portal for the post:
Graham Mills
B. A. Shields (Lunk Portal)
TatooineRP Region
TatooineRP Website
Kitely Market - Lunk's Loot
My Novels and other Projects
https://linktr.ee/bashields
Graham Mills
Posts: 1314
Joined: Sun Dec 23, 2012 2:26 pm
Has thanked: 1134 times
Been thanked: 1141 times

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

Post 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.
These users thanked the author Graham Mills for the post:
Ilan Tochner
User avatar
Selby Evans
Posts: 620
Joined: Wed Sep 04, 2013 6:00 pm
Has thanked: 1840 times
Been thanked: 822 times

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

Post 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
These users thanked the author Selby Evans for the post (total 5):
Ilan TochnerLunk PortalGraham MillsGusher CastaignedeShandon Loring
Post Reply