ai spawning in a flying ship

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
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

ai spawning in a flying ship

Post by lucasfart »

i made two cis droid gunships as cp's in my map and ai keep spawning in mid air. is there any way to stop this??
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: ai spawning in a flying ship

Post by MercuryNoodles »

So far as I know, no. It's just part of being a CP. As a complete guess, you could try setting AllyCount to 0, but I'd only try this if you want to stop the AI from spawning altogether, and I've no clue whether it will affect player controlled units. There might be a way to change this via scripts when it enters a region, but I can't really go into details, since I'm a little out of my depth.
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: ai spawning in a flying ship

Post by lucasfart »

i'll try that but i have a feeling that won't work.....
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: ai spawning in a flying ship

Post by Teancum »

It works correctly in space due to Landing Regions in each hangar bay. When no landing regions are defined the AI don't know when it's safe to spawn, and they always do so. But if you define a landing region, flyers can only land in that area.
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: ai spawning in a flying ship

Post by lucasfart »

how do i define a landing region??
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: ai spawning in a flying ship

Post by Maveritchell »

Add the line "SetGroundFlyerMap(1);" to ScriptInit in your .lua.
Post Reply