From 832d6b1c083bff4f287dfd62f536b81f3cbf8eef Mon Sep 17 00:00:00 2001 From: Applevangelist <72444570+Applevangelist@users.noreply.github.com> Date: Thu, 10 Jun 2021 11:20:01 +0200 Subject: [PATCH] Update Group.lua (#1546) Added invisible and immortal commands on GROUP level. --- Moose Development/Moose/Wrapper/Group.lua | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Moose Development/Moose/Wrapper/Group.lua b/Moose Development/Moose/Wrapper/Group.lua index 263b3a0ec..a9c678ab5 100644 --- a/Moose Development/Moose/Wrapper/Group.lua +++ b/Moose Development/Moose/Wrapper/Group.lua @@ -2570,6 +2570,30 @@ function GROUP:EnableEmission(switch) return self end +--- Switch on/off invisible flag for the group. +-- @param #GROUP self +-- @param #boolean switch If true, emission is enabled. If false, emission is disabled. +-- @return #GROUP self +function GROUP:SetCommandInvisible(switch) + self:F2( self.GroupName ) + local switch = switch or false + local SetInvisible = {id = 'SetInvisible', params = {value = true}} + self:SetCommand(SetInvisible) + return self +end + +--- Switch on/off immortal flag for the group. +-- @param #GROUP self +-- @param #boolean switch If true, emission is enabled. If false, emission is disabled. +-- @return #GROUP self +function GROUP:SetCommandImmortal(switch) + self:F2( self.GroupName ) + local switch = switch or false + local SetInvisible = {id = 'SetImmortal', params = {value = true}} + self:SetCommand(SetInvisible) + return self +end + --do -- Smoke -- ----- Signal a flare at the position of the GROUP.