Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

Type of things in Stranded in the Dunes (Javascript)

Has anyone had any luck programming the player to stop at the Skeleton King place and fight?
How do you detect the red x-mark or a generator in this level?

In previous levels a generator was a type of enemy:

var enemy=hero.findNearestEnemy();
if (enemy && enemy.type=="generator"){
    // pick up a fight with the Skeleton King
}

Can the generator be detected here at all? Is it an item or enemy, and what’s its type?
Same for the x-mark. When I click on an enemy, I get to see some of its properties. But not with the x-mark or generator. They seem to be part of the background.

Any advice on the types of these things?

To be honest I just used flags to move my hero since the map seemed very long. The generator and x-mark (as far as I know) are part of the background, and therefore you can’t really “detect” them the way you would with other enemies/friends.

3 Likes

Thank you! I was trying to use some tricks from Game Dev environment here, but it doesn’t work the same way. I went with manual flags as well.

2 Likes