AI not spawning as heros!

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
danrosen

AI not spawning as heros!

Post by danrosen »

I've searched a lot and checked and double checked my mission lua but cannot find a problem. I can spawn as any of the three jedi in the map just fine but the AI never do. This is conquest mode, and all of the normal units work fine.

Code: Select all

    ReadDataFile("dc:SIDE\\rep.lvl",
                             "rep_inf_ep3_rifleman",
                             "rep_inf_ep3_rocketeer",
                             "rep_inf_ep3_engineer",
                             "rep_inf_ep3_sniper_felucia",
                             "rep_inf_ep3_officer",
                             "rep_inf_ep3_jettrooper",
                             "rep_hover_fightertank",
                             "rep_hero_anakin",
                             "rep_hover_barcspeeder",
                             "rep_walk_atte",
                             "rep_walk_oneman_atst",
                             "rep_fly_gunship",
                             "rep_fly_anakinstarfighter_sc",
                             "rep_fly_vwing",
                             "rep_fly_arc170fighter_sc",
                             "rep_hero_obiwan",
                             "rep_hero_kiyadimundi",
                             "rep_inf_ep3_marine",
                             "rep_hero_macewindu")
    ReadDataFile("dc:SIDE\\cis.lvl",
                             "cis_inf_rifleman",
                             "cis_inf_rocketeer",
                             "cis_inf_engineer",
                             "cis_inf_sniper",
                             "cis_inf_officer",
                             "cis_inf_droideka",
                             "cis_hero_darthmaul",
                             "cis_hover_aat",
                             "cis_tread_snailtank",
                             "cis_hover_stap",
                             "cis_walk_spider",
                             "cis_tread_hailfire",
                             "cis_fly_droidfighter_sc",
                             "cis_fly_greviousfighter",
                             "cis_fly_tridroidfighter",
                             "cis_fly_droidgunship")
                             
                             
    ReadDataFile("SIDE\\tur.lvl", 
    			"tur_bldg_laser",
    			"tur_bldg_tower")          
                             
	SetupTeams{
		rep = {
			team = REP,
			units = 20,
			reinforcements = 150,
			soldier  = { "rep_inf_ep3_marine",4, 10},
			assault  = { "rep_inf_ep3_rocketeer",4, 10},
			engineer = { "rep_inf_ep3_engineer",4, 10},
			sniper   = { "rep_inf_ep3_sniper_felucia",4, 10},
			officer = { "rep_hero_kiyadimundi",1, 1},
			special = { "rep_hero_obiwan",1, 1},
	        
		},
		cis = {
			team = CIS,
			units = 20,
			reinforcements = 150,
			soldier  = { "cis_inf_rifleman",9, 25},
			assault  = { "cis_inf_rocketeer",1, 4},
			engineer = { "cis_inf_engineer",1, 4},
			sniper   = { "cis_inf_sniper",1, 4},
			officer = {"cis_inf_officer",1, 4},
			special = { "cis_inf_droideka",1, 4},
		}
	}
    AddUnitClass(REP,"rep_hero_macewindu",1, 1)

    SetHeroClass(CIS, "cis_hero_darthmaul")
Murdocr

RE: AI not spawning as heros!

Post by Murdocr »

try raising the unit count to, say 5 for each one of them. you may just not be able to find them. also it may be because the min/max count is set to 1
danrosen

Post by danrosen »

Hmm, I was kind of wanting there to be only one of each unit, so if I spawn as mace windu for example I want the AI Mace Windu to disappear. And I know the units are not spawning because of the 'Unit Count: 0' in the selection screen. Is 1,1 the right value for what I want?

EDIT: I can get them all to appear if I use 1,2 but then if I spawn as well there can be two of the same jedi. Can someone who has successfully made this system work please give me some more tips or magic spells? :P Thanks
CaptainMazda

Post by CaptainMazda »

You should perhaps PM Stager. Stager00.
Captain_Mazda

Post by Captain_Mazda »

Sorry about that, forgot my account had an underscore.
Murdocr

Post by Murdocr »

Captain_Mazda wrote:Sorry about that, forgot my account had an underscore.
?
Penguin
Jedi Admin
Jedi Admin
Posts: 2541
Joined: Sun Mar 05, 2006 12:00 am
Location: Australia

Post by Penguin »

replace it with this

SetupTeams{
rep = {
team = REP,
units = 32,
reinforcements = 150,
soldier = { "rep_inf_ep3_marine",4, 8},
assault = { "rep_inf_ep3_rocketeer",3, 6},
engineer = { "rep_inf_ep3_engineer",3, 6},
sniper = { "rep_inf_ep3_sniper_felucia",3, 6},
officer = { "rep_hero_kiyadimundi",1, 1},
special = { "rep_hero_obiwan",1, 1},
pinioncorp

Post by pinioncorp »

_____________________________________________________________
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯


Try playing as the opposing team. If you are on their team, the computer will never use the characters because it always reserves the one character slot for you. If you choose a class, it still keeps it open in case you ever decide to change.

If you play as the CIS, you would find 1 of each unit on the battlefield.

As for killing off the units when you would like to spawn as it, that would be stupid. Imagine you are fighting one and then it suddenly disappears because someone else decided to be one. However, it is probably possible with a bit of coding knowledge.

_____________________________________________________________
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
danrosen

Post by danrosen »

Hmm, to make things easier I may just make one of the Jedi a 'Hero', and the others I'll just stick in as 'locals' as one each. Thanks for the suggestions though everyone!
fat_walrus

Post by fat_walrus »

Is it a custom side? I see the "dc:SIDE".
danrosen

Post by danrosen »

Yeah, I've just modified a lot of republic stuff and CIS stuff.
fat_walrus

Post by fat_walrus »

Maybe don't load the infantry you don't want. That might help
Post Reply