Alter CP`s in LUA?

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
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Alter CP`s in LUA?

Post by SkinnyODST »

I have a custom era for my map and I want to change around who owns what CP and which CP`s are neutral. I would like to know if this is possible and how it is done.

Thanks
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: Alter CP`s in LUA?

Post by thelegend »

I see two simple ways:

SetProperty("YourCommandPostNameInZE", "Team", 1)
or
SetObjectTeam("YourCommandPostNameInZE", 1)
.

1 refers to your team number (0, 1, 2, 3...)
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Re: Alter CP`s in LUA?

Post by SkinnyODST »

Works perfectly! Thanks!

EDIT What about HIDING CP`s?
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Alter CP`s in LUA?

Post by Marth8880 »

SkinnyODST wrote:What about HIDING CP`s?
I'm not positive this will work, but it's worth a shot:

Code: Select all

SetProperty("cpName", "IsVisible", 0)
This whole list is always well worth a read: http://www.secretsociety.com/forum/down ... meters.txt
SkinnyODST
Lieutenant Colonel
Lieutenant Colonel
Posts: 545
Joined: Mon Jul 04, 2016 10:56 pm
Location: My other account
Contact:

Re: Alter CP`s in LUA?

Post by SkinnyODST »

hmm no, didn`t work
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: Alter CP`s in LUA?

Post by AnthonyBF2 »

SetProperty("cpName", "HUDIndexDisplay", 0) I don't remember completely what that one does but it I think it makes it now show up on the radar, or not have a number.

If you want to have a cp completely unknown to the player, use com_bldg_controlzone_hidden (or whatever it is called) and make sure to place it where it can't be seen like inside a box or under the map.
Post Reply