Jump to content

Glow on command script (with slight alteration.)


Shrouded Kytori
 Share

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

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

Recommended Posts

I can find a script that makes things glow on command but this is what i'm looking for...

 

The route prim always glows but has 5 other lights that will independantly glow on command, but leave the others as they are.

 

Kinda think of it like the phases of an alert system, both don't run at the same time and each one cancels all others out.  That's pretty much what i'm looking for, so if i say 'alert 1' the prim assigned to that will glow but alerts 2-5 will be nullified, if i say 'alert 3' alert 1,2,4 and 5 wont glow but only prim 3.

 

What sort of script does that because i really have no idea what to look for on Marketplace?

 

Getting people on the grid saying they'll do it for 500L is that about right?

Link to comment
Share on other sites

You're not going to find exactly what you want in Marketplace or anywhere else. You want a custom script, for your own specific needs. Writing a script like that should be very easy, though.  If you found a scripter willing to write it for L$500 (about $2 US), do it.

Link to comment
Share on other sites

Rolig, there is no script that can be written and fully tested under one hour, except for maybe "Hello world". There are might be someone who values their time at 2USD per hour or perhaps 4USD per hour if they are twice as fast as I am, but definitely not yours truly :)

Link to comment
Share on other sites


Ela Talaj wrote:

Rolig, there is no script that can be written and fully tested under one hour, except for maybe "Hello world". There are might be someone who values their time at 2USD per hour or perhaps 4USD per hour if they are twice as fast as I am, but definitely not yours truly
:)
I agree.  That's why I didn't volunteer to write it myself.  I can't afford to charge that little for a script, except as a favor for a friend. But if the OP can find a competent scripter who will work for that little, I won't stand in the way.  :smileywink:

Link to comment
Share on other sites

since this is a forum to help people with scripts,

here is a beginning for you...you will have to modify it

to get it to work :)

Add more "if" messages for the number of prims you have,

and notice that the root is link 1...so alert 1 will be changing link2 etc...

 

integer listen_handle;
default
{
    state_entry()
    {
      listen_handle = llListen(0, "", llGetOwner(), "");                                                         //turn on a listen
       llSetLinkPrimitiveParamsFast( LINK_ROOT,[ PRIM_GLOW,ALL_SIDES,1.0]) ; //set the root to glow
    }

    touch_start(integer total_number)
    {
        
    }
     listen( integer channel, string name, key id, string message )                     //the listen event to catch what was said
    {
       if(message == "alert 1")
       {
          
            llSetLinkPrimitiveParamsFast(LINK_ALL_CHILDREN,[ PRIM_GLOW,ALL_SIDES,0.0]); //turn all child glows off
            llSetLinkPrimitiveParamsFast( 2,[ PRIM_GLOW,ALL_SIDES,1.0]) ;         //change glow on prim 2,first one after root
       }
        if(message == "alert 2")
       {
           
            llSetLinkPrimitiveParamsFast(LINK_ALL_CHILDREN,[ PRIM_GLOW,ALL_SIDES,0.0]);
            llSetLinkPrimitiveParamsFast( 3,[ PRIM_GLOW,ALL_SIDES,1.0]);
       }
       
    }
    
}

Link to comment
Share on other sites

Alternately, one could do this kind of thing with states, since they are well suited for this kind of "switcheroo" functionality: Make one state for each set of lights you want on, then change between them each time you say a phrase.

I certainly hope you find a decent solution, but if the problem doesn't look like it will have a fix any time soon, I'd be willing to take a stab at it.

Link to comment
Share on other sites

If I were to try to make something like this I would put a number to represent the alert level in the description of a prim in a linkset and then use that number to set the glow of that prim if the same number comes up after "alert".

Something like this:

default {    state_entry() {        llListen(0, "", llGetOwner(), "");    }    listen(integer channel, string name, key id, string message) {        list temp = llParseString2List(llToLower(message), [" "], []);        if (llList2String(temp, 0) == "alert") {            integer i = llGetNumberOfPrims() + 1;            while (--i > 0) {                llSetLinkPrimitiveParamsFast(i,                     [PRIM_GLOW, ALL_SIDES, 0.0,                     PRIM_FULLBRIGHT, ALL_SIDES, FALSE]);                                if (llList2String(llGetLinkPrimitiveParams(i, [PRIM_DESC]), 0) == llList2String(temp, 1)) {                    llSetLinkPrimitiveParamsFast(i,                         [PRIM_GLOW, ALL_SIDES, 0.5,                         PRIM_FULLBRIGHT, ALL_SIDES, TRUE]);                }             }        }    }}

 


  

Link to comment
Share on other sites

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