Jump to content

Syncing blinking lights


Tim Flynn
 Share

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

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

Recommended Posts

It depends in a way on how fast the lights are supposed to blink and how perfect you want the synchronization to be.  The faster they blink, the harder the problem will be to solve.  You might tell your master script to do

llSetTimerEvent(0.1);....timer(){   if (~(llGetUnixTime() - (gTime + 1)))    {        llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_FULLBRIGHT, ALL_SIDES,TRUE]);        gTime = llGetUnixTime();        llRegionSay(gChan,(string)gTime);    }    else    {        llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_FULLBRIGHT, ALL_SIDES,FALSE]);    }}

 EDIT:  Ooops.. Got this master script backward at first.. Fixed now.

 Then tell your slave lights to do this

llListen(gChan,"","","");llSetTimerEvent(0.1);....listen(integer channel, string name, key id, string msg){    gTime = (integer msg);    gBlink = TRUE;}timer(){    if (gBlink && (~(llGetUnixTime() - (gTime + 1)))    {        llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_FULLBRIGHT, ALL_SIDES,TRUE]);        gBlink = FALSE;    }    else    {        llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_FULLBRIGHT,ALL_SIDES,FALSE]);    }}

 That should make the master and the slaves blink at exactly the same llGetUnixTime, with no more than a 0.1 second error.

 

 

       

  • Like 1
Link to comment
Share on other sites

These lights will not be blinking very fast.  They will be blinking very, very slowly, preferably fading in and out in the background.  I'm still learning about master and slave controllers at this stage though.  Do I just make an object using a master script, and have all my lights act with the secondary script?  

Link to comment
Share on other sites

  • 1 year later...
You are about to reply to a thread that has been inactive for 3620 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...