Page 1 of 1

How do I add locals?

Posted: Mon Feb 27, 2006 8:57 am
by Darth-Derkie
I want to have the geonosians in my map. In my lua:

ReadDataFile("sound\\geo.lvl;geo1cw")
ReadDataFile("dc:sound\\sou1.lvl;sou1cw")
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep2_rifleman",
"rep_inf_ep2_rocketeer",
"rep_inf_ep2_engineer",
"rep_inf_ep2_sniper",
"rep_inf_ep2_rocketeer_chaingun",
"rep_inf_ep2_jettrooper",
"rep_hover_fightertank",
"rep_walk_atte",
"rep_fly_gunship",
"rep_hero_macewindu",
"rep_hover_barcspeeder")
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_fly_geofighter",
"cis_inf_sniper",
"cis_walk_spider",
"cis_tread_hailfire",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_countdooku",
"cis_hover_aat")
ReadDataFile("SIDE\\geo.lvl",
"gen_inf_geonosian")
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_fly_geofighter")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_geoturret")


SetupTeams{
rep = {
team = REP,
units = 20,
reinforcements = 150,
soldier = { "rep_inf_ep2_rifleman",9, 25},
assault = { "rep_inf_ep2_rocketeer",1, 4},
engineer = { "rep_inf_ep2_engineer",1, 4},
sniper = { "rep_inf_ep2_sniper",1, 4},
officer = {"rep_inf_ep2_rocketeer_chaingun",1, 4},
special = { "rep_inf_ep2_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, "cis_hero_countdooku")
SetHeroClass(REP, "rep_hero_macewindu")

-- Attacker Stats

--teamATT = ConquestTeam:New{team = ATT}
--teamATT:AddBleedThreshold(21, 0.75)
--teamATT:AddBleedThreshold(11, 2.25)
--teamATT:AddBleedThreshold(1, 3.0)
--teamATT:Init()
SetTeamAsEnemy(ATT,3)
SetTeamAsEnemy(3,ATT)

-- Defender Stats

--teamDEF = ConquestTeam:New{team = DEF}
--teamDEF:AddBleedThreshold(21, 0.75)
--teamDEF:AddBleedThreshold(11, 2.25)
--teamDEF:AddBleedThreshold(1, 3.0)
--teamDEF:Init()
SetTeamAsFriend(DEF,3)

-- Local Stats
SetTeamName(3, "locals")
SetUnitCount(3, 7)
AddUnitClass(3, "geo_inf_geonosian", 7)
SetTeamAsFriend(3, DEF)
--SetTeamName(4, "locals")
--AddUnitClass(4, "rep_inf_jedimale",1)
--AddUnitClass(4, "rep_inf_jedimaleb",1)
--AddUnitClass(4, "rep_inf_jedimaley",1)
--SetUnitCount(4, 3)
--SetTeamAsFriend(4, ATT)

ZeroEditor:
I have a path for the Geonosians.
Image
Image

What am I doing wrong, because there are still no Geonosians spawning.

RE: How do I add locals?

Posted: Mon Feb 27, 2006 9:37 am
by Jawa_Killer
team 3 in the CP field?

Posted: Mon Feb 27, 2006 9:43 am
by Darth-Derkie
I thought locals could spawn from a ally's cp. Maybe I have to make invisible cp's...

Edit: That didn't work. They were visible, but not on the minimap. The Geonosians weren't spawning either.

Posted: Mon Feb 27, 2006 10:48 am
by Teancum
Hmm...my only guess is that you don't have them initialized at the very top of the lua (where ATT / DEF stuff is) -- take a look at kas2.lua or tat2_hunt.lua to see how they changed local spawning for BF2. Other than that, I'm stumped. For BF1, it would have worked fine. The only other guess I would have if my first suggestion doesn't work is to look for spelling errors or case-sensitive errors.

Posted: Mon Feb 27, 2006 12:45 pm
by Darth-Derkie
Hm... I think I've found it:

-- Empire Attacking (attacker is always #1)
REP = 1
CIS = 2
-- These variables do not change
ATT = 1
DEF = 2

WookieTeam= 3

In the geonosis lua wasn't something like that. Thanks, Teancum. I hope it works :D

Edit: It didn't work, still no Geonosians...