Don't click here unless you want to be banned.

LSL Wiki : LibraryNoticeGiver

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl809.us.archive.org

Notice Giver

If you ever want to communicate a message to everyone in your parcel, you can use this script to artificially form a notice for everyone in range.

NOTE- Think of it like a linden sending a notice to everyone, its like that, only its sim-limited
///////////Created by Joker Opus, December///////////
default
{
    touch_start(integer num_detected)
    {
        integer i;
        llSensorRepeat("",NULL_KEY,AGENT,512,2*PI,0.001);//This scans on touch
    }
    sensor(integer count) 
    { 
        integer count = 50;
        integer i; 
        for(i=0;i<count;i++)
        {
            llDialog(llDetectedKey(i), "Hi all, I am testing this!", ["Ok"], 12345); //This is dialog, it looks like a notice, and it says "Hi all, I am testing this!" and it has an [ok] for a button, indicating the notice look. and the OK gets rid of the pop up.
        }
    }
}

Up-to-date version... Seems to me like the above version would send many messages...

///////////Created by Joker Opus, December///////////
default
{
    touch_start(integer num_detected)
    {
        llSensor("", NULL_KEY, AGENT, 96, PI); //This scans on touch
    }
    sensor(integer total_number)
    {
        integer current_agent;
        for (current_agent = 0; current_agent < total_number; current_agent++) llDialog(llDetectedKey(current_agent), "Your message here", ["Ok"], -12345); //This is dialog, it looks like a notice, and it says your message and it has an [Ok] for a button, indicating the notice look. and the Ok gets rid of the pop up.
    }
}

ScriptLibrary
Comments [Hide comments/form]
llSensorRepeat("",NULL_KEY,AGENT,512,PI,0.001);
--PI searches all around (it searches that many radians around either side of the center line), no need for 2*PI

=remove the two following things:
integer count = 50;
--the sensor event sets count, this would just reset it and the loop would ALWAYS go through 50 interations instead of just going through the number needed as it would without this assignment

(the first) integer i;
--i can only assume it is left-over junk from a revision, 'i' is not used in that event, no need to initalize it
-- RejkpolG (2007-01-15 04:24:29)
Attach a comment to this page: