Page 1 of 1

New Barks

PostPosted: Wed May 16, 12 12:42 pm
by SimonDenton
Hey gang,

So I am thinking of adding new AI barks with my own conversation. For argument's sake let's say I'd like CharacterName_BarkSomething to be played. I can do the scripted pawn coding for that, but the problem is within my custom bark manager. I have

Code: Select all

// ----------------------------------------------------------------------
// BuildBarkName()
// ----------------------------------------------------------------------

function Name BuildBarkName(ScriptedPawn newBarkPawn, EBarkModes newBarkMode)
{
   local String conStringName;

   SetRootWindow();

   // Use the "BarkBindName" unless it's blank, in which case
   // we'll fall back to the "BindName" used for normal
   // conversations

   if (newBarkPawn.BarkBindName == "")
      conStringName = newBarkPawn.BindName $ "_Bark";
   else
      conStringName = newBarkPawn.BarkBindName $ "_Bark";

   switch(newBarkMode)
   {

case BM_Something:
      conStringName = conStringName $ "Something";
      break;

}
Along with all the other normal dx bark cases (shortened it for this post)

And I have

Code: Select all
// ----------------------------------------------------------------------
// GetBarkPriority()
// ----------------------------------------------------------------------

function int GetBarkPriority(EBarkModes barkMode)
{
   local int barkPriority;

   switch(barkMode)
   {

case BM_Something:
         barkPriority = 3;
         break;
}



With the normal dx barks as well.

The error I get is simply:

SummerBarkManager.uc(747) : Error, Bad or missing expression in 'Case'
Failed due to errors.


What am I missing? Is adding my own case in the switch function messing it up? My bark manager is the same as Deus Ex bark manager but with my new barks.[/code]