Hot Gate I need help with this level

I need help with level Hot Gate in Sarven desert whenever I say left or right the artillery don’t do anything
My code looks like this:

while True:
    enemy = pet.findNearestEnemy()
    if not enemy:
    if enemy.type == "scout":
        distance = pet.distanceTo(enemy)
        if pet.isReady("cold-blast") and  distance < 5:
        if enemy.pos.x < pet.pos.x:
        if pet.pos.x < enemy.pos.x:

Hello and welcome to codecombat discourse! This is a cozy forum where you can share ideas, share fan art, get assistance for code, etc! Before you proceed, we hope that you review this topic, which shows all essentials of this board! Thanks!

okay then I will then when I find it

Please format your code so we can understand it.

sorry this is my first time posting anything correctly

Did you mean to do this like twice

Right should be this

if enemy.pos.x > pet.pos.x:
           # Say  "right".

And left should be this

if enemy.pos.x < pet.pos.x:
            # Say  "left".
1 Like

thank you the hero was saying right and left not the pet

Glad to help. It is important not to mix things up. Don’t worry it happens to me(a lot).

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.