Edie_Shoreland

Automatic Animation Changer without Occupancy Flag

Aug 30th, 2018
633
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //This script was originally designed for gachas using AVSitter, but is also ideal for
  2. //objects that can be modified containing AVpos notecards that cannot be edited or
  3. //for AVpos notecards (like ones in gacha items) that you may not want to edit.
  4.  
  5. //CHANGE THE NAMES IN ani_names TO THE NAMES OF ANIMATIONS IN THE SIT MENU/AVpos NOTECARD
  6. //YOU WANT TO RANDOMLY CYCLE THROUGH. (You can add more names, just use quotation marks.)
  7. list ani_names = ["Male_01", "Male_05", "Male_06", "Male_10", "Female_05", "Female_06", "Female_08", "Male_08"];
  8.  
  9. //CHANGE THE INTEGER IN Tcycle TO THE NUMBER OF SECONDS YOU WANT BETWEEN ANIMATION AND
  10. //POSE CHANGES.
  11. integer Tcycle = 110;
  12.  
  13. float randomFloat;
  14. string aniname;
  15. integer aninumber;
  16. integer synched;
  17.  
  18.  
  19.  
  20. default
  21. {
  22.     state_entry()
  23.     {
  24.         synched = llGetListLength(ani_names);
  25.         llSetTimerEvent(Tcycle);
  26.     }
  27.    
  28.     timer()
  29.     {
  30.         randomFloat = llFrand(synched);
  31.         aninumber = (integer)randomFloat;
  32.         aniname = llList2String(ani_names, aninumber);
  33.         llMessageLinked(LINK_SET,90000,aniname,"0");
  34.     }
  35.  
  36.     changed(integer change)
  37.     {
  38.         if (change & CHANGED_INVENTORY) llResetScript();
  39.     }
  40. }
Advertisement