When I start the office demo, I can't hear the player's walking sound and the menu sounds. What I want to do: I want to use play_sound or snd_play to play sounds like walking, other actions of the player, and menu sounds without having to move them to the left or the right side. I have created a little script which allows me to test the sound commands:
Code:
var video_mode = 6;
var video_depth = 16;
string level_str = <soundproblem.WMB>;
sound test_snd = <BEAMER.WAV>;
sound beep_snd = <beep.wav>;
function main()
{
level_load(level_str);
}
action listener
{
player = my;
while (1)
{
waitt(32);
snd_play(test_snd, 100, 0); // works, if balancedsound was called after the last playersound
} // call and the last balancedbeep call (and at least once)
}
function playersound()
{
if (player == null) { return; }
play_entsound(player, test_snd, 100); // works always
}
function normalsound()
{
play_sound(test_snd, 100); // works like snd_play(test_snd, 100, 0);
}
function balancedsound()
{
snd_play(test_snd, 100, 100); // works always
}
function balancedbeep()
{
snd_play(beep_snd, 100, -100); // works always
}
on_e = playersound;
on_s = normalsound;
on_d = balancedsound;
on_b = balancedbeep;
The comments describe what doesn't work. The same behavior occurs in all other cases I have tested, e.g. in event functions or in the office demo (if I enter "snd_play(msg_sound, 100, 100);" in the debug console, I can hear the sound; then I can hear the sound too, if I enter "snd_play(msg_sound, 100, 0);", but if I walk around between these calls, I can't hear the walking sound and the snd_play call with balance 0 doesn't work anymore too, until i play the same sound with a high balance value again).