Jump to content

lilricecakes

Resident
  • Posts

    4
  • Joined

Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Ive recently made my own dancer, and gotten it to play my animations and sounds! There is one issue however, the animations dont play one after the other but instead at random intervals. Is there a way i can fix this where they can play in succession? integer ON = 0; //STATE OF SCRIPT //YOU EDIT THESE PARTS FOR NEW ANIMATIONS, SOUND CLIPS ETC. DO NOT TOUCH THE SCRIPT list animation = ["Sync'D Motion__Originals - Boasty 01", "Sync'D Motion__Originals - Boasty 02","Sync'D Motion__Originals - Boasty 03","Sync'D Motion__Originals - Boasty 04","Sync'D Motion__Originals - Boasty 05"]; //ANIMATION NAMES integer MaxSoundClips = 18; //AMOUNT OF SONG CLIPS, NAME THEM 1,2,3,4,ETC integer SoundLength = 10; //FIRST SERIES OF SOUND LENGTHS integer LastSoundLength = 8; //INCASE LAST SOUND CLIP IS SHORTER integer SoundClipNumber = 0; //FOR SOUND LOOP integer AnimPos; ResetToDefault() { llStopSound(); llSetTimerEvent(0.00); ON = 0; SoundClipNumber = 0; AnimPos = 0; llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); } StopAnims() { integer x; for (x=0;x<llGetListLength(animation);x++) { llStopAnimation(llList2String(animation,x)); } } default { state_entry() { llListen(0, "", "", ""); } attach(key id) { if(id) { llOwnerSay("Say 'on' or 'off'"); } else ResetToDefault(); } timer() { llPlaySound((string)(++SoundClipNumber),1.0); llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION); if(ON == 1){ llSetTimerEvent(SoundLength); ON = 2; } if(SoundClipNumber == MaxSoundClips) { llSetTimerEvent(LastSoundLength); ON = 1; SoundClipNumber = 0; } llPreloadSound((string)(SoundClipNumber+1)); } listen(integer channel, string name, key id, string message) { message = llToLower(message); if (ON == 0 && message == "on") { ON = 1; llRequestPermissions(id, PERMISSION_TRIGGER_ANIMATION); llSetTimerEvent(0.01); } else if(message == "off"){ResetToDefault();} } run_time_permissions(integer perm) { if (perm & PERMISSION_TRIGGER_ANIMATION) { llStopAnimation("sit"); StopAnims(); if ((ON == 1) || (ON == 2)) { llStartAnimation(llList2String(animation,AnimPos)); AnimPos++; } if (AnimPos == llGetListLength(animation)) AnimPos = 0; } } }
  2. I really love the help! but i dont think im picking up much since i have very little experience in coding. This is a bit difficult for me
  3. Is there a way to modify to have animations string together? If so i would love help on my first script integer ON = 0; //STATE OF SCRIPT //YOU EDIT THESE PARTS FOR NEW ANIMATIONS, SOUND CLIPS ETC. DO NOT TOUCH THE SCRIPT string animation = "Sync'D Motion__Originals - Boasty 01"; //ANIMATION NAME string animation = "Sync'D Motion__Originals - Boasty 02"; string animation = "Sync'D Motion__Originals - Boasty 03"; string animation = "Sync'D Motion__Originals - Boasty 04"; string animation = "Sync'D Motion__Originals - Boasty 05"; integer MaxSoundClips = 18; //AMOUNT OF SONG CLIPS, NAME THEM 1,2,3,4,ETC integer SoundLength = 10; //FIRST SERIES OF SOUND LENGTHS - MAX 10 SECS FLAT integer LastSoundLength = 8; //INCASE LAST SOUND CLIP IS SHORTER integer SoundClipNumber = 0; //FOR SOUND LOOP ResetToDefault() { llStopSound(); llSetTimerEvent(0.00); llStopAnimation(animation); ON = 0; SoundClipNumber = 0; } default { state_entry() { llListen(0, "", "", ""); } attach(key id) { if(id) { llOwnerSay(" Commands 'on' or 'off'"); llRequestPermissions(id, PERMISSION_TRIGGER_ANIMATION); } else ResetToDefault(); } timer() { llPlaySound((string)(++SoundClipNumber),1.0); if(ON == 1){llSetTimerEvent(SoundLength); ON = 2;} if(SoundClipNumber == MaxSoundClips){llSetTimerEvent(LastSoundLength); ON = 1; SoundClipNumber = 0;} llPreloadSound((string)(SoundClipNumber+1)); } listen(integer channel, string name, key id, string message) { message = llToLower(message); if (ON == 0 && message == "on") { ON = 1; llStartAnimation(animation); llSetTimerEvent(0.01); } else if(message == "off"){ResetToDefault();} } }
×
×
  • Create New...