Page 1 of 1
problem with the command: "AddUnitClass"[SOLVED]
Posted: Sun Jan 18, 2009 12:18 pm
by hunting shadow
Hi,
I have a question: I tried to add an additional unit with the command: AddUnitClass
But when I munge and play the map, there shows up the teams hero instead of the unit I added with the command. The ai is able to polay the extra unit, but I'm not. I addded a screenshot of my lua to show you what i mean:
addunit.gif
Please help me.
Re: problem with the command: "AddUnitClass"
Posted: Sun Jan 18, 2009 12:23 pm
by DarthD.U.C.K.
you have to write the addunitclass command into the setupteams section
Re: problem with the command: "AddUnitClass"
Posted: Sun Jan 18, 2009 12:31 pm
by Aman/Pinguin
No, you don't have to. It just has to be BEFORE the SetHeroClass() command.
Re: problem with the command: "AddUnitClass"
Posted: Sun Jan 18, 2009 6:40 pm
by [RDH]Zerted
Aman/Pinguin wrote:No, you don't have to.
and you really shouldn't
Re: problem with the command: "AddUnitClass"
Posted: Mon Jan 19, 2009 1:32 am
by DarthD.U.C.K.
you are right, i thouht it had to be in the brackets because its in them in hero assault, i looked into the eli lua another time-it has two setupteam commands
my fault

Re: problem with the command: "AddUnitClass"
Posted: Mon Jan 19, 2009 2:59 am
by [RDH]Zerted
It would still work in the SetupTeams section, but thats not the proper place to put it. I don't know why a few of the official scripts do it that way. They really shouldn't have.
Thank you
Posted: Mon Jan 19, 2009 7:33 am
by hunting shadow
Yeah, it runs. Thank you very much

Re: problem with the command: "AddUnitClass"
Posted: Mon Jan 19, 2009 12:12 pm
by G_M_StYlEr_M
DarthD.U.C.K. wrote:you are right, i thouht it had to be in the brackets because its in them in hero assault, i looked into the eli lua another time-it has two setupteam commands
my fault

this problem i have too

my lua is every broken

Re: problem with the command: "AddUnitClass"
Posted: Tue Jan 20, 2009 11:54 am
by Teancum
I'm a little rusty, but if I remember right SetHeroClass has to be last. So if you have an AddUnitClass it has to be above it.