Then, I decided to have it create a script that would play a sound loop when given a chat command. I got this:
CODE
default
{
state_entry() {
llListen(3,"", NULL_KEY, "");
}
listen(integer channel, string name, key id, string message) {
if (message == "Engine on") {
llLoopSound(llGetInventoryName(INVENTORY_SOUND,0),1);
}
}
}CODE
Okay, fine, that worked. I gave the command, and the sound started. So far so good. After a couple of minutes, however, it occurred to me that I needed a way to STOP the sound. So after a lot of tries, a lot of syntax errors, and a few bad words, I came up with this:CODEdefault
{
state_entry() {
llListen(3,"", NULL_KEY, "");
}
listen(integer channel, string name, key id, string message) {
if (message == "Engine on")
{llLoopSound(llGetInventoryName(INVENTORY_SOUND,0),1);
if (message == "Engine off")
{llStopSound();}
}
}
}
"Yay, it finally compiled!" I thought. I saved and closed it, and with great anticipation gave the stop command. It ignored me. I made sure the script was set to running, then reset it. It pretended I didn't exist.
Sooo, I went and looked at the wiki regarding the llStopSound command. All I could find was a definition of the command, and on another page there was an example of how NOT to do it, but with no discussion of how TO do it. When I went to the discussion page, it invited me to write about it myself. Yeah, right. :P
So, you see, I am not merely trying to take the lazy way out. I HAVE done some research. To an experienced scripter, I am sure the solution to my problem is glaringly obvious. Anyone care to enlighten me? :)

In fact, the reason I wanted this to start with chat is that I have another script that gives the command in chat. But, either way, by script or by typing, (correctly) it won't stop.