No Capturing a CP

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
Broadus
Second Lance Corporal
Second Lance Corporal
Posts: 110
Joined: Thu Sep 21, 2006 1:23 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

No Capturing a CP

Post by Broadus »

How can I use a script to prevent AI AND players from capturing a command post? Like, AICanCaptureCP (CP number, then true/false) stops the AI from capturing CPs, but I also want to stop players from capturing CPs.
Last edited by Broadus on Mon Feb 05, 2007 10:26 pm, edited 1 time in total.
fat_walrus

Post by fat_walrus »

Just remove the controlzone in ZE.
User avatar
Broadus
Second Lance Corporal
Second Lance Corporal
Posts: 110
Joined: Thu Sep 21, 2006 1:23 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Broadus »

I'm modifying the PSP game, so I can't do that. All I can do is hex edit, or make my own mission.lvl.
And also, I'm trying to make two versions of Geonosis: A standard Conquest one, and an Uber-like one where it's just everyone killing eachother. There's no Uber version of Geonosis on the PSP like on the PC, so there's no special setup of the command posts. Setting the gametype to non-conquest doesn't mean that the conquest CPs can't be captured.
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

Post by Teancum »

Under ScriptPostLoad()

SetProperty("CP_NAME_HERE", "CaptureRegion", "")
User avatar
Broadus
Second Lance Corporal
Second Lance Corporal
Posts: 110
Joined: Thu Sep 21, 2006 1:23 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Broadus »

Hey, thanks! Though I'm already running into some problems.
On Geonosis, it seemed to work just fine, but after a few seconds, all of the Republic CPs slowly went under the control of the CIS at the exact-same time. It would randomly stop, leading me to believe that one of the CIS AI somewhere was walking into the place where the CaptureRegions had apparently been relocated or something. When playing as the CIS myself, I walked around a bit but never did I run into a place where I would suddenly start capturing CPs.
I tried it on a different level (Coruscant "Order 66") in which I didn't want anyone capturing CPs, and it worked perfectly fine throughout the battle, reinforcing my theory that there's some new place the CaptureRegions went to on Geonosis that's making all of the CPs get captured by the CIS at the same time.

I pretty much fixed the problem on Geonosis by setting AICanCaptureCP to False for every CP. When playing as CIS, I wandered about and never ran into the mysterious CaptureRegions. At this point, I can only imagine that the CaptureRegions, if they truly were relocated, were turned into an incredibly small point that only the AI, with their CaptureRegion-finding abilities, were able to locate. So, unless I suddenly start capturing all of the CPs in the level at one point, I guess this problem is more or less solved. Thanks, Teancum! Now I've got Geonosis Conquest and Geonosis "XL" working on the PSP!
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:

Post by [RDH]Zerted »

Create a round with 1 AI unit per team. Spawn as CIS. Kill the enemy AI and watch your friendly find the capture region.

Assuming there is a region with no name, you could also set that region ( "" ) as a damage region. This is to keep any humans out of the region. If a human found the region and was killed when the CPs went netural, human would not be able to respawn and the AI will not change the CP states. The round would be 'frozen'.
Post Reply