Village Guard how to do it


#1

I can not do this level i get it to work but my guy is to slow can you help me


#2

so can i see your gear and your code
how much gems do you have


#3

i recommend speed ring if you can afford it and softened leather boots
they make you faster


#4

Can you please give us your code to help you.


#5

The enemies on this level are hard coded to appear only when you reach the marked point. So your speed is not important at all. Just attack 2 times to kill an enemy if you have the basic sword

The prewritten code aready shows how to kill the enemies on one side. Just duplicated it for the other side.


#6

my code is

@moveXY 35, 34
rightEnemy = @findNearestEnemy()
if rightEnemy
@attack rightEnemy
@attack rightEnemy


#7

Enemies come from each side. So the code must be like:

loop
    go to right side
    if there is an enemy there
        kill it
    go to left side
    if there is an enemy there
        kill it

I know the code for one side is already written, You just have to write the code for the other side.


#8

going to the right is that xy or move right


#9

X,Y i think :slightly_smiling: