That said in general you do have to be careful when doing missions,groups,etc to make sure your also not un-enabling the inheritance if ALSO screwing with units assigned to same mission\groups...unless such specifics are wanted. It's all a matter of what the person actually wants and the 'starting point' or assumed 'starting point' so to speak. :)
ie... assume the following sort of default
Mission1 - [inherited]
Mission2 - [inherited]
-Unit5 [no parent]
Mission3 - [no parent]
-Unit6 [no parent]
-Unit7 [no parent]
ScenEdit_SetEMCON('Mission', Mission1, 'Inherit;Radar=Active')
Will effectively set Mission1 to Active emcom along with Active on anything assigned to the mission whom already have inherited set. _However_ since it's STILL inheriting, it may get overridden from above.
ScenEdit_SetEMCON('Mission', Mission1, 'Radar=Active')
Will effectively set Mission1 to Active emcom along with active on anything assigned to mission one who already have inherited set. Mission1 should not get overridden from above it WILL be Active, As will be Units 1-3.
Then say you ran ...
ScenEdit_SetEMCON('Unit', Unit2, 'Inherit;Radar=Passive') --Would effectively do nothing.
ScenEdit_SetEMCON('Unit', Unit2, 'Radar=Passive') --Would make the change and flag Unit to as not using parent.
ScenEdit_SetEMCON('Mission', Mission2, 'Radar=Active')
Will effectively set Mission2 to Active emcom along with active on anything assigned to mission2 who already have inherited set. Unit4 will be Active, Unit5 WILL NOT get set Active, till specifically told to inherit, or changed specifically.
ScenEdit_SetEMCON('Unit', Unit5, 'Inherit') Would set Unit5 to Inherit and it would take the Active setting for Mission2 just set above.
ScenEdit_SetEMCON('Mission', Mission3, 'Radar=Passive')
Will set the mission3 Passive but not change jack on unit6 or unit7...till they are marked to inherit in code, or someone manually resets them or presses the reset on all effective units button for mission3.
Yeah it can get involved if you're screwing with units and the mission they belong to at basically the same time.
If you want to ensure things are sticky when setting it on Mission or Groups, I recommend looping though all members of said mission\group and applying an "inherit;" flag. That way you know whatever specific units were members are forced to take the change. That is ...unless you're doing something cool like trying to get a flight of say 4 f-35's to have 1 guy be the cec-radar and the others missile trucks,etc. But I digress. :)
< Message edited by KnightHawk75 -- 9/24/2019 3:38:30 AM >