Can I change which team owns a CP through LUA? [Solved]
Moderator: Moderators
-
SkinnyODST
- Lieutenant Colonel

- Posts: 545
- Joined: Mon Jul 04, 2016 10:56 pm
- Location: My other account
- Contact:
Can I change which team owns a CP through LUA? [Solved]
How can I make a different team control a CP owned by another team through LUA? So for e.g: In ZE a CP is owned by team 2, what code do I write to make it owned by team 4 through the LUA?
-
Deviss
- Master of the Force

- Posts: 3772
- Joined: Tue Aug 12, 2008 7:59 pm
- Projects :: Clone Wars Extended
Re: Can I change which team owns a CP through LUA?
exampleSkinnyODST wrote:How can I make a different team control a CP owned by another team through LUA? So for e.g: In ZE a CP is owned by team 2, what code do I write to make it owned by team 4 through the LUA?
SetProperty("cp2", "Team", "4")
- AnthonyBF2
- Sith

- Posts: 1255
- Joined: Wed Aug 21, 2013 3:55 pm
- Projects :: PS2+PSP Overhaul
-
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: Can I change which team owns a CP through LUA?
SetObjectTeam("cpname", teamIndex) should work too.
-
SkinnyODST
- Lieutenant Colonel

- Posts: 545
- Joined: Mon Jul 04, 2016 10:56 pm
- Location: My other account
- Contact:
Re: Can I change which team owns a CP through LUA?
Awesome thanks guys!
