Blockland Forums > Modification Help
Audio Stuff
(1/3) > >>
cucumberdude:
A couple things.

1) Many players (mostly those who don't have the sounds) seem to crash when I play 3d sound on all players. Why? What can I do to fix this?

2) How do you stop an AudioLooping2D after calling serverPlay2d(whatever); ?
cucumberdude:
Very small bump :'c
Iban:
Give the code you're using for #1.
cucumberdude:

--- Code: ---function sp_playtoall(%sound)
{
for(%j = 0; %j < ClientGroup.getCount(); %j++)
{
%client = ClientGroup.getObject(%j);
if(isObject(%client.player))
{
%client.player.playAudio(1, %sound);
}
}
}
--- End code ---
cucumberdude:

--- Code: ---datablock AudioDescription(spLooping3d)
{
   volume   = 2.0;
   isLooping= true;

   is3D     = true;
   ReferenceDistance= 5.5;
   MaxDistance= 80.0;
   type     = $SimAudioType;
};
--- End code ---

--- Code: ---datablock AudioProfile(sp_chase)
{
filename = "./chase.wav";
description = spLooping3d;
preload = true;
};
--- End code ---
Navigation
Message Index
Next page

Go to full version