Page 1 of 1

Sound plays from Inventory but not in Pim?

Posted: Thu Feb 17, 2022 1:28 pm
by Lunk Portal
From inventory, I can play the sounds and hear them locally, but not globally.

Once I place them in the object with the script, I can hear nothing. I even tried various sound-playing scripts and swapped llPlaySound and llTriggerSound to no avail.

Here is the latest script I'm attempting to use...and ideas?

Code: Select all

// Script Name: Sound_Prim_Script_-_Intermittent.lsl
// Author: Anonymous
//Intermittent sound play

// Downloaded from : http://www.free-lsl-scripts.com/cgi/freescripts.plx?ID=1156

// This program is free software; you can redistribute it and/or modify it.
// Additional Licenes may apply that prevent you from selling this code
// and these licenses may require you to publish any changes you make on request.
//
// There are literally thousands of hours of work in these scripts. Please respect
// the creators wishes and Copyright law and follow their license requirements.
//
// License information included herein must be included in any script you give out or use.
// Licenses may also be included in the script or comments by the original author, in which case
// the authors license must be followed, and  their licenses override any licenses outlined in this header.
//
// You cannot attach a license to any of these scripts to make any license more or less restrictive.
//
// All scripts by avatar Ferd Frederix, unless stated otherwise in the script, are licensed as Creative Commons By Attribution and Non-Commercial.
// Commercial use is NOT allowed - no resale of my scripts in any form.  
// This means you cannot sell my scripts but you can give them away if they are FREE.  
// Scripts by Ferd Frederix may be sold when included in a new object that actually uses these scripts. Putting my script in a prim and selling it on marketplace does not constitute a build.
// For any reuse or distribution, you must make clear to others the license terms of my works. This is done by leaving headers intact.
// See http://creativecommons.org/licenses/by-nc/3.0/ for more details and the actual license agreement.
// You must leave any author credits and any headers intact in any script you use or publish.
///////////////////////////////////////////////////////////////////////////////////////////////////
// If you don't like these restrictions and licenses, then don't use these scripts.
//////////////////////// ORIGINAL AUTHORS CODE BEGINS ////////////////////////////////////////////

// CATEGORY:Sound
// DESCRIPTION:Intermittent sound play
// ARCHIVED BY:Ferd Frederix


// Sound Prim Script - Intermittent
//
// Randomly picks a sound in contents, plays it,
// waits a random interval, repeats.
//
// Set this between 0.0 and 1.0
float LOUDNESS = 1.0;
//
// Interval in seconds to be silent.
// If you set these to be less than 10 seconds,
// they default to 10 seconds.
integer SHORTEST = 1;
integer LONGEST = 10;
//
////////////////////////////////////////////////
default
{

state_entry()
{
    if (SHORTEST < 10 )     SHORTEST = 10;
    if (LONGEST < 10 )      LONGEST = 10;
    if (SHORTEST > LONGEST) SHORTEST = LONGEST;

    llSleep( 1.0 );    
    state noisy;
}

on_rez(integer start_param)
{
    llSleep( 1.0 );
    state noisy;
}

}
////////////////////////////////////////////////
state noisy
{

state_entry()
{
    integer sounds = llGetInventoryNumber(INVENTORY_SOUND);

    if ( sounds <= 0 ) state default;

    string soundname = llGetInventoryName( INVENTORY_SOUND, llFloor(llFrand(sounds)) );
    if ( soundname != "" )
    {
        llTriggerSound( soundname, LOUDNESS );
        
    }
    
    state silent;
}

on_rez(integer start_param)
{
    state default;
}

}
////////////////////////////////////////////////
state silent
{

state_entry()
{    
    llSleep( (float)(llFloor(llFrand(LONGEST - SHORTEST)) + SHORTEST) );
    state noisy;
}

on_rez(integer start_param)
{
    state default;
}

}

// END //

..

Thanks

Re: Sound plays from Inventory but not in Pim?

Posted: Thu Feb 17, 2022 3:06 pm
by Ilan Tochner
Hi Lunk,

What is your region Maturity Rating?

Re: Sound plays from Inventory but not in Pim?

Posted: Thu Feb 17, 2022 4:56 pm
by Lunk Portal
Ilan Tochner wrote:
Thu Feb 17, 2022 3:06 pm
Hi Lunk,

What is your region Maturity Rating?
It was "general" but I switched it to Mature but it made no difference. I wonder if it's something in my standalone? I moved everything to 9.2 and haven't had any problems until now.

My streaming radio script seems to work ?? weird

Re: Sound plays from Inventory but not in Pim?

Posted: Thu Feb 17, 2022 5:57 pm
by Lunk Portal
I figured it out!

Under "About Land" the setting "restrict gesture and object sounds" was checked...sheesh

All the scripts and sounds are working now.