Advertisement
Gayngel

Untitled

Mar 19th, 2015
621
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. integer totalavis;
  2. integer i;
  3. list info;
  4. key av;
  5.  
  6. default
  7. {
  8. state_entry()
  9. {
  10. llVolumeDetect(TRUE);
  11.  
  12. }
  13.  
  14. collision_start(integer total)
  15. {
  16. av = llDetectedKey(0);
  17. info += av;
  18. totalavis = llGetListLength(info);
  19.  
  20.  
  21. for(i=0;i < totalavis;i++)
  22. {
  23. llLoopSound("soundname",1.0);
  24. }
  25. }
  26.  
  27. collision_end(integer total)
  28. {
  29. integer idx;
  30. av = llDetectedKey(0);
  31. if (~(idx = llListFindList(info, [av]))) {
  32. info = llDeleteSubList(info,idx,idx); }
  33.  
  34.  
  35. if( info == [])
  36. {
  37. llStopSound();
  38. }
  39. }
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement