How to spawn no AI [Solved]

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
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

How to spawn no AI [Solved]

Post by Fierfek »

How do you set up the LUA so one side spawns no AI, but the other does? I want to create a level like Yavin 4 Bloodjob from BF1 (survivor mode).
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: No AI

Post by elfie »

You can do it in the lua. Just make one side have 1 unit on the field at a time and there will be no AI for that side.
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Re: No AI

Post by Fierfek »

elfie wrote:You can do it in the lua. Just make one side have 1 unit on the field at a time and there will be no AI for that side.
1 thing though - I want to have multiple human units on the field at a time, just no AI. So, in a multiplayer game, multiple human players could spawn on that team, but no AI.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: No AI

Post by [RDH]Zerted »

elfie wrote:You can do it in the lua...
AllowAISpawn( <team number>, false )
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Re: No AI

Post by Fierfek »

[RDH]Zerted wrote:
elfie wrote:You can do it in the lua...
AllowAISpawn( <team number>, false )
Where is that string (AllowAISpawn)? I couldn't find it in my conquest lua.
User avatar
Eggman
Master Bounty Hunter
Master Bounty Hunter
Posts: 1516
Joined: Mon Jul 16, 2007 1:30 pm
Projects :: Battlefront Chronicles
Location: Las Vegas

Re: No AI

Post by Eggman »

Fierfek wrote:
[RDH]Zerted wrote:
elfie wrote:You can do it in the lua...
AllowAISpawn( <team number>, false )
Where is that string (AllowAISpawn)? I couldn't find it in my conquest lua.
You need to add it in yourself.
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Re: No AI

Post by Fierfek »

Eggman wrote:
Fierfek wrote:
[RDH]Zerted wrote:
elfie wrote:You can do it in the lua...
AllowAISpawn( <team number>, false )
Where is that string (AllowAISpawn)? I couldn't find it in my conquest lua.
You need to add it in yourself.
Is this what it should look like:
AllowAISpawn( 1, false )
And where does it go in the lua?
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: No AI

Post by [RDH]Zerted »

Sorry, if I had checked your post count I would have written more text. Yes, that code is correct. It goes anywhere in your PostScriptLoad() function.
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Re: No AI

Post by Fierfek »

[RDH]Zerted wrote:Sorry, if I had checked your post count I would have written more text. Yes, that code is correct. It goes anywhere in your PostScriptLoad() function.
Okay, that worked. Thanks!
Post Reply