Not entirely sure, your code is a bit confusing so I cant modify it myself. However I think something like this could work. You may need a GOSUB to check if the enemy should display everytime u enter or leave.