I am just stuck on this level everything works fine until the ogre gets the item and my Peon gets it as well, then the hero says there is a enemy at the same position and fires and kills the ogre and the peon as well so that makes me fail the mission.
thank you for your help in advance
here is the code:
enemy = hero.findNearestEnemy()
item = hero.findNearestItem()
enemyPos = enemy.pos.x + " " + enemy.pos.y
hero.say("Enemy at " + enemyPos)
if item: itemPos = item.pos.x + " " + item.pos.y hero.say("Gem at " + itemPos)