# \[Solved\] Concept Challenge Forest Storm

**URL:** <https://discourse.codecombat.com/t/solved-concept-challenge-forest-storm/16457>\
**Category:** Adventurer\
**Created:** [November 15, 2018, 2:01pm UTC](https://discourse.codecombat.com/t/solved-concept-challenge-forest-storm/16457 "2018-11-15T14:01:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![AtotheU](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@AtotheU](https://discourse.codecombat.com/u/AtotheU)\
**Post date:** [November 15, 2018, 2:01pm UTC](https://discourse.codecombat.com/t/solved-concept-challenge-forest-storm/16457/1 "2018-11-15T14:01:08Z")

</div>

I’m having trouble with the Concept Challenge Forest Storm on Computer Science 3. I have the code that is supposed to be the correct code to beat the level from the teacher account. I have it copied word for word after not being able to figure it out, and my character stands doing nothing. Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![Unknown](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/unknown/32/9352_2.png) [@Unknown](https://discourse.codecombat.com/u/Unknown)\
**Post date:** [November 15, 2018, 2:26pm UTC](https://discourse.codecombat.com/t/solved-concept-challenge-forest-storm/16457/2 "2018-11-15T14:26:04Z")

</div>

I’m not a subscriber but I still might be able to help, what is your code and the objective.  
@Chaboi_3000 might be able to help

---

<div class="post-metadata">

**Author:** ![AtotheU](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@AtotheU](https://discourse.codecombat.com/u/AtotheU)\
**Post date:** [November 15, 2018, 2:39pm UTC](https://discourse.codecombat.com/t/solved-concept-challenge-forest-storm/16457/3 "2018-11-15T14:39:19Z")

</div>

Here is my code.

![20](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/0/0ac0233f3154a94de739e10455d967ee25523da3.png)

---

<div class="post-metadata">

**Author:** ![xython](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/xython/32/7269_2.png) [@xython](https://discourse.codecombat.com/u/xython)\
**Post date:** [November 15, 2018, 2:56pm UTC](https://discourse.codecombat.com/t/solved-concept-challenge-forest-storm/16457/4 "2018-11-15T14:56:58Z")

</div>

Your function isCloseType() returns false no matter what are the targets and distances.

---

<div class="post-metadata">

**Author:** ![Unknown](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/unknown/32/9352_2.png) [@Unknown](https://discourse.codecombat.com/u/Unknown)\
**Post date:** [November 15, 2018, 3:05pm UTC](https://discourse.codecombat.com/t/solved-concept-challenge-forest-storm/16457/5 "2018-11-15T15:05:58Z")

</div>

First,  
I know what it says in blue, but what is the objective(What does the first hint say), that woud help a little more.

Second,  
What is

```python
if(target.type == type) {

           }

```

Third,  
The variable need to be on the outside of the while true loop

Fourth,  
Other than that, I think it should work

---

<div class="post-metadata">

**Author:** ![AtotheU](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@AtotheU](https://discourse.codecombat.com/u/AtotheU)\
**Post date:** [November 15, 2018, 3:25pm UTC](https://discourse.codecombat.com/t/solved-concept-challenge-forest-storm/16457/6 "2018-11-15T15:25:02Z")

</div>

// Attack enemies or collect items less than 15 meters away.  
// Collect only “coin” type items.  
// Attack only “munchkin” type enemies.

There are the hints.

---

<div class="post-metadata">

**Author:** ![Unknown](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/unknown/32/9352_2.png) [@Unknown](https://discourse.codecombat.com/u/Unknown)\
**Post date:** [November 15, 2018, 3:48pm UTC](https://discourse.codecombat.com/t/solved-concept-challenge-forest-storm/16457/7 "2018-11-15T15:48:59Z")

</div>

Thank you(see edit).

---

<div class="post-metadata">

**Author:** ![AtotheU](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@AtotheU](https://discourse.codecombat.com/u/AtotheU)\
**Post date:** [November 15, 2018, 3:59pm UTC](https://discourse.codecombat.com/t/solved-concept-challenge-forest-storm/16457/8 "2018-11-15T15:59:57Z")

</div>

That was the code that devs suggested to my teacher as the correct code when he was helping me try to figure this out. My original code for that was "if(item.type == “coin”){ ", i had two separate functions for coins and munchkins.

---

<div class="post-metadata">

**Author:** ![William\_Johnson](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/william_johnson/32/48123_2.png) [@William\_Johnson](https://discourse.codecombat.com/u/William_Johnson)\
**Post date:** [April 15, 2026, 11:40pm UTC](https://discourse.codecombat.com/t/solved-concept-challenge-forest-storm/16457/13 "2026-04-15T23:40:11Z")

</div>

what is wrong with my code for level 61. concept challenge? def onspawn (event):  
while True:  
item = hero.findNearestItem()  
if item:  
pet.fetch(item)

def onHear(event):  
pet.say(“Bark!”)

pet.on(“spawn”, onspawn)  
pet.on(“hear”, onHear)

while True:  
enemy = hero.findNearestEnemy()  
if enemy:  
if hero.isReady(“cleave”):  
hero.cleave(enemy)  
else:  
hero.attack(enemy)
