Author Topic: sound datablock names  (Read 753 times)

Does anyone have a nice list of the default sound's datablock names? specifically the chest open sound.

Code: [Select]
function brickTreasureChestData::onPlant(%data, %obj)
{
   Parent::onPlant(%data, %obj);

   registerTreasureChest(%obj);   

   //add default events
   %enabled     = 1;
   %delay       = 0;
   %inputEvent  = "OnActivate";
   %target      = "Client";
   %outputEvent = "PlaySound";
   %par1        = rewardSound.getId();
   %obj.addEvent(%enabled, %delay, %inputEvent, %target, %outputEvent, %par1);
}

iirc the chest open sound is the brick plant sound

I'd recommend some code like
Code: [Select]
%cnt = datablockGroup.getCount();
for(%i=0;%i<%cnt;%i++)
{
%obj = datablockGroup.getObject(%i);
if(%obj.getClassName() $= "AudioProfile")
echo(%obj.getName());
}
which will echo all audioProfile datablocks if you have any more questions please ask!!
« Last Edit: February 22, 2017, 08:59:40 PM by Swollow »

no swollow, im his code mentor!! dont take him from me!!! :(