Blockland Forums > Modification Help
2D sounds not playing? [Fixed]
(1/1)
TheBlackParrot:
Snip from the addon I'm working on:


--- Code: ---new AudioProfile(AnnouncerUpdateSound)
{
filename = "./plink.wav";
description = AudioClose3d;
is3D = false;
preload = true;
};
new AudioProfile(AnnounceSound)
{
filename = "./bleep.wav";
description = AudioClose3d;
is3D = false;
preload = true;
};
new AudioProfile(AnnouncerWarningSound)
{
filename = "./pakbeep.wav";
description = AudioClose3d;
is3D = false;
preload = true;
};

$buildSIA = 77;
$versionSIA = "3-development";





function servercmdSetAnnounceFont(%client,%afont)
{
if(%client.isHost == true)
{
switch(%afont)
{
case 0:
$fontv = "Palatino Linotype";
$announcefont = "Palatino Linotype";
if($bold == 1)
{
$announcefont = $announcefont SPC "Bold";
}
messageAll("", "\c4<bitmap:add-ons/script_announcebrickcount/cog.png><color:00ff00> TBP Announcer: \c6The announcer font was changed to " @ $announcefont @ " by the host.");
for(%i = 0; %i < ClientGroup.getCount(); %i++)
{
%cl = ClientGroup.getObject(%i);
%cl.play2D(AnnouncerUpdateSound);
}
--- End code ---

Why isn't this playing? I can't figure it out.

Changed "new" to "datablock" and it worked.
Space Guy:
Does your sound work when played as an event sound on a brick?
TheBlackParrot:

--- Quote from: Space Guy on July 25, 2010, 03:27:24 PM ---Does your sound work when played as an event sound on a brick?

--- End quote ---
The sound isn't even there when I try to do that.
TheBlackParrot:
This is getting a little bit more urgent, someone told me that v2 of this addon changed the version number of Blockland, causing their server not to show up.

I need to have this answered so I can release v3 ASAP.
Space Guy:

--- Quote from: TheBlackParrot on July 25, 2010, 03:30:24 PM ---The sound isn't even there when I try to do that.

--- End quote ---
If the sound has a stereo channel (different sound from left and right speaker) it may not play or load in Blockland.
Navigation
Message Index

Go to full version