Page 1 of 1
Am I able to destroy (disable) CP`s through LUA.?
Posted: Fri Nov 18, 2016 3:49 am
by SkinnyODST
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)?
Re: Am I able to destroy (disable) CP`s through LUA.?
Posted: Fri Nov 18, 2016 5:33 am
by Marth8880
Re: Am I able to destroy (disable) CP`s through LUA.?
Posted: Fri Nov 18, 2016 9:42 am
by Teancum
Do you want it to totally go away, or just not be be capture-able? You can do either one.
Re: Am I able to destroy (disable) CP`s through LUA.?
Posted: Sat Nov 19, 2016 8:01 pm
by SkinnyODST
Teancum wrote:Do you want it to totally go away, or just not be be capture-able? You can do either one.
Totally go away, but knowing how make it not capture-able might also come in handy for some things.
Re: Am I able to destroy (disable) CP`s through LUA.?
Posted: Sat Nov 19, 2016 8:02 pm
by Marth8880
To make a CP uncapturable, use SetProperty to set its CaptureRegion parameter to a nil value, like so:
Code: Select all
SetProperty("cpname", "CaptureRegion", "")