[Solved] Concept Challenge Forest Storm


#1

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.


#2

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


#3

Here is my code.

20


#4

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


#5

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

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


#6

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

There are the hints.


#7

Thank you(see edit).


#8

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.