AddUnitClass in space maps

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
jkempster

AddUnitClass in space maps

Post 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
jkempster

Post 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?
BF2-Master
Captain
Captain
Posts: 468
Joined: Thu Mar 02, 2006 7:08 pm

Post 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}
jkempster

Post 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
Post Reply