This is the first time I post "What am I doing wrong" -topic
_group = _this select 0
_UGRP = units _group
_count = count _UGRP
TitleText [Format["Count: %1", _count],"Plain Down"]
the above is a simple example to give you the idea. I pass an existing group to the script, but it prints like "Count: 00fffx scalar bool array", instead of a number! So what's wrong with this, or is the problem my computer?
Below is the real purpose where I need the count command:
_unitsLeft = _this select 0
_countType = _this select 1
_Parameters = _this select 2
_Script = _this select 3
_group1 = _this select 4
_group2 = _this select 5
?(_countType == 1): goto "CountByOneGroup"
?(_countType == 2): goto "CountByAllGroups"
#CountByAll
_GrpUnits1 = units _group1
_count1 = count _GrpUnits1
_GrpUnits2 = units _group2
_count2 = count _GrpUnits2
~6
?((_count1)+(_count2) =< _UnitsLeft): Goto "Concequences"
goto "CountByAll"
#CountByOneGroup
_GrpUnits1 = units _group1
_count1 = count _GrpUnits1
_GrpUnits2 = units _group2
_count2 = count _GrpUnits2
~6
?(_count1)< _unitsLeft: goto "Concequences"
?(_count2)< _unitsLeft: goto "Concequences"
goto "CountByOneGroup"
#CountByAllGroups
_GrpUnits1 = units _group1
_count1 = count _GrpUnits1
_GrpUnits2 = units _group2
_count2 = count _GrpUnits2
~6
?(_count1 < _unitsLeft and _count2 < _unitsLeft): goto "Concequences"
goto "CountByAllGroups"
#Concequences
_parameters exec _script
exitthe Idea is that when the casualties grow high enough, another group will be flewn in by a chopper (another script...)