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

Siege of stonehold [HELP]


Hello I am a but confused with this level. My character will not respond to any code I put in front of him.
As you can see in this screenshot I tried using flags to get him to respond but it still wont work…

I have even tried stuff as simple as hero.move(x, y);


it should be

loop {


You must first assign hero.findFlag to a variable. Perhaps write something like:

var flag = [insert findflag function]
   [insert moveXY to flog]
   hero.pickUpflag( [insert variable's name]);

As for the rest of the level, it will take much more than moving to flags.


You must also do

loop {
    var flag = hero.find flag()
    if flag {


You should also attack enemies


@CHECHA1232 *findFlag, not find flag.


Oops, My computer messed up


I am not great at javascript. Im more of a python coder:slight_smile:


Still will not work. @_TD_RodYT @CHECHA1232


I am only seeing why my character will not move. I am not trying to complete the whole level at the moment.


Nooo. Listen carefully.

hero.findFlag is a FUNCTION. It means nothing.

You should use if (flag) instead because flag has already been assigned to a value when you called the findFlag function.


You also must indent correctly


OH stupid me, Thanks.


Indent proper areas.


I’m having a similar issue. I assigned a variable for flags:

flag = hero.findFlag()

Then used a loop for moving and picking it up:

while True:
    if flag:
        hero.moveXY(flag.pos.x, flag.pos.y)

But for some reason my hero will not move to the flag. Any thoughts?


You can just pickUpFlag(flag) instead of having to move to it. Using this method, your hero automatically moves to it and picks it up. No move statement required :wink:
Also define flag in the loop.