Am I able to destroy (disable) CP`s through LUA.?
Moderator: Moderators
-
SkinnyODST
- Lieutenant Colonel

- Posts: 545
- Joined: Mon Jul 04, 2016 10:56 pm
- Location: My other account
- Contact:
Am I able to destroy (disable) CP`s through LUA.?
Am I able to destroy or completely disable CP`s through LUA.? I know that there is a piece of code I can use that`s something along the lines of "HideCP (1)" for example (Or something like that) But that just hides the CP object and stops the sounds from occurring like the capture sound. The actual CP is still there and capture-able and the AI will still try to capture it as well. Is there something I can use like DestroyCP (1)?
-
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: Am I able to destroy (disable) CP`s through LUA.?
Code: Select all
KillObject("cpname")- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Re: Am I able to destroy (disable) CP`s through LUA.?
Do you want it to totally go away, or just not be be capture-able? You can do either one.
-
SkinnyODST
- Lieutenant Colonel

- Posts: 545
- Joined: Mon Jul 04, 2016 10:56 pm
- Location: My other account
- Contact:
Re: Am I able to destroy (disable) CP`s through LUA.?
Totally go away, but knowing how make it not capture-able might also come in handy for some things.Teancum wrote:Do you want it to totally go away, or just not be be capture-able? You can do either one.
-
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: Am I able to destroy (disable) CP`s through LUA.?
To make a CP uncapturable, use SetProperty to set its CaptureRegion parameter to a nil value, like so:
Code: Select all
SetProperty("cpname", "CaptureRegion", "")