Glitch Storm Trooper Corporal
Messages : 408 Registration Date : 2012-04-02 Age : 29 Location : Baktoid Combat Automata
| Subject: [unrésolu]AI playing as heroes? 6/4/2012, 6:24 pm | |
| During the campagin General Grevious appears as a bot as well as a few other heroes. How would you allow the AI to use the heroes on the stock missions such as CTF and Conquest when available?
Last edited by Glitch on 8/26/2012, 3:10 am; edited 1 time in total |
|
yuke5 Private
Messages : 17 Registration Date : 2011-09-21 Age : 28 Location : Upstate NY
| Subject: Re: [unrésolu]AI playing as heroes? 6/9/2012, 3:29 pm | |
| Archer01 made a script which you load in via LUA.
http://www.mediafire.com/?pai4tiinbf3tgcn
But as far as doing so using side.lvl's, I am unaware. |
|
Glitch Storm Trooper Corporal
Messages : 408 Registration Date : 2012-04-02 Age : 29 Location : Baktoid Combat Automata
| Subject: Re: [unrésolu]AI playing as heroes? 1/9/2013, 9:28 am | |
| I finally got to this stage in "USM" and have been experimenting with two different methods of adding AI heroes. Method 1- Spoiler:
- Added new and existing heroes to the JED side
- Copied "com_hero_default" renamed to "jed_inf_default"
- Placed "jed_inf_default" in jed side folder
- Replaced all "com_hero_default" in unit odf's with "jed_inf_default"
- Added AddUnitClass(REP, "jed_hero_obiwan",0,1) under SetupTeams to used mission.lua's
- Munged and played with added heroes
Pros- AI Are able to play as heroes
- Very easy to do
Cons- Upon hero death game states that the hero was killed rather than defeated
- Hero options in instant action menu no longer have any in game effect
- No more regenerative health
- Heroes are always accessible after unlock (Over-Use)
- Spoiler:
Method 2- Spoiler:
- Go into the "\Common" folder for your map
- Find the "mission.req" file and open it in a text/script editor
- Find the list that begins with "script"
- Add "AIHeroSupport" to the end of the script list
- Copy the "AIHeroSupport.lua" file into your map's "\Common\scripts" folder
- In mission.lua's Under conquest:Start() I added these lines
herosupport = AIHeroSupport:New{AIATTHeroHealth = 2500, AIDEFHeroHealth = 3000, gameMode = "conquest",} herosupport:SetHeroClass(REP, "jed_hero_obiwan") herosupport:AddSpawnCP("CP1CON","CP1CONPATH") herosupport:AddSpawnCP("CP2CON","CP2CONPATH") herosupport:AddSpawnCP("CP3CON","CP3CONPATH") herosupport:AddSpawnCP("CP4CON","CP4CONPATH") herosupport:AddSpawnCP("CP5CON","CP5CONPATH") herosupport:AddSpawnCP("CP6CON","CP6CONPATH") herosupport:Start()
- Removed the line --SetHeroClass(JED, "jed_hero_obiwan")
Pros- Hero settings in instant action menu effect game
- Regenerative Health
Cons- Takes more time (Worth it)
- Have not done successfully yet (I'm sure I'm missing a line of code, re-doing now)
|
|
Sponsored content
| Subject: Re: [unrésolu]AI playing as heroes? | |
| |
|