Set OutOfComms

All discussions & material related to Command's Lua interface

Moderators: RoryAndersonCDT, michaelm75au, angster, MOD_Command

Post Reply
User avatar
vettim89
Posts: 3724
Joined: Fri Jul 13, 2007 11:38 pm
Location: Toledo, Ohio

Set OutOfComms

Post 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?
"We have met the enemy and they are ours" - Commodore O.H. Perry
KnightHawk75
Posts: 1850
Joined: Thu Nov 15, 2018 7:24 pm

Re: Set OutOfComms

Post 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);
User avatar
vettim89
Posts: 3724
Joined: Fri Jul 13, 2007 11:38 pm
Location: Toledo, Ohio

Re: Set OutOfComms

Post by vettim89 »

Tested and WAD. Thanks
"We have met the enemy and they are ours" - Commodore O.H. Perry
ProGenA
Posts: 4
Joined: Wed May 25, 2022 3:34 am

Re: Set OutOfComms

Post 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.
Post Reply

Return to “Lua Legion”