AI Hero Support script for units?
Moderator: Moderators
- lucasfart
- Sith

- Posts: 1440
- Joined: Tue Feb 24, 2009 5:32 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Australia
AI Hero Support script for units?
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...
- Lagomorphia
- Major

- Posts: 502
- Joined: Sun Dec 13, 2009 10:02 am
Re: AI Hero Support script for units?
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.
- lucasfart
- Sith

- Posts: 1440
- Joined: Tue Feb 24, 2009 5:32 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Australia
Re: AI Hero Support script for units?
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...
What about maximum amount/points to unlock? i didn't even mention them...
