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
Alter CP`s in LUA?
Moderator: Moderators
-
SkinnyODST
- Lieutenant Colonel

- Posts: 545
- Joined: Mon Jul 04, 2016 10:56 pm
- Location: My other account
- Contact:
-
thelegend
- Sith

- Posts: 1433
- Joined: Thu Jan 23, 2014 6:01 am
- Projects :: Star Wars - Battlefront III Legacy
- xbox live or psn: El_Fabricio#
- Location: Right behind you :)
Re: Alter CP`s in LUA?
I see two simple ways:
SetProperty("YourCommandPostNameInZE", "Team", 1)
or
SetObjectTeam("YourCommandPostNameInZE", 1)
.
1 refers to your team number (0, 1, 2, 3...)
SetProperty("YourCommandPostNameInZE", "Team", 1)
or
SetObjectTeam("YourCommandPostNameInZE", 1)
.
1 refers to your team number (0, 1, 2, 3...)
-
SkinnyODST
- Lieutenant Colonel

- Posts: 545
- Joined: Mon Jul 04, 2016 10:56 pm
- Location: My other account
- Contact:
Re: Alter CP`s in LUA?
Works perfectly! Thanks!
EDIT What about HIDING CP`s?
EDIT What about HIDING CP`s?
-
Marth8880
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: Alter CP`s in LUA?
I'm not positive this will work, but it's worth a shot:SkinnyODST wrote:What about HIDING CP`s?
Code: Select all
SetProperty("cpName", "IsVisible", 0)-
SkinnyODST
- Lieutenant Colonel

- Posts: 545
- Joined: Mon Jul 04, 2016 10:56 pm
- Location: My other account
- Contact:
Re: Alter CP`s in LUA?
hmm no, didn`t work
- AnthonyBF2
- Sith

- Posts: 1255
- Joined: Wed Aug 21, 2013 3:55 pm
- Projects :: PS2+PSP Overhaul
Re: Alter CP`s in LUA?
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.
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.
