Page 1 of 1

Removing heros from Conquest [Solved]

Posted: Thu Dec 11, 2008 5:52 pm
by Fiodis
Is it possible to remove hero units from conquest mode? And if so, how?

I ask because it seems to be messing up my map. I tried to add another unit class,making it the blue ARC. I set the hero as the ep2 rifleman. Now, when I play, the hero is the blue ARC. If you spawn as him as a normal unit, he has a hero's life counter. So, I thought removing heros might fix this. But removing the hero lines in the LUA just crashes my map.

My LUA:
Hidden/Spoiler:
[code] 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_inf_ep2_rocketeer",
"rep_inf_ep2_rifleman",
"rep_hover_fightertank",
"rep_hero_anakin",
"rep_hover_barcspeeder")
ReadDataFile("DC:SIDE\\assassin.lvl",
"rep_inf_clone_assassin")
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_stap",
"cis_hover_aat")
ReadDataFile("SIDE\\imp.lvl",
"imp_hero_bobafett")


ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_laser",
"tur_bldg_tower")

SetupTeams{
rep = {
team = REP,
units = 20,
reinforcements = 150,
soldier = { "rep_inf_ep3_rifleman",9, 25},
assault = { "rep_inf_ep3_rocketeer",1, 4},
engineer = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = { "rep_inf_ep3_jettrooper",1, 4},

},

cis = {
team = CIS,
units = 20,
reinforcements = 150,
soldier = { "cis_inf_rifleman",9, 25},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_droideka",1, 4},
}
}

SetHeroClass(CIS, "imp_hero_bobafett")
SetHeroClass(REP, "rep_inf_ep2_rocketeer")

AddUnitClass(REP, "rep_inf_ep2_rifleman",1, 4)[/code]

Re: Removing heros from Conquest

Posted: Thu Dec 11, 2008 6:27 pm
by Commander_Fett
Well, for one thing, if you want to set the ARC as the hero, you'd have to copy the rep_inf_ep2_rocketeer odf file, rename it to rep_hero_ep2_rocketeer, copy all the info from the rep_inf_default_rocketeer (except the parent class part) and paste it in the rep_hero_ep2_rocketeer, then set the parent to com_hero_default. That should work, as long as you make it's req and add it to your side's req. If you just want to remove the hero, though, just delete this line:
SetHeroClass(REP, "rep_inf_ep2_rocketeer")

Note: all the names are purely for reference, you can name your troop odf whatever you want, like "ubershnitzel", you just have to have the class parent and reqs set up right.

Re: Removing heros from Conquest

Posted: Thu Dec 11, 2008 6:30 pm
by Fiodis
No, my problem is that I try to ad the ep2_rocketeer as a 7th unit class, and it is a 7th unit class but it has a hero timer. The hero in the LUA is rep_inf_ep2_rifleman. He doesn't show up in-game, instead the hero is the jet trooper.


EDIT - I got the unit thing to work, but still, how do you delete the heros? I tried getting rid of the line in the LUA, but it crashed my game.

Re: Removing heros from Conquest

Posted: Thu Dec 11, 2008 7:23 pm
by Commander_Fett
Oh? It must be something else, because I removed that from what's being read and it works perfectly. :? Can you post a BF2 log?

Re: Removing heros from Conquest

Posted: Thu Dec 11, 2008 7:32 pm
by Fiodis
Er, I can't actually, because there isn't one, because I got it fixed. It turned out that, when deleting the lines, I forgot to take away the "S" in "SetHeroClass". :oops:

Sorry about that.