salahzar

Script apri/chiudi porta semicircolare

Apr 5th, 2013
170
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. opendoor()
  2. {
  3.     //llSay(0,"La porta si apre...");
  4.     llSetPrimitiveParams([ PRIM_TYPE, PRIM_TYPE_CYLINDER, 0, <0.250000, 0.750000, 0.0>, 0.700000, ZERO_VECTOR, <1.0, 1.0, 0.0>, ZERO_VECTOR ]);
  5.     llSetStatus(STATUS_PHANTOM,TRUE);
  6.     llSetTimerEvent(10);
  7. }
  8. closedoor()
  9.  
  10. {
  11.     //llSay(0,"La porta si chiude...");
  12.     llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_CYLINDER, 0, <0.250000, 0.750000, 0.0>, 0.0, ZERO_VECTOR, <1.0, 1.0, 0.0>, ZERO_VECTOR, PRIM_SIZE, <9.5, 9.5, 0.10000>]);
  13.     llSetStatus(STATUS_PHANTOM,FALSE);
  14.     llSetTimerEvent(0);
  15.  
  16. }
  17.  
  18.  
  19. default
  20. {
  21.     state_entry()
  22.     {
  23.         //llSay(0,llList2CSV(llGetPrimitiveParams([PRIM_TYPE])));
  24.         llListen(100,"",llGetOwner(),"");
  25.         closedoor();
  26.     }
  27.     link_message(integer sender, integer channel, string str, key id)
  28.     {
  29.         if(str=="OPEN") opendoor();
  30.         if(str=="CLOSE") closedoor();
  31.     }    
  32.    
  33.    
  34.     listen(integer channel,string name, key id, string str)
  35.     {
  36.         if(str=="OPEN") opendoor();
  37.         if(str=="CLOSE") closedoor();
  38.     }    
  39.  
  40.    
  41.     timer()
  42.     {
  43.         llSetTimerEvent(0);
  44.         closedoor();
  45.     }
  46.  
  47.    
  48. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×