Snip from the addon I'm working on:
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);
}
Why isn't this playing? I can't figure it out.
Changed "new" to "datablock" and it worked.