Level: Thornbush Farm

@NyanCat7745
Upgraded boots with

self.move 

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

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

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.

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

In other words, what you are looking for is not

self.findNeareastEnemy()

but

self.findNearest(self.findEnemies())

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??

nevermind I worked it out thanks though!

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

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

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

hey i totally agree with you, this game is very complicated for my 4 year old son, my wife is forcing him to do this so he can get a good job when he grows up. My wife believes that coders get alot of money, so shes forcing him to do this young.

2 Likes