A flag is local. U need a global skill / var. U only want one selection right ? So u need a global var, like i said above. So not
set (my, FLAG1);
or
my.selected = 1;
do
var selected = 0;
action blabla...
..
Edit: U can use local flags or skills of course, but then u would need a FOR loop checking all ent's for selections before setting a new selection, possible too of course, but a bit more complicated.
..
for(you = ent_next(NULL); you; you = ent_next(you))
{
if(is(you, FLAG1))
reset (you, FLAG1);
}
..
Edit: While thinking about it, use the FOR-method. Cause its multi-selection-safe ^^