Page 1 of 1

AddUnitClass in space maps

Posted: Sun Apr 09, 2006 11:54 am
by jkempster
hi im working on a space map which will have for republic- rep pilot, rep marine, obiwan and anakin. then for cis- cis pilot, super battledroid, dooku, grievous and possible magnas or droideka maybe both, basically for 2 people to play online as anakin or obi and fly into the cis ship with loads of droids. anyway i have tried using the same addunitclass as a hero assault map -
AddUnitClass(REP,"rep_hero_anakin", 1,1)
AddUnitClass(REP,"rep_hero_obiwan", 1,1)
AddUnitClass(CIS,"cis_hero_countdooku",1,1)
AddUnitClass(CIS,"cis_hero_grievous",1,1)

when i munge i get this -

C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\BOC\BOCc_cmn.lua:68: `)' expected near `}'
ERROR[scriptmunge scripts\BOC\BOCc_cmn.lua]:Could not read input file.ERROR[scriptmunge scripts\BOC\BOCc_cmn.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings

ERROR[levelpack mission\BOCc_Diet Dr. Pepper.req]:Expecting bracket, but none was found.
File : munged\pc\bocc_cmn.script.req(1)...

ucft <--
ERROR[levelpack mission\BOCc_Diet Dr. Pepper.req]:Expecting bracket, but none was found.
File : munged\pc\bocc_cmn.script.req(1)...

ucft <--

2 Errors 0 Warnings

then when i load the map none of the addunitclass troops are there, and yes i have added them to the ReadDataFile. can anyone decypher the errors or tell me how they got the addunitclass in space if they have managed it, thanks :D

Posted: Sun Apr 09, 2006 12:02 pm
by jkempster
No sorry my mistake, i do it like that and get no errors what so ever, but nothing which is an addunitclass appears in the game, hmmm. anyone got ideas?

Posted: Sun Apr 09, 2006 12:09 pm
by BF2-Master
Well, you could try changing:

marine = {unitname}
pilot = {unitname}

to

rifleman = {unitname}
assault = {unitname}
engineer = {unitname}
sniper = {unitname}
officer = {unitname}
special = {unitname}

Posted: Sun Apr 09, 2006 12:12 pm
by jkempster
good idea thanks il just try that now, i'll be 5 ish mins

edit just done the LUA its munging right now