local NG = "TF20"
local cvn = ScenEdit_AddUnit({type ='Ship', name ='CVN-71 Theodore Roosevelt', heading =0, dbid =2587, side ='Player', Latitude=37.994,Longitude=-157.0, autodetectable="false",proficiency=3, group= NG})
cvn.group=NG
local cg = ScenEdit_AddUnit({type ='Ship', name ='CG1', heading =0, dbid =2859, side ='Player', Latitude=37.984,Longitude=-157.01, autodetectable="false",proficiency=3, group= NG})
local cg1 = ScenEdit_AddUnit({type ='Ship', name ='CG2', heading =0, dbid =2859, side ='Player', Latitude=37.974,Longitude=-157.02 , autodetectable="false",proficiency=3, group= NG})
If I define them all using the group = NG inside of the AddUnit function the units are placed, but are not in a group.
However if I define cvn.group=NG then the group is created and the next units are both added to the proper group without the additional call.
Is there a way to create the group inside of the function, or is cvn.group the best way to do it?
 
					 
					