Here's an example of an avatar bumper sound script. Is there a way for it to only detect horizontal collisions such that if you tp on someone's head, it doesn't play. This is for people with tp sounds because one sound will interrupt the other.
float volume = 1.0; //Volume 0.0 - 1.0;
default
{
collision_start(integer num)
{
if(llDetectedType(0) & AGENT)
{
llStartAnimation("lulz");
llPlaySound(llGetInventoryName(INVENTORY_SOUND,llFloor(llFrand(llGetInventoryNumber(INVENTORY_SOUND)))),1.0);
llSetTimerEvent(1.0);
}
}
timer()
{
llStopAnimation("lulz");
}
attach(key uid)
{
if(llGetAttached())
llRequestPermissions(llGetOwner(),PERMISSION_TRIGGER_ANIMATION);
}
}