@Grimes Thank you for responding im still however having issues. heres my script im not sure what is wrong
local function doRequestFunction(vars)
if vars.type == "SEAD" then
if not Group.getByName('Aerial-21') then
mist.respawnGroup('Aerial-21', true)
if not Group.getByName('Aerial-22') then
mist.respawnGroup('Aerial-22', true)
end
elseif vars.type == "CAS" then
if not Group.getByName('Aerial-23') then
mist.respawnGroup('Aerial-23', true)
if not Group.getByName('Aerial-24') then
mist.respawnGroup('Aerial-24', true)
end
end
end
local requestM = missionCommands.addSubMenu('Request Asset')
local rSead = missionCommands.addCommand('SEAD', requestM, doRequestFunction, {type = "SEAD"})
local rCAS = missionCommands.addCommand('CAS', requestM, doRequestFunction, {type = "CAS"})
I'm pretty new to lua. all i want to do is spawn 2 groups when the radio command is selected.