Level: Thornbush Farm


#21

@NyanCat7745
Upgraded boots with

self.move 

don’t seem to work very well :slight_smile: It’s recommended to wear regular XY boots.


#22

Yeah. move is / has been bugged for a while now. Devs know about it but it’s tricky


#23

It keeps warning me that the sample code they’ve given me is wrong even though I haven’t typed anything:( HELP!!! I’m using the language Python.


#24

It is just complaining because you don’t have findNearestEnemy

You need to change that to the upgrade (since you have upgraded glasses)

hint look down below where the glasses are it lists all the methods available to you


#25

In other words, what you are looking for is not

self.findNeareastEnemy()

but

self.findNearest(self.findEnemies())

#27

at 0:34;0 my character makes a fire trap even though it says that she dosnt see anyone im doing python and im using all the things I need to do this level. why is this??


#28

nevermind I worked it out thanks though!


#37

I put in this code:

# Patrol the village entrances.
# Build a "fire-trap" when you see an ogre.
# Don't blow up any peasants!

loop:
    self.moveXY(43, 50)
    topEnemy = self.findNearestEnemy()
    if topEnemy:
        self.buildXY('fire-trap', 43, 50)
        
    self.moveXY(25, 34)
    leftEnemy = self.findNearestEnemy()
    
    if leftEnemy:
        self.buildXY('fire-trap', 25, 34)
    
     if enemy:
        self.buildXY('fire-trap', 36, 30)

and it says enemy is not defined. Please Help


#38

topEnemy = self.findNearestEnemy() topEnemy is defined
leftEnemy = self.findNearestEnemy() leftEnemy is defined
and where is enemy ?


#39

Please read the FAQ and use ``` around your copy & pasted code so that it formats properly.