untested:
var core as number
core = tagcount[profile.Core]
~use whatever tag group you're using to designate Core and Support units there.
core = core/2
~round down
core = round(core,0,-1)
~now, core = how many pairs of core units we've selected
core = core*2
~and now it's the maximum support choices allowed
@maxvalue = core
just make sure the profile tag group is accrued.
The minimum value is of course zero, but that can be set outside the script.
|