while True:
enemy = hero.findNearestEnemy()
if enemy:
distance = hero.distanceTo(enemy)
if distance < 15:
if hero.isReady("throw"):
hero.throw(enemy)
else:
hero.attack(enemy)
now I have the problem, that my bomb is too late. How I can solve this? thanks in advance
But I think I have a time problem and in this lvl there should be a possibility to kill only with bombs because there are just some waves of enemy and not single ones
yeah that solves the lvl I know, but I was searching a way how I can kill without normal attacks. My idea is that if the enemy are close I can hit them in time, because when my hero figure out there is enemy and he shoot then its allready to late so my question is how i can shoot and hit with the bomb more precisely
I will check out, thanks if not maybe I have first to learn a bit more and do more lvls and do later. A friend programmer said maybe I should do with vector but this is something for more later I think