Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Having Sound Issues with a Simple Script

Tonks Baphomet
F.E.A.R. Cyberunit
Join date: 29 Jun 2007
Posts: 3
08-31-2008 23:42
I tried to script a sound into an object that I'm wearing that will play ONCE when I start typing, but for some reason it won't work. The name of the sound is correct, the sound and the script are both in my worn-object. I've tried putting it on a timer, but that makes the sound loop as I type, which is pretty annoying. I've tried using both llPlaySound and llTriggerSound, and neither seems to work.

Here is my current script. If someone could please point out what I did wrong, that would be a big help. :) Thanks!

default
{
state_entry()
{
if (llGetAgentInfo(llGetOwner()) & AGENT_TYPING)
{
llTriggerSound("dialog up",1.0);
}
}
}
Talon Brown
Slacker Punk
Join date: 17 May 2006
Posts: 352
09-01-2008 11:44
state_entry() is only executed when the script begins running or is reset (or changes states but that doesn't apply in this case) so your typing check is only being run once and then never again.