can anyone tell me why my announcer doesent work ?

Started by wsa30h, September 21, 2019, 02:58:40 PM

Previous topic - Next topic
can anyone tell me why the announcer isnt working when i capture a command post he says nothing. here is my lua
---------------------------------------------------------------------------
-- FUNCTION:    ScriptInit
-- PURPOSE:     This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES:       The name, 'ScriptInit' is a chosen convention, and each
--              mission script must contain a version of this function, as
--              it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()
--  REP Attacking (attacker is always #1)
    local REP = 1
    local CIS = 2
--  These variables do not change
    local ATT = 1
    local DEF = 2

        AddMissionObjective(CIS, "orange", "level.tat4.objectives.1");
    AddMissionObjective(CIS, "red", "level.tat4.objectives.3");
    AddMissionObjective(REP, "orange", "level.tat4.objectives.1");
    AddMissionObjective(REP, "orange", "level.tat4.objectives.2");
   

SetTeamAggressiveness(CIS, 1.0)
SetTeamAggressiveness(REP, 1.0)

    ReadDataFile("dc:sound\\fal.lvl;falcw");
  ReadDataFile("dc:sound\\yav.lvl;yav1cw");
     ReadDataFile("SIDE\\rep.lvl",
       "rep_hover_speederbike",
       "rep_inf_basic",
        "rep_inf_jet_trooper",
        "rep_inf_macewindu",
        "rep_hover_fightertank",
        "rep_walk_atte");


    ReadDataFile("SIDE\\cis.lvl",
         "cis_hover_aat",
        "cis_hover_stap",
        "cis_inf_basic_battledroids",
        "cis_inf_countdooku",
        "cis_inf_droideka",
        "cis_tread_hailfire",
        "cis_walk_spider")
    ReadDataFile("dc:SIDE\\cis.lvl",
"cis_hover_mtt",
"cis_hover_aatx",
"cis_hover_gat",
"cis_hover_hag",
"cis_tread_tank");
ReadDataFile("dc:SIDE\\rep2.lvl",
"rep_walk_atap",
"rep_walk_atxt");
   ReadDataFile("SIDE\\gar.lvl",
        "gar_inf_basic");

--  Level Stats

    ClearWalkers()
    AddWalkerType(0, 5) -- Droidekas
    AddWalkerType(1, 4) -- 6 atsts with 1 leg pairs each
    AddWalkerType(2, 2)
    AddWalkerType(3, 4)-- 3x2 (3 pairs of legs)
      SetMemoryPoolSize("EntityHover", 26)
    SetMemoryPoolSize ("Commandwalker", 4)
    SetMemoryPoolSize ("CommandHover", 4)
  SetMemoryPoolSize("MountedTurret", 36)
    SetMemoryPoolSize("PowerupItem", 60)
    SetMemoryPoolSize("EntityMine", 40)
    SetMemoryPoolSize("Aimer", 600)
    SetSpawnDelay(10.0, 0.25)


--    Republic Stats
    SetTeamName(REP, "Republic")
    SetTeamIcon(REP, "rep_icon")
    AddUnitClass(REP, "rep_inf_clone_trooper",40)
    AddUnitClass(REP, "rep_inf_arc_trooper",2)
    AddUnitClass(REP, "rep_inf_clone_pilot",2)
    AddUnitClass(REP, "rep_inf_clone_sharpshooter",2)
    AddUnitClass(REP, "rep_inf_jet_trooper",4)
    SetHeroClass(REP, "rep_inf_macewindu")
--  SetCarrierClass(REP, "rep_fly_vtrans")

--  CIS Stats
    SetTeamName(CIS, "CIS")
    SetTeamIcon(CIS, "cis_icon")
      AddUnitClass(CIS, "cis_inf_battledroid_inf",40)
    AddUnitClass(CIS, "cis_inf_battledroid_av",2)
    AddUnitClass(CIS, "cis_inf_battledroid_pilot",2)
    AddUnitClass(CIS, "cis_inf_battledroid_sniper",2)
    AddUnitClass(CIS, "cis_inf_droideka",4)
    SetHeroClass(CIS, "cis_inf_countdooku")


--  Attacker Stats
    SetUnitCount(ATT, 50)
    SetReinforcementCount(ATT, 650)
    SetTeamAsEnemy(DEF,3)

--  Defender Stats
    SetUnitCount(DEF, 50)
    SetReinforcementCount(DEF, 650)
   
    SetTeamAsFriend(ATT,3)

--  Local Stats
    SetTeamName(3, "locals")
    AddUnitClass(3, "gar_inf_soldier",5)
    AddUnitClass(3, "gar_inf_pilot", 1)
    AddUnitClass(3, "gar_inf_vanguard", 1)
    SetUnitCount(3, 7)
    SetTeamAsFriend(3, ATT)


    ReadDataFile("dc:tat4\\tat4.lvl")

    SetDenseEnvironment("false")
    SetMinFlyHeight(-11)
    SetMaxFlyHeight(88)
    SetMaxPlayerFlyHeight(88)



--  Birdies
    --SetNumBirdTypes(1)
    --SetBirdType(0.0,10.0,"dragon")
    --SetBirdFlockMinHeight(90.0)

--  Sound
    OpenAudioStream("sound\\yav.lvl",  "yavcw_music");
     OpenAudioStream("sound\\cw.lvl",  "cw_tac_vo");
    OpenAudioStream("sound\\cw.lvl",  "cw_vo");
   

    SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
    SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing",   1)
    SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing",   1)
    SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

    SetOutOfBoundsVoiceOver(1, "repleaving");
    SetOutOfBoundsVoiceOver(2, "cisleaving");

    SetAmbientMusic(REP, 1.0, "rep_GEO_amb_start",  0,1)
    SetAmbientMusic(REP, 0.99, "rep_GEO_amb_middle", 1,1)
    SetAmbientMusic(REP, 0.1,"rep_GEO_amb_end",    2,1)
    SetAmbientMusic(CIS, 1.0, "cis_GEO_amb_start",  0,1)
    SetAmbientMusic(CIS, 0.99, "cis_GEO_amb_middle", 1,1)
    SetAmbientMusic(CIS, 0.1,"cis_GEO_amb_end",    2,1)

    SetVictoryMusic(REP, "rep_geo_amb_victory")
    SetDefeatMusic (REP, "rep_geo_amb_defeat")
    SetVictoryMusic(CIS, "cis_geo_amb_victory")
    SetDefeatMusic (CIS, "cis_geo_amb_defeat")

    SetSoundEffect("ScopeDisplayZoomIn",  "binocularzoomin");
    SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout");
    --SetSoundEffect("WeaponUnableSelect",  "com_weap_inf_weaponchange_null");
    --SetSoundEffect("WeaponModeUnableSelect",  "com_weap_inf_modechange_null");
    SetSoundEffect("SpawnDisplayUnitChange",       "shell_select_unit");
    SetSoundEffect("SpawnDisplayUnitAccept",       "shell_menu_enter");
    SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change");
    SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter");
    SetSoundEffect("SpawnDisplayBack",             "shell_menu_exit");

    SetPlanetaryBonusVoiceOver(CIS, CIS, 0, "CIS_bonus_CIS_medical");
    SetPlanetaryBonusVoiceOver(CIS, REP, 0, "CIS_bonus_REP_medical");
    SetPlanetaryBonusVoiceOver(CIS, CIS, 1, "");
    SetPlanetaryBonusVoiceOver(CIS, REP, 1, "");
    SetPlanetaryBonusVoiceOver(CIS, CIS, 2, "CIS_bonus_CIS_sensors");
    SetPlanetaryBonusVoiceOver(CIS, REP, 2, "CIS_bonus_REP_sensors");
    SetPlanetaryBonusVoiceOver(CIS, CIS, 3, "CIS_bonus_CIS_hero");
    SetPlanetaryBonusVoiceOver(CIS, REP, 3, "CIS_bonus_REP_hero");
    SetPlanetaryBonusVoiceOver(CIS, CIS, 4, "CIS_bonus_CIS_reserves");
    SetPlanetaryBonusVoiceOver(CIS, REP, 4, "CIS_bonus_REP_reserves");
    SetPlanetaryBonusVoiceOver(CIS, CIS, 5, "CIS_bonus_CIS_sabotage");--sabotage
    SetPlanetaryBonusVoiceOver(CIS, REP, 5, "CIS_bonus_REP_sabotage");
    SetPlanetaryBonusVoiceOver(CIS, CIS, 6, "");
    SetPlanetaryBonusVoiceOver(CIS, REP, 6, "");
    SetPlanetaryBonusVoiceOver(CIS, CIS, 7, "CIS_bonus_CIS_training");--advanced training
    SetPlanetaryBonusVoiceOver(CIS, REP, 7, "CIS_bonus_REP_training");--advanced training

    SetPlanetaryBonusVoiceOver(REP, REP, 0, "REP_bonus_REP_medical");
    SetPlanetaryBonusVoiceOver(REP, CIS, 0, "REP_bonus_CIS_medical");
    SetPlanetaryBonusVoiceOver(REP, REP, 1, "");
    SetPlanetaryBonusVoiceOver(REP, CIS, 1, "");
    SetPlanetaryBonusVoiceOver(REP, REP, 2, "REP_bonus_REP_sensors");
    SetPlanetaryBonusVoiceOver(REP, CIS, 2, "REP_bonus_CIS_sensors");
    SetPlanetaryBonusVoiceOver(REP, REP, 3, "REP_bonus_REP_hero");
    SetPlanetaryBonusVoiceOver(REP, CIS, 3, "REP_bonus_CIS_hero");
    SetPlanetaryBonusVoiceOver(REP, REP, 4, "REP_bonus_REP_reserves");
    SetPlanetaryBonusVoiceOver(REP, CIS, 4, "REP_bonus_CIS_reserves");
    SetPlanetaryBonusVoiceOver(REP, REP, 5, "REP_bonus_REP_sabotage");--sabotage
    SetPlanetaryBonusVoiceOver(REP, CIS, 5, "REP_bonus_CIS_sabotage");
    SetPlanetaryBonusVoiceOver(REP, REP, 6, "");
    SetPlanetaryBonusVoiceOver(REP, CIS, 6, "");
    SetPlanetaryBonusVoiceOver(REP, REP, 7, "REP_bonus_REP_training");--advanced training
    SetPlanetaryBonusVoiceOver(REP, CIS, 7, "REP_bonus_CIS_training");--advanced training

    --ActivateBonus(CIS, "SNEAK_ATTACK")
    --ActivateBonus(REP, "SNEAK_ATTACK")

    SetAttackingTeam(ATT)

--Opening Satalite Shot
--Geo
--Mountain
AddCameraShot(0.996091, 0.085528, -0.022005, 0.001889, -6.942698, -59.197201, 26.136919);
--Wrecked Ship
AddCameraShot(0.906778, 0.081875, -0.411906, 0.037192, 26.373968, -59.937874, 122.553581);
--War Room   
AddCameraShot(0.994219, 0.074374, 0.077228, -0.005777, 90.939568, -49.293945, -69.571136);
end

mods and maps in progress:<br />--Bf1 expanded edition 3.0 version
-- bf1 tcw battles
-- bf1 seasons mod season 1
-- bf2 expanded edition tbh

wait never mind it was my custom sound lvl i had bot cw and gcw mentioned there.
mods and maps in progress:<br />--Bf1 expanded edition 3.0 version
-- bf1 tcw battles
-- bf1 seasons mod season 1
-- bf2 expanded edition tbh