Can I change which team owns a CP 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
SkinnyODST
Lieutenant Colonel
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]

Post by SkinnyODST »

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
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Can I change which team owns a CP through LUA?

Post by Deviss »

SkinnyODST 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?
example
SetProperty("cp2", "Team", "4")

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

Re: Can I change which team owns a CP through LUA?

Post by AnthonyBF2 »

SetProperty("CPName", "Team", "4")

Dang it I got ninja'd!
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: Can I change which team owns a CP through LUA?

Post by Marth8880 »

SetObjectTeam("cpname", teamIndex) should work too.
SkinnyODST
Lieutenant Colonel
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?

Post by SkinnyODST »

Awesome thanks guys!
Post Reply