Yes, there were 2 right brackets too much, but I think you got the point ... I didn't test it with _loon for every created unit, mut I think that should work, unless you need that unit later for a trigger or another script, then your name cant be local, or you can use the groupname (in your case GroupAlpha)
"OfficerW" createUnit [getMarkerPos "alpha",groupAlpha, "_loon= this",0.8, "corporal"
allobjects = allobjects + [_loon]
~1
"SoldierW" createUnit [getMarkerPos "alpha", groupAlpha, "_loon = this",0.6, "private"
allobjects = allobjects + [_loon]
~1
"SoldierWB" createUnit [getMarkerPos "alpha", groupAlpha, "_loon = this",0.6, "private"
allobjects = allobjects + [_loon]
~1