Please help i'm stuck


#1

i need help on patrol buster please help me i don’t know what to do!!!


#2

Could you show us your code that you have so far? Or say what part you don’t understand?


#3

i dont get what to type after this line.

// If there is an enemy, attack it!


#4

So do you know any code that will help you determine IF there is an enemy? And you of course already know the code to enter to make your character attack, right?

So you need code that says:

if there is an enemy
    then use attack on that enemy

Since more enemy appear, this needs to be in a loop, so it will keep checking for enemies, and keep attacking them when there are.


#5

so i changed my coding to python.

But it says unexpected indent what do i do?


#6

This is a pretty strait forward level, I would recommend replaying the last few levels before it to get a refresher. You will want to learn how to use the IF statements before moving on.


#7

In python indents are very important they define what is in a statement and what is not


#8

need code so I can help you.

if enemy then
self:attack(enemy)

always useful


#9

Please do not give ar ask for the entire code, you then ruin the experience for other young coders. You may ask for hints to get to the right code, but please do not give or ask for the whole code. Again, this will ruin the experience for young coders.