Page 1 of 1

removing a unit class

Posted: Mon Feb 04, 2008 8:12 pm
by elfie
anyone know how to remove a unit class from your lua? P.S I have only one era for my map

Re: removing a unit class

Posted: Mon Feb 04, 2008 9:51 pm
by SilvaDalek
Something easy! Yay!

Code: Select all

ReadDataFile("sound\\yav.lvl;yav1cw")
    ReadDataFile("dc:SIDE\\rep.lvl,
                             "rep_inf_ep3_rifleman",
                             "rep_inf_ep3_rocketeer",
                             "rep_inf_ep3_engineer",
                             "rep_inf_ep3_sniper",
                             "rep_inf_ep3_officer",
                             "rep_inf_ep3_jettrooper",
                             "rep_hover_fightertank",
                             "rep_hero_anakin",
                             "rep_hover_barcspeeder")
    ReadDataFile("SIDE\\cis.lvl",
                             "cis_inf_rifleman",
                             "cis_inf_rocketeer",
                             "cis_inf_engineer",
                             "cis_inf_sniper",
                             "cis_inf_officer",
                             "cis_inf_droideka",
                             "cis_hero_darthmaul",
                             "cis_hover_aat")
So you see this right? It will look similar in Galactic Civil War, just different names. Let's say we want rifleman gone. We take out his row. See?

Code: Select all

ReadDataFile("sound\\yav.lvl;yav1cw")
    ReadDataFile("dc:SIDE\\rep.lvl,
                             "rep_inf_ep3_rocketeer",
                             "rep_inf_ep3_engineer",
                             "rep_inf_ep3_sniper",
                             "rep_inf_ep3_officer",
                             "rep_inf_ep3_jettrooper",
                             "rep_hover_fightertank",
                             "rep_hero_anakin",
                             "rep_hover_barcspeeder")
    ReadDataFile("SIDE\\cis.lvl",
                             "cis_inf_rocketeer",
                             "cis_inf_engineer",
                             "cis_inf_sniper",
                             "cis_inf_officer",
                             "cis_inf_droideka",
                             "cis_hero_darthmaul",
                             "cis_hover_aat")
(Note: The dc is only for if you have copied that sides folder and the Common folder from assets and put that in the map's side folder)

Re: removing a unit class

Posted: Mon Feb 04, 2008 10:12 pm
by AceMastermind
Actually, you only need to remove the units that you don't want from the SetUpTeams section.

Re: removing a unit class

Posted: Mon Feb 04, 2008 10:15 pm
by SilvaDalek
This works too. So if I added a unit I would have to put him in the setup teams too :roll:?