You could create an instance variable for the enemies called "state" for example. When is set to 1 you set the behavior group of the enemy to be active and when is set to 0 you set it inactive. So, when enemy "Is on screen" set enemy state to 1 else set it to 0.