Jump to content

Touch Side X -> Go to URL X


iAntonio Vyper
 Share

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

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

Recommended Posts

Hello everyone, I'm trying to realize the following idea but I can't find the right way. Using this basic script, I would create something like a 'social icons dock' avoiding to use 1 touchable prim for every URL, so a 5 sides display (1 prim) could be the lowest prim solution.

 

//_____________________

string Url = "https:/exampleURL";

default {
        
    on_rez(integer start_param) {
        llResetScript();
    }

    touch_start(integer total_number) {
        llLoadURL(llDetectedKey(0), "*********Some text here!********", Url);
    }
    
    dataserver(key queryid, string data) {
        Url = "https://www..com" + llEscapeURL(data);
    }
}

//_____________________

 

How I could improve it to do something like:

touch side 1 => url1

touch side 2 => url2

...

touch side 5 => url5

?

Thanks for reading. :womanhappy:

Link to comment
Share on other sites


iAntonio Vyper wrote:

Thank you, five IF and I've completed it :robothappy: 

There's an easier way.  A prim can have only a finite number of sides, starting at 0.  A list of URLs starts at element 0, too.  So... not so many ifs needed, really.

(I was all ready for this thread to be about the absurd 10-second sleep incurred by the llLoadURL() call, or one of its other misfeatures.)

Link to comment
Share on other sites

  • 2 months later...
You are about to reply to a thread that has been inactive for 4719 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...