SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF2 Modding => Topic started by: CrazyGentleman on January 04, 2017, 07:11:19 AM

Title: [ISSUE]Problem with adding a new class to a side [Solved]
Post by: CrazyGentleman on January 04, 2017, 07:11:19 AM
Hello there,

Kinda new on modding for this game, but I've been in the modding scene for quite some years now. Now the issue is that I have made class called "rep_inf_atrtdriver", including all the odfs, reqs and what not. It works, but only if replace it with one of the default classes, which is not what I want. I checked on the forums here and found a tutorial and followed it completely but the only extra class that shows up is hero anakin, which bothers me a bit.  Here's what's inside the map's .lua:

[spoiler]   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, "cis_hero_darthmaul")
    SetHeroClass(REP, "rep_hero_anakin")
   
    AddUnitClass(REP, "rep_inf_atrtdriver",1,4)[/spoiler]

I hope somebody can help me out, and thanks in advance!

CrazyGentleman



Title: Re: [ISSUE]Problem with adding a new class to a side
Post by: Cdt Fox on January 04, 2017, 07:52:11 AM
you should add the "Addunitclassblabla" before the SetHeroClass one   :)
Title: Re: [ISSUE]Problem with adding a new class to a side
Post by: CrazyGentleman on January 04, 2017, 09:15:35 AM
Ah, why didn't I think of that? :slap: Worked like a charm! Thanks!  :tu:
EhPortal 1.34 © 2024, WebDev