Page 1 of 1

Set OutOfComms

Posted: Thu Apr 07, 2022 11:06 pm
by vettim89
So I was looking at the Lua documentation and for the Unit wrapper there is a OutOfComms field that is indicated as Read Only. I searched the forum and cannot find an answer so my apologies if this has been asked and answered. Is there a way to use Lua to set a specific unit as being in the OutOfComms state?

Re: Set OutOfComms

Posted: Fri Apr 08, 2022 3:44 pm
by KnightHawk75
You should be able to use SetUnit() for that.

ScenEdit_SetUnit(guid="blabla-xyz",outofcomms=true);
ScenEdit_SetUnit(side="Blue", name="SomeUnitname", outofcomms=false);

Re: Set OutOfComms

Posted: Sun Apr 17, 2022 1:02 am
by vettim89
Tested and WAD. Thanks

Re: Set OutOfComms

Posted: Wed May 25, 2022 3:40 am
by ProGenA
I reviewed many discussions about the OutOfComms feature. I was having difficulty until I watched video #24 Communications Modeling on the Matrix Games Pro Software channel on YouTube. During the overview the need for enabling the "Communications Disruption" feature is mentioned. Since I didn't come across that in any of the previous discussions I thought it might be worth adding to this recent thread.

In summary, OutOfComms will not change unless the "Communications Disruption" feature in the Scenario Editor is enabled. In the 2.1.2 version of CPE, this option is disabled for a new scenario.