Page 1 of 1

AI Hero Support script for units?

Posted: Sat Mar 20, 2010 2:58 am
by lucasfart
As the title indicates, i'm wondering how i would go about setting up a few of my units so that they operate like the AIherosupport script by Archer01. I want to have only one unit of commander cody on the map, but if i do this, the ai won't use him. If i create two slots for him, there might be two commander cody's running around, which wouldn't be good. I want to make it so that one ai will always use him, but if the player selects him in the unit screen, the ai player is killed and the player takes his place. i'm pretty sure this would be possible seeing as Archer did it, but i'm just wondering if you guys could help me with it, and if it would be too hard for an inexperienced scripter like myself...

Re: AI Hero Support script for units?

Posted: Sat Mar 20, 2010 3:39 am
by Lagomorphia
Add him as a normal unit but with only one slot. Ensure you put (1,1) in the unit counts rather than (0,1) though otherwise the AI will rarely spawn as him. Also make sure he has a points to unlock' line in his odf otherwise the maximum amount thing won't work.

Re: AI Hero Support script for units?

Posted: Sat Mar 20, 2010 4:15 am
by lucasfart
If there is only one of a unit, the ai won't use it unless you're on the other team, which i'm afraid won't be possibe for what i've planned(campaign).

What about maximum amount/points to unlock? i didn't even mention them...