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:
Please help me.
problem with the command: "AddUnitClass"[SOLVED]
Moderator: Moderators
- hunting shadow
- Private First Class
- Posts: 79
- Joined: Sun Jan 18, 2009 11:37 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Somewhere in the wilderness of Mandalore
- Contact:
problem with the command: "AddUnitClass"[SOLVED]
Last edited by hunting shadow on Fri Jan 23, 2009 9:58 am, edited 1 time in total.
- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: problem with the command: "AddUnitClass"
you have to write the addunitclass command into the setupteams section
-
Aman/Pinguin
- Jedi

- Posts: 1104
- Joined: Tue Jan 30, 2007 6:04 am
- Projects :: Inactive
- Location: Germany
Re: problem with the command: "AddUnitClass"
No, you don't have to. It just has to be BEFORE the SetHeroClass() command.
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: problem with the command: "AddUnitClass"
and you really shouldn'tAman/Pinguin wrote:No, you don't have to.
- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: problem with the command: "AddUnitClass"
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
my fault
- [RDH]Zerted
- Gametoast Staff

- Posts: 2982
- Joined: Sun Feb 26, 2006 7:36 am
- Projects :: Bos Wars AI - a RTS game
- xbox live or psn: No gamertag set
- Location: USA
- Contact:
Re: problem with the command: "AddUnitClass"
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.
- hunting shadow
- Private First Class
- Posts: 79
- Joined: Sun Jan 18, 2009 11:37 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Somewhere in the wilderness of Mandalore
- Contact:
Thank you
Yeah, it runs. Thank you very much 
- G_M_StYlEr_M
- Rebel Sergeant

- Posts: 194
- Joined: Wed Oct 01, 2008 5:59 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: germany
- Contact:
Re: problem with the command: "AddUnitClass"
this problem i have tooDarthD.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
my lua is every broken
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: problem with the command: "AddUnitClass"
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.
