# Bombing Run, my hero can't say the angle

**URL:** <https://discourse.codecombat.com/t/bombing-run-my-hero-cant-say-the-angle/7373>\
**Category:** Uncategorized\
**Created:** [April 30, 2016, 11:53am UTC](https://discourse.codecombat.com/t/bombing-run-my-hero-cant-say-the-angle/7373 "2016-04-30T11:53:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qinghua\_Jing](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/qinghua_jing/32/13603_2.png) [@Qinghua\_Jing](https://discourse.codecombat.com/u/Qinghua_Jing)\
**Post date:** [April 30, 2016, 11:53am UTC](https://discourse.codecombat.com/t/bombing-run-my-hero-cant-say-the-angle/7373/1 "2016-04-30T11:53:12Z")

</div>

# Incoming oscars! (That’s military speak for ogres).

# You will need to calculate their angle of attack.

# Use that angle to command your Griffin Bombers!

while True:  
enemy = hero.findNearestEnemy()  
if enemy:  
# Find the vector of attack  
G=Vector(enemy.pos.x,enemy.pos.y)  
# Use trigonometry to find the the angle in Radians!  
A=Vector.subtract(hero.pos, enemy.pos)  
if enemy.pos.x\>hero.pos.x:  
B=enemy.pos.x-hero.pos.x  
else:  
B=hero.pos.x-enemy.pos.x  
degree=B/A  
# The answer must be in Degrees!  
# To convert Radians to Degrees multiply by (180 / Math.PI)  
degree=degree\*180/Math.PI  
# Say the angle!  
hero.say(degree)
