KnightHawk75
Posts: 1450
Joined: 11/15/2018 Status: offline
|
If I follow correctly you want all the radars on right? So really you don't need the unit obey's EMCON.
ScenEdit_SetEMCON('Unit','fed83872-a7b5-41ed-ace0-1e91eb1cb722', 'Radar=Active');
Now if you wanted only a specific radar sensor on the unit then you would need to turn off unit obeys emcon.
local u = ScenEdit_GetUnit({guid='fed83872-a7b5-41ed-ace0-1e91eb1cb722'});
u.obeyEMCON=false <-- spelling (I make the con\com mistake all the time too.
--(now feed a singular table of what you want changed to the setter for each item you want changed.)
u.sensors = {sensor_guid="TheguidOfTheSensorEntryToChangehere",sensor_isactive=true};
u.sensors = {sensor_guid="TheguidOfTheSensorEntry#2ToChangehere",sensor_isactive=true}; --'sensor_status' is also available if needed to change.
And yes, click off the unit and back onto it in the editor to see the change if not advancing time.
< Message edited by KnightHawk75 -- 9/6/2021 11:41:49 PM >
|