Do you mean something like...

if(is(sweet_panel.SHOW)) {set(my,UNTOUCHABLE);} else {reset(my,UNTOUCHABLE);}

... and plunk it down in the while loop of your entities.