Two Avatars on single prim

From Second Life Wiki
Revision as of 07:06, 5 October 2013 by Cay Trudeau (talk | contribs) (Created page with " Ever wondered how to make two or more avatars to sit on single prim, to save prim amount on a furniture? You need two kinds of scripts; the master (which calculates avatars …")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Ever wondered how to make two or more avatars to sit on single prim, to save prim amount on a furniture?

You need two kinds of scripts; the master (which calculates avatars sitting down and standing up) and a slave script for each additional avatar

Here are the basic scripts: modified for two avatars on single prim


MASTER <lsl>

   float i = llGetTime();  
   task(); 
   float x = llGetTime();
   while (llGetUnixTime()%2 == 0)// do every even second (result 1 for odd seconds)
   { 
       llSleep(1-(x-i));// one second minus time that has passed
   }

</lsl>

SLAVE <lsl>

   float i = llGetTime();  
   task(); 
   float x = llGetTime();
   while (llGetUnixTime()%2 == 0)// do every even second (result 1 for odd seconds)
   { 
       llSleep(1-(x-i));// one second minus time that has passed
   }

</lsl>