Advertisement
salahzar

100-animation

Oct 5th, 2013
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. string desc="
  2.  
  3. ";
  4.  
  5.  
  6. //==============================
  7. integer shown=FALSE;
  8.  
  9. show()
  10. {
  11.     llSetLinkAlpha(LINK_SET,1,ALL_SIDES);
  12.     llSetText(desc,<1,1,1>,1);
  13.     shown=TRUE;
  14.    // llSay(0,"show");
  15. }
  16. hide()
  17. {
  18.     llSetLinkAlpha(LINK_SET,0,ALL_SIDES);
  19.     llSetText("",<1,1,1>,0);
  20.     shown=FALSE;
  21.    // llSay(0,"hide");
  22. }
  23.  
  24. default
  25. {
  26.     state_entry()
  27.     {
  28.         integer channel=(integer)llGetScriptName();
  29.         //llSay(0,"channel: "+(string)channel);
  30.         llListen(channel,"",NULL_KEY,"");
  31.         hide();
  32.  
  33.     }
  34.     listen(integer channel, string name, key id,string str)
  35.     {
  36.         string first = llGetSubString(str,0,0);
  37.         string last = llGetSubString(str,1,-1);
  38.        // llSay(0,"first: "+first+" last: "+last);
  39.         if(last==llGetObjectName())
  40.         {
  41.             if(first=="+")show();
  42.             if(first=="-")hide();
  43.  
  44.         }
  45.        
  46.     }
  47.    
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement