Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list daySounds = ["wren", "thrush", "blackbird", "robin_w", "Hsparrow", "Bluetit"];
- list nightSounds = ["Tawny Owl", "shortear owl","42917__inchadney__Owl"];
- list nightAmbient = ["wind"];
- default {
- state_entry() {
- llStopSound();
- llSetTimerEvent(0.5);
- }
- timer() {
- vector time = llGetSunDirection();
- list myList;
- float density = 0.9;
- if (time.z > 0.0) {
- myList = llListRandomize(daySounds, 1);
- } else {
- myList = llListRandomize(nightSounds, 1);
- density = 0.98;
- // Ambient nighttime sound
- if (llFrand(1.0) > 0.85) {
- llStopSound();
- } else {
- llLoopSound(llList2String(nightAmbient, 0), 1.0);
- }
- }
- if (llFrand(1.0) > density) {
- llTriggerSound(llList2String(myList, 0), 1.0);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement