# \[SOLVED\] Backwoods Standoff help! First Post

**URL:** <https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870>\
**Category:** Level Help\
**Created:** [July 5, 2017, 1:16am UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870 "2017-07-05T01:16:36Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![MarkG](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/markg/32/6528_2.png) [@MarkG](https://discourse.codecombat.com/u/MarkG)\
**Post date:** [July 6, 2017, 4:48am UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870/21 "2017-07-06T04:48:01Z")

</div>

Thanks. That got me a bit closer, but I’m still dying. I’ve selected all the items you said. Do i need to use some sort of shield function for the shield to actually work?

---

<div class="post-metadata">

**Author:** ![\_TD\_RodYT](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/_td_rodyt/32/6285_2.png) [@\_TD\_RodYT](https://discourse.codecombat.com/u/_TD_RodYT)\
**Post date:** [July 6, 2017, 4:56am UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870/22 "2017-07-06T04:56:23Z")

</div>

You could use hero.shield(), which is a command that makes you take less damage for a certain amount of time, but you cannot counter attack. There are very rare cases where shield can be used effectively.

The shield just gives you extra health in combat, that is all.

Can you send me a screen of your hero and gear you are using?

---

<div class="post-metadata">

**Author:** ![MarkG](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/markg/32/6528_2.png) [@MarkG](https://discourse.codecombat.com/u/MarkG)\
**Post date:** [July 6, 2017, 5:09am UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870/23 "2017-07-06T05:09:22Z")

</div>

Thank you to everyone who helped. My code was right yesterday, I just needed to add the helmet and bronze shield.

---

<div class="post-metadata">

**Author:** ![David\_McDonough](https://avatars.discourse-cdn.com/v4/letter/d/47e85d/32.png) [@David\_McDonough](https://discourse.codecombat.com/u/David_McDonough)\
**Post date:** [November 28, 2017, 4:36pm UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870/24 "2017-11-28T16:36:46Z")

</div>

Omg Thanks so much helped me so much ur great

---

<div class="post-metadata">

**Author:** ![Calvin\_Seiler](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Calvin\_Seiler](https://discourse.codecombat.com/u/Calvin_Seiler)\
**Post date:** [February 23, 2018, 1:59pm UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870/25 "2018-02-23T13:59:20Z")

</div>

Thanks very mouch! #solved

---

<div class="post-metadata">

**Author:** ![Ethan\_Teague](https://avatars.discourse-cdn.com/v4/letter/e/df705f/32.png) [@Ethan\_Teague](https://discourse.codecombat.com/u/Ethan_Teague)\
**Post date:** [April 16, 2018, 6:29pm UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870/27 "2018-04-16T18:29:54Z")

</div>

Still not sure why this does not work for me

---

<div class="post-metadata">

**Author:** ![Ethan\_Teague](https://avatars.discourse-cdn.com/v4/letter/e/df705f/32.png) [@Ethan\_Teague](https://discourse.codecombat.com/u/Ethan_Teague)\
**Post date:** [April 16, 2018, 6:31pm UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870/28 "2018-04-16T18:31:39Z")

</div>

Reason: Can’t attack with hero.attack(enemy)

---

<div class="post-metadata">

**Author:** ![MunkeyShynes](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/munkeyshynes/32/9277_2.png) [@MunkeyShynes](https://discourse.codecombat.com/u/MunkeyShynes)\
**Post date:** [April 16, 2018, 6:52pm UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870/29 "2018-04-16T18:52:43Z")

</div>

No one can assist you if you don’t post your code.

---

<div class="post-metadata">

**Author:** ![Jason\_Congdon](https://avatars.discourse-cdn.com/v4/letter/j/ad7895/32.png) [@Jason\_Congdon](https://discourse.codecombat.com/u/Jason_Congdon)\
**Post date:** [February 25, 2019, 6:11pm UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870/30 "2019-02-25T18:11:52Z")

</div>

I am having trouble betting this level also my char cleaves just fine but wont attack after the else statement

 ![code_combat](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/b/b085de3a29498cf7e2339751f3f9e9a4cad21164.png)

---

<div class="post-metadata">

**Author:** ![Deadpool198](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/deadpool198/32/16753_2.png) [@Deadpool198](https://discourse.codecombat.com/u/Deadpool198)\
**Post date:** [February 25, 2019, 7:17pm UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870/31 "2019-02-25T19:17:04Z")

</div>

Hi, it’s because in the first if, you’re checking for an enemy. What happens if there’s always an enemy but you’re not ready to cleave? It won’t go to the else because there _is_ an enemy.  
🦁 🦁 🦁

---

<div class="post-metadata">

**Author:** ![Sonic101light](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/sonic101light/32/10719_2.png) [@Sonic101light](https://discourse.codecombat.com/u/Sonic101light)\
**Post date:** [September 13, 2019, 6:42pm UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870/32 "2019-09-13T18:42:36Z")

</div>

![17](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/a/a2e955f37d90ac101f520ec6c1cbbf42ff78227f.png)

---

<div class="post-metadata">

**Author:** ![MunkeyShynes](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/munkeyshynes/32/9277_2.png) [@MunkeyShynes](https://discourse.codecombat.com/u/MunkeyShynes)\
**Post date:** [September 13, 2019, 6:59pm UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870/33 "2019-09-13T18:59:10Z")

</div>

Hi Sonic101light. Welcome to Discourse! There’s a couple of things that need to be done to get this code to work.

First, line 9,

```python
ready = hero.isReady("cleave")

```

You’ve defined a variable, `ready`, but then you never use it. But that’s okay because this line is supposed to check if the hero is able to cleave. We have to check to see if this is possible because cleave has a ten second cooldown period. It cannot be used during the cooldown so we check if it is “ready.”

```python
if hero.isReady("cleave"):

```

Also, line 13 is an issue. You are already inside a `while True` loop and you don’t need another one. If you look at line 12, it tells you that the next line should be an `else` conditional. Lines 14 and 16 aren’t necessary because you’ve already defined enemy on line 6.

One more thing - while it is fun to make the hero say fun stuff (I do it sometimes as well), remember that any time you use `hero.say("say stuff")`, it consumes a full second of time. It’s up to you to decide when you can do this and when you simply don’t have the time to do so.

---

<div class="post-metadata">

**Author:** ![Proskils7](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/proskils7/32/11200_2.png) [@Proskils7](https://discourse.codecombat.com/u/Proskils7)\
**Post date:** [December 23, 2019, 1:37am UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870/35 "2019-12-23T01:37:41Z")

</div>

It does not work when i do it, or the code

---

<div class="post-metadata">

**Author:** ![LastAJstanding](https://avatars.discourse-cdn.com/v4/letter/l/96bed5/32.png) [@LastAJstanding](https://discourse.codecombat.com/u/LastAJstanding)\
**Post date:** [December 28, 2019, 2:53am UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870/36 "2019-12-28T02:53:34Z")

</div>

@Proskils7 please show us your code so we can see the problem. Also please be specific about your errors.

---

<div class="post-metadata">

**Author:** ![ItzYourNightmare](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/itzyournightmare/32/11541_2.png) [@ItzYourNightmare](https://discourse.codecombat.com/u/ItzYourNightmare)\
**Post date:** [March 11, 2020, 12:34am UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870/37 "2020-03-11T00:34:30Z")

</div>

when i write the code to attack the nearest enemy at the last line, it does not attack

---

<div class="post-metadata">

**Author:** ![Deadpool198](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/deadpool198/32/16753_2.png) [@Deadpool198](https://discourse.codecombat.com/u/Deadpool198)\
**Post date:** [March 13, 2020, 10:33am UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870/38 "2020-03-13T10:33:31Z")

</div>

Hi @ItzYourNightmare, welcome to the CodeCombat Discourse. 🎉  
If you’re having problems with you code, please post it on the discourse; formatted properly (instructions here: [[Essentials] How To Post/Format Your Code Correctly](https://discourse.codecombat.com/t/essentials-how-to-post-format-your-code-correctly/15521))  
Thanks  
Danny

---

<div class="post-metadata">

**Author:** ![General\_Silent](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/general_silent/32/12589_2.png) [@General\_Silent](https://discourse.codecombat.com/u/General_Silent)\
**Post date:** [June 5, 2020, 1:09am UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870/39 "2020-06-05T01:09:22Z")

</div>

Thanks mate, very helpful

---

<div class="post-metadata">

**Author:** ![Jannelle\_Westersea](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/jannelle_westersea/32/16309_2.png) [@Jannelle\_Westersea](https://discourse.codecombat.com/u/Jannelle_Westersea)\
**Post date:** [November 5, 2020, 3:43pm UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870/40 "2020-11-05T15:43:48Z")

</div>

This is stupid it dose’t work i tried it. this sucks angry

---

<div class="post-metadata">

**Author:** ![Jannelle\_Westersea](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/jannelle_westersea/32/16309_2.png) [@Jannelle\_Westersea](https://discourse.codecombat.com/u/Jannelle_Westersea)\
**Post date:** [November 5, 2020, 3:45pm UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870/41 "2020-11-05T15:45:18Z")

</div>

dose’t work it a rip off don’t use it

---

<div class="post-metadata">

**Author:** ![Deadpool198](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/deadpool198/32/16753_2.png) [@Deadpool198](https://discourse.codecombat.com/u/Deadpool198)\
**Post date:** [November 5, 2020, 4:49pm UTC](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870/42 "2020-11-05T16:49:19Z")

</div>

Hi @Jannelle_Westersea, welcome to the forum.

> [@Jannelle\_Westersea](#):
>
> This is stupid it dose’t work i tried it

What doesn’t work? Is it someone else’s code?  
If you need help with a level, please post _your own code_ and describe your problem. Make sure your code is formatted like it says here:

> [@\[Essentials\] How To Post/Format Your Code Correctly](https://discourse.codecombat.com/t/essentials-how-to-post-format-your-code-correctly/15521):
>
> Formatting your code before posting code is essential to our community, and if you don’t we might not be able to help frowning Everyone must know how to format ALL of your code properly. It’s really easy and only requires a very small amount of effort. To post your code from the game , use the \</\> button or it won’t format properly. When you click the \</\> button, the following will appear: Please paste ALL …

Thanks,  
Danny

[Previous page](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870.md?page=1)

[Next page](https://discourse.codecombat.com/t/solved-backwoods-standoff-help-first-post/11870.md?page=3)
