Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string sound1 = "";
- string sound2 = "";
- string sound3 = "";
- integer play = 0;
- default
- {
- state_entry()
- {
- llPreloadSound(sound1);
- llPreloadSound(sound2);
- llPreloadSound(sound3);
- //llSetSoundQueueing(TRUE);
- llSetTimerEvent(.3);
- }
- timer()
- {
- llPreloadSound(sound1);
- llPreloadSound(sound2);
- llPreloadSound(sound3);
- string anim = llGetAnimation(llGetOwner());
- if ((anim == "Walking") || (anim == "Running") || (anim == "Turning Left") || (anim == "Turning Right") || (anim == "CrouchWalking"))
- {
- if(play == 0)
- {
- llResetTime();
- play = 1;
- }
- else if(play == 1)
- {
- llPlaySound(sound1,1.0);
- play = 2;
- }
- else if(play == 2)
- {
- if(llGetTime() > 9.989)
- {
- play = 3;
- }
- }
- else if(play == 3)
- {
- llResetTime();
- llPlaySound(sound2,1.0);
- play = 4;
- }
- else if(play == 4)
- {
- if(llGetTime() >= 9.989)
- {
- play = 5;
- }
- }
- else if(play == 5)
- {
- llResetTime();
- llPlaySound(sound3,1.0);
- play = 6;
- }
- else if(play == 6)
- {
- if(llGetTime() >= 7.769)
- {
- play = 0;
- }
- }
- }
- else
- {
- llStopSound();
- play = 0;
- }
- }
- on_rez(integer n)
- {
- llResetScript();
- }
- }
Add Comment
Please, Sign In to add comment