I’m doing Ogre Encampment. I am powerful enough and can easily tank the ogres and break the chest but I want to know how I’m supposed to make my character attack when he is being attacked or search for enemies while he is attacking things that don’t die quickly.
enemy = self.findNearestEnemy() loop: enemy # Use if/else. if enemy: self.attack(enemy) else: self.attack("Chest")
Enemies aren’t immediately loaded in so he sees none and goes for the chest but then the loop doesn’t end until the chest is destroyed. It will continuously run self.attack(“Chest”) until the end. Then it will run the loop again.