ADD SetFrequencyForUnit for CONTROLLABLE
docbrownd opened this issue · comments
Hi,
recently i would like to set frequency to many ship in same group. I try CONTROLLABLE:CommandSetFrequency but nothing works. After reading Hoggit doc, it seem that we need to used SetFrequencyForUnit command.
Possible to add it on Moose ?
Something like :
function CONTROLLABLE:CommandSetFrequencyForUnit(Frequency,Modulation, UnitID, Delay)
local CommandSetFrequencyForUnit={
id='SetFrequencyForUnit',
params={
frequency=Frequency*1000000,
modulation=Modulation or radio.modulation.AM,
unitId=UnitID or self:GetID(),
},
}
if Delay and Delay>0 then
SCHEDULER:New(nil,self.CommandSetFrequencyForUnit,{self,Frequency,Modulation, UnitID},Delay)
else
self:SetCommand(CommandSetFrequencyForUnit)
end
return self
end
CommandSetFrequencyForUnit is described in the Wiki as for Airplanes and Helicopters ....
CommandSetFrequencyForUnit is described in the Wiki as for Airplanes and Helicopters ....
ya i know, but works also for ship... i think it's for indivudual unit in group. where CommandSetFrequency is for unit alone
will be in the next iteration as CONTROLLABLE:CommandSetFrequencyForUnit(Frequency,Modulation,Power,UnitID,Delay)