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

Stranded in the Dunes: can you follow the raven? (python)


I’m trying to not use flags to beat this level, and I would like my character to follow the raven when the space is cleared of enemies. However, I recognize the raven is a string, and therefore ‘raven.’ I don’t know how to indicate the position of that string. Help? I’ve been using enemy.pos.x and enemy.pos.y to indicate relative enemy position, so I wanted to my code to read:

If enemy:
# insert code about attacking various enemies various ways
self.moveXY(‘raven’.pos.x, ‘raven’.pos.y)

but that, and iterations of that, are generating a “null” error. Is it possible to follow the raven? Am I missing another concept like “when enemies are gone, move to far right of whatever map you are in?” How else can I code my hero to leave the level when she’s done killing skeletons? Thanks!


I looked into it… and I think that the raven you saw, it’s name was “bird”

Don’t quote me on this, but I think you have to follow “bird”
And i haven’t completed this level, so i don’t know how to finish It.


Is there a way to see all the available, pre-loaded strings in a level? like help() ? so I can see “skeleton” “thrower” “bird” etc.?

Thanks so much for helping me!


I don’t think there is except to manually check each one (whether looking in the editor or simply clicking on the entity)


You might want to splurge on some boots with the this.move(); ability. Instead of moving to the position, which by then the bird will have moved, you can do this.move(bird.pos) and your hero will take 1 step at a time then reevaluate where to go.


Unless i’m mistaken. When the level is cleared the raven appears and follows you. So following him would do no good. You are better off just walking to the right. This is how i originally wrote the level, however it could have been changed by nick before it was released. not 100% certain.


Ahh… hm… that would answer some questions. Thanks for the response! The raven exists. He is named, or called, “raven,” and at the beginning of the level he’s sitting on one of the columns. That doesn’t, however, mean he’s going to do anything until I do, haha. I thought I was so clever! Thanks for the heads up. :slight_smile: My goal is to not use flags, and write a good enough code to automate the level… which is, thus far, not going all that well, haha. Going to learn more and revisit.


[quote=“Cat_Crumpler, post:7, topic:5490”]
My goal is to not use flags, and write a good enough code to automate the level… which is, thus far, not going all that well, haha.[/quote]

It can be done, I assure you. But flags make it much more easier…