Add Unit.....
Moderator: Moderators
-
Alpha-17
- Master Sergeant

- Posts: 165
- Joined: Mon Jan 22, 2007 2:26 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
Add Unit.....
Hi all,
I got some Problems ... Can you say me what I should do and write into the .lua to add an 7. trooper to the others ??
THX !
I got some Problems ... Can you say me what I should do and write into the .lua to add an 7. trooper to the others ??
THX !
-
Darth_Z13
- Jedi High Council

- Posts: 2275
- Joined: Sat Jun 17, 2006 9:51 am
- xbox live or psn: Xanthius Wylon
- Location: Canada
RE: Add Unit.....
What's a 7. trooper?
-
Alpha
RE: Add Unit.....
A seventh trooper class is what he's talking about.
-
Penguin
- Jedi Admin

- Posts: 2541
- Joined: Sun Mar 05, 2006 12:00 am
- Location: Australia
RE: Add Unit.....
Theres marine or pilot((if an engineer is put in this spot they will heal ships))
Take a look at the eli lua's.
Take a look at the eli lua's.
-
EGG_GUTS
- Master Bounty Hunter

- Posts: 1626
- Joined: Thu Dec 07, 2006 7:38 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: CANADA!
-
Penguin
- Jedi Admin

- Posts: 2541
- Joined: Sun Mar 05, 2006 12:00 am
- Location: Australia
-
Alpha-17
- Master Sergeant

- Posts: 165
- Joined: Mon Jan 22, 2007 2:26 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
-
Xavious
- Sith Master

- Posts: 2783
- Joined: Mon Jun 12, 2006 3:46 pm
Here's an exmaple of a working set-up teams with extra units.
SetupTeams{
rep = {
team = REP,
units = 64,
reinforcements = 200,
soldier = { "rep_inf_ep3_rifleman",9, 55},
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 = 64,
reinforcements = 200,
soldier = { "cis_inf_rifleman",9, 55},
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},
}
}
AddUnitClass(CIS, "cis_inf_marine",1,5)
AddUnitClass(REP, "rep_hero_obiwan",1,1)
AddUnitClass(CIS, "cis_hero_darthmaul",1,1)
AddUnitClass(REP, "all_inf_rocketeer",1,1)
SetHeroClass(CIS, "cis_hero_grievous")
SetHeroClass(REP, "rep_hero_anakin")
-
Alpha-17
- Master Sergeant

- Posts: 165
- Joined: Mon Jan 22, 2007 2:26 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
I tried it but this is what happened :
C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\NIG\NIGc_con.lua:94: unexpected symbol near `)'
ERROR[scriptmunge scripts\NIG\NIGc_con.lua]:Could not read input file.ERROR[scriptmunge scripts\NIG\NIGc_con.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings
C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\NIG\NIGc_con.lua:94: unexpected symbol near `)'
ERROR[scriptmunge scripts\NIG\NIGc_con.lua]:Could not read input file.ERROR[scriptmunge scripts\NIG\NIGc_con.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings
-
The_Emperor
- Supreme Galactic Ruler
- Posts: 2118
- Joined: Sat Dec 10, 2005 6:30 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Waaaaay over there.
-
Droideka88
If anyone such as Darth_maul knows about this, could I simply delete the set hero classes and add the extra units? Also, why do AddUnitClass have to come after the other two sides such as CIS and REP.AddUnitClass(CIS, "cis_inf_marine",1,5)
AddUnitClass(REP, "rep_hero_obiwan",1,1)
AddUnitClass(CIS, "cis_hero_darthmaul",1,1)
AddUnitClass(REP, "all_inf_rocketeer",1,1)
SetHeroClass(CIS, "cis_hero_grievous")
SetHeroClass(REP, "rep_hero_anakin")
-
Darth_Z13
- Jedi High Council

- Posts: 2275
- Joined: Sat Jun 17, 2006 9:51 am
- xbox live or psn: Xanthius Wylon
- Location: Canada
Here's the code from one of the modes in my Conversion Showcase to help some people out.
Code: Select all
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},
},
}
AddUnitClass(REP,"imp_inf_commander_black", 1,2)
AddUnitClass(REP,"imp_inf_commander_grey", 1,2)
SetupTeams{
cis = {
team = CIS,
units = 20,
reinforcements = 150,
soldier = { "rep_inf_boss_commando",9, 25},
assault = { "rep_inf_fixer_commando",1, 4},
engineer = { "rep_inf_scorch_commando",1, 4},
sniper = { "rep_inf_sev_commando",1, 4},
officer = {"rep_inf_caboose_commando",1, 4},
special = { "rep_inf_marz_commando",1, 4},
}
}
-
Xavious
- Sith Master

- Posts: 2783
- Joined: Mon Jun 12, 2006 3:46 pm
That error is somewhere in the area where you called for your units.Alpha-17 wrote:I tried it but this is what happened :
C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\NIG\NIGc_con.lua:94: unexpected symbol near `)'
ERROR[scriptmunge scripts\NIG\NIGc_con.lua]:Could not read input file.ERROR[scriptmunge scripts\NIG\NIGc_con.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings
(Underneath ReadDataFile("SIDE\\###.lvl)
You put an extra character there where it isn't needed.
Yes, but I think you also need to edit out the "EnableSPHeroRules" line.Droideka88 wrote:If anyone such as Darth_maul knows about this, could I simply delete the set hero classes and add the extra units?
-
Darth_Z13
- Jedi High Council

- Posts: 2275
- Joined: Sat Jun 17, 2006 9:51 am
- xbox live or psn: Xanthius Wylon
- Location: Canada
