Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Help with code in Stillness in motion


I changed it…

loop {
enemy = this.findNearestEnemy();
if (this.isReady(“cleave”))
else {


but I still end up dying,


Hello, lolfrog, and welcome. Please format your code correctly according to the FAQ.

The comments say to attack if the opponent is less than ten meters away. Try doing that.



if flag:
enemy = self.findNearestEnemy()
# If there is an enemy, then...
if enemy:

    # If the enemy is less than 5 meters away, then attack()
    if distance < 5:
        if self.isReady("cleave"):
    # Otherwise (the enemy is far away), then shield()

# Otherwise (there is no enemy...)
    # then move back to the X
    self.moveXY(40, 34)


…Okay, there’s some code. What do you want us to do with it?


¿ It the most optimal ?


If it works, then it’s fine.


Can you tell me a code ?


If you are asking for the solution, I will not give you a solution code. We like to encourage people to find the solution for themselves. If I told you the solution, it is all too likely that you will be back asking for the solution to the next level. And then the next.

On the other hand, if you are asking for help, I need you to tell me what problems you are encountering in your code.


You Can Pass unused flags level ?


Yes, I suppose I can.


what kind of code are you using?


I believe that Jorge_Lagos_Duarte was using python.


Here! Just use Python and remember to have a shield! :wink:

[redacted, we do not post correct code]


We don’t post correct code here on CodeCombat, especially if it’s not formatted properly.


no problem brother:watch: I also had problems with this level no need to be mad


Hey brother how do you do the last level brother yeah brother



yeah this is the code brother


cool brother I was stuck on the first level


yeah me to but you gave me the code brother do you not remember brother?


oh yeah that one time in that one place! I remeber the code thanks brother