Trying to send radio voice (saygroup) messages to each person in a given army. Code has no compile errors but doesn't voice to players? Any help appreciated.
Code:
private void sayMessageTo(int army, string msg)
{ // send a speech message to all players in specified army (1=red; 2=blue)
foreach (AiAirGroup g in GamePlay.gpAirGroups(army))
{
bool SaidToGroup = false;
foreach (AiAircraft a in g.candidates())
{
if (SaidToGroup == true) return; // speech already said to group
SaidToGroup = true;
a.SayToGroup(a.AirGroup(), "Received_and_understood_Villa_Leader"); // for testing only
//a.SayToGroup(a.AirGroup(), msg);
}
}
}