Page 1 of 1

Looping speaker?

Posted: Sat Mar 08, 2003 12:55 pm
by Bjarne BZR
In a post earlier:
jv_map wrote:while(1)
{
$speaker playsound mysound
wait 1.5 // length of sound file
}
... is it possibrle to loop the sound with a command? Maby using
$speaker loopsound mysound
instead?

...trying to time the sound and manually loop it sounds dangerous...

I tried to use the loopsound without a while statement, but it did not work...

( But I get the sound when using the while loop above, just a bad looping )

Posted: Sat Mar 08, 2003 1:40 pm
by jv_map
loopsound should work :?.

Posted: Sat Mar 08, 2003 2:29 pm
by Bjarne BZR
Now Im really confused...

When I use the playsound with a while loop: the sound plays, but I get lots of messages in the log saying:
^~^~^ Not playing sound 'sound/amb/amb_lighthum_01.wav'

When I use the loopsound only, I get no sound and a message in the log saying:
ERROR: Entity::LoopSound: transformer_hum needs an alias in ubersound.scr or uberdialog.scr - Please fix.

( transformer_hum is an alias for 'sound/amb/amb_lighthum_01.wav' that i have in a .tik file that is loaded in the _precache script )

Posted: Sat Mar 08, 2003 6:39 pm
by Slyk
I did a similar thing with just this:

$speaker loopsound yoursound------my actual line:

$generator loopsound power_generator

I have had TONS of problems getting other speakers to play anything at all though....tough to figure out what sounds will and won't play, even copying their syntax/text directly from stock maps.

Posted: Sun Mar 09, 2003 3:25 pm
by Bjarne BZR
I have realized something... I got it to work, but as jv_map pointed out: I does not matter because it WONT work on a dedicated server... so there is no use to try it at all on a multiplayer map... ( unless U plan to add jv_map's BOT's an play it by your self :wink: )