Make AI Commander Stronger

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Benoz
Corporal
Corporal
Posts: 142
Joined: Tue May 28, 2013 12:34 pm
Projects :: Clone Wars Era Mod Version 2
Games I'm Playing :: OldFront - EAFront
xbox live or psn: No gamertag set
Location: Germany

Make AI Commander Stronger

Post by Benoz »

Hello Community,

I'm working on a mod where you can play as a clone or droid Commander and everytime I play CIS, a clone commander e.g. Commander Appo on Coruscant runs around.
That's great, but when it comes to combat or health, the Commander doesn't differ from other troopers when it comes to AI.

So the question is: Is it possible (in the lua maybe) to make a single UnitType stronger in combat and give it more HP?
I know that you can call the event SetClassProperty("blablabla", "MaxHealth", "x"). But can you also call that event for AI units only?
Because if I select the commanders unit the health and stuff should be back to normal again.

Can you check with some specific function in the lua if the current user of the unit is AI?

it would be so cool to make special AI units stronger.
Thank you in advance,

The66Order66
User avatar
Kingpin
Jedi
Jedi
Posts: 1096
Joined: Fri Sep 13, 2013 7:09 pm
Projects :: The Sith Wars II
Location: Denver, CO
Contact:

Re: Make AI Commander Stronger

Post by Kingpin »

You could set them as AI controlled heroes.
http://www.gametoast.com/viewtopic.php?f=27&t=19003
User avatar
Benoz
Corporal
Corporal
Posts: 142
Joined: Tue May 28, 2013 12:34 pm
Projects :: Clone Wars Era Mod Version 2
Games I'm Playing :: OldFront - EAFront
xbox live or psn: No gamertag set
Location: Germany

Re: Make AI Commander Stronger

Post by Benoz »

You could set them as AI controlled heroes.
Is it possible to have more such heroes since I have a commander and a captain.
And do those heroes disappear when I play as commander/captain?
User avatar
Kingpin
Jedi
Jedi
Posts: 1096
Joined: Fri Sep 13, 2013 7:09 pm
Projects :: The Sith Wars II
Location: Denver, CO
Contact:

Re: Make AI Commander Stronger

Post by Kingpin »

If you need to make multiple of them, I would set them as a 3rd team with those units. Then, make that same unit available as a playable unit, but greatly reduce the health of the playable one. You can find some information about adding a local team here: http://www.gametoast.com/viewtopic.php?f=27&t=6088
User avatar
Benoz
Corporal
Corporal
Posts: 142
Joined: Tue May 28, 2013 12:34 pm
Projects :: Clone Wars Era Mod Version 2
Games I'm Playing :: OldFront - EAFront
xbox live or psn: No gamertag set
Location: Germany

Re: Make AI Commander Stronger

Post by Benoz »

Is it possible to disable the 3rd team to spawn as soon as the palyer selects to play as the commander/captain?
Do you have to programm this in the lua?
Post Reply