Removing regions through LUA [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
Kingpin
Jedi
Jedi
Posts: 1096
Joined: Fri Sep 13, 2013 7:09 pm
Projects :: The Sith Wars II
Location: Denver, CO
Contact:

Removing regions through LUA [Solved]

Post by Kingpin »

Is it possible to remove regions through LUA? What I mean is if I am loading, say, the conquest layer from Coruscant and want to get rid of the CP Capture Regions without using ZeroEditor, would that be possible? Thanks.
Last edited by Kingpin on Sat Jan 10, 2015 5:41 pm, edited 1 time in total.
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: Removing regions through LUA

Post by AnthonyBF2 »

RemoveRegion("")
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: Removing regions through LUA

Post by Kingpin »

Thanks :)
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: Removing regions through LUA (Solved)

Post by AnthonyBF2 »

Some times those CP objects will have a radius of it's own if there is no region that the game will fall back on and still make the base captureable.
You can ensure they do not by adding
SetProperty("cpname", "Radius", 0)
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Removing regions through LUA (Solved)

Post by AQT »

You don't have to do any of those things if you just do:

Code: Select all

SetProperty("cpname", "CaptureRegion", "")
Which works every time.
Post Reply