Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

anyone know where my crickets have run off to?

Vixen Babenco
Registered User
Join date: 26 Mar 2007
Posts: 11
09-24-2008 10:22
Hi all :)

ok I may be asking a stupid question here and I do not know a great deal about scripts, but I have been using this free sound script for ages now and it has worked great up until now. the old prims that have this script in it work fine but when I tried to move it today to a new prim it wont play the night ambient part of the script. I copied exactly from one of my prims to a new one to test the whole of this script and the sounds to match as follows :-

list daySounds = ["American Oriole", "Cardinal", "Red-tailed Hawk", "Robin", "Song Sparrow", "Tree Swallow", "Locust"];
list nightSounds = ["Great Horned Owl"];

list nightAmbient = ["Cricket"];

default {
state_entry() {
llStopSound();
llSetTimerEvent(2.0);
}

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);
}
}
}

**** and the only part that will no longer play is the Cricket sound. I have changed nothing. or altered anything in anyway. As a test and moved all sounds including script from the working box to the new box and still the only sound that will not work is the Cricket altho on it's own it works fine. why this isn't working as it should. Can anyone shed some light on why this is happening? and or give me advice as to how to get the ambient section working again?.

thanks :)
Nichole Vanbeeck
Registered User
Join date: 18 Dec 2006
Posts: 153
09-24-2008 10:27
YOUR missing your crickets? I saw what happened to them , here take a look he is GUILTY

http://worldofwonder.net/image1/geicogecko-1-tm.jpg
Vixen Babenco
Registered User
Join date: 26 Mar 2007
Posts: 11
09-24-2008 10:29
LOL! sneaky
Nichole Vanbeeck
Registered User
Join date: 18 Dec 2006
Posts: 153
09-24-2008 10:31
Did you try resetting the script?
Vixen Babenco
Registered User
Join date: 26 Mar 2007
Posts: 11
09-24-2008 10:32
yes :( many times and still those crickets won't come out to play
Nichole Vanbeeck
Registered User
Join date: 18 Dec 2006
Posts: 153
09-24-2008 10:35
well when I log in I can try to help you. I know a bit about scripting. If I am unable too I can refer you to some of my friends who may be able to help you if I can't
Vixen Babenco
Registered User
Join date: 26 Mar 2007
Posts: 11
09-24-2008 10:38
great thanks :)
Vixen Babenco
Registered User
Join date: 26 Mar 2007
Posts: 11
09-24-2008 11:46
Thanks for everyone's help I went to 3 other sims and tried it out it didnt work in two then worked fine in the last! then when I went back home it seems to be working ok now how strange
ArchTx Edo
Mystic/Artist/Architect
Join date: 13 Feb 2005
Posts: 1,993
09-25-2008 12:14
The script plays the cricket only at night, did you take that in consideration?
_____________________

VRchitecture Model Homes at http://slurl.com/secondlife/Shona/60/220/30
http://www.slexchange.com/modules.php?name=Marketplace&MerchantID=2240
http://shop.onrez.com/Archtx_Edo
Vixen Babenco
Registered User
Join date: 26 Mar 2007
Posts: 11
09-25-2008 14:31
yes but if you listen to the sounds on this when in a prim the crickets actually play both day and night. The ambient layer "crickets" continues as background sound. and it is fine if you have it working in one object but as soon as you copy it intermittently the crickets will not play. all the other sounds play fine.
Galena Qi
Registered User
Join date: 9 Sep 2006
Posts: 249
09-25-2008 18:05
I copied your script into a prim, installed the sounds (they are all common freebies) and it worked perfectly. The crickets play intermittently, but that is what the script is designed to do. It has a command to stop the sound playing if the random function picks a number above the cutoff point, so the crickets don't play constantly.

The sound you hear in the daytime may be locusts, not crickets. At least for me, the crickets only play at night.

If you were having trouble in certain sims, it may be related to the number of sounds that can be played at a time, not the script. I remember reading there are limits.