Help backwoods blind distance (Solved)


#1

please help if you know how to do this level.


#2

post your code so we can help u


#3

here it is


#4

Line 19. You have the hero.say a set number. Is the distance to every enemy going to be 14? This is why we use variables. That way, no matter what the distance is, the hero will say that number. Use your variables instead of fixed numbers.


#5

how do i do that ???


#6

For example

a = hero.findNearestEnemy().type #<- This variable will not be fixed to a certain type like "Ogre"
hero.say(a)
#OUTPUT:
"Ogre"
"Munchkin"
"Witch"
"Warlock"

#7

i don’t follow???


#8

do you have something that says herosays() or something like that