Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float LOUDNESS = 1.0;
- //
- ////////////////////////////////////////////////
- default
- {
- attach(key attached)
- {
- if (attached == NULL_KEY) return;
- //else
- //if (attached != NULL_KEY) return;
- integer sounds = llGetInventoryNumber(INVENTORY_SOUND);
- if ( sounds <= 0 ) return;
- string soundname = llGetInventoryName( INVENTORY_SOUND, llFloor(llFrand(sounds)) );
- if ( soundname != "" )
- {
- llPlaySound( soundname, LOUDNESS );
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement