I believe some weird things are happening in this level. I’m writing in JS.
This code I believe should be working, but my hero stops halfway like it can’t understand where the lightstone went.:
// Follow the lightstone to navigate the traps.
while (true) {
var item = hero.findNearestItem();
if (item) {
// Store the items position in a new variable using item.pos:
var itemPos = item.pos;
// Store the X and Y coordinates using pos.x and pos.y:
var itemX = itemPos.x;
var itemY = itemPos.y;
// Move to the coordinates using moveXY() and the X and Y variables:
hero.moveXY(itemX, itemY);
}
}
However, it doesn’t work as it’s supposed to. Seems to only work when I make the hero.move(itemPos) to bypass the variables:
// Follow the lightstone to navigate the traps.
while (true) {
var item = hero.findNearestItem();
if (item) {
// Store the items position in a new variable using item.pos:
var itemPos = item.pos;
// Store the X and Y coordinates using pos.x and pos.y:
var itemX = itemPos.x;
var itemY = itemPos.y;
// Move to the coordinates using moveXY() and the X and Y variables:
hero.move(itemPos);
//Bypass all the variable storing in the middle and just hero.move to itemPos
}
}
// Follow the lightstone to navigate the traps.
while (true) {
var item = hero.findNearestItem();
if (item) {
// Store the items position in a new variable using item.pos:
var itemPos = item.pos;
// Store the X and Y coordinates using pos.x and pos.y:
var itemX = itemPos.x;
var itemY = itemPos.y;
// Move to the coordinates using moveXY() and the X and Y variables:
hero.moveXY(itemX, itemY);
}
}
Yeh, I would expect that to work as an alternative to storing in variables the x and y position, however, it get’s teh same results as the comment suggested way of doing it with variables.
Mabye is is an equipment problem The lightstone could be to far away for the hero to see. i used the same code and it worked fine because i hade the best glasses
That be true since I only have the 2nd pair that the game gives.
However, when I pause to say the item’s position, then it get’s further into the maze, but loses due to time. Which would tell me that the hero should be able to see it (range) around the corner if he can get that far.
I’ve loaded the level multiple times, and when this particular maze setup appears, my hero stops pathing at this exact spot, and the level fails with “ran out of time”.
I doubt it has anything to do with our computers.
while True:
item = hero.findNearestItem()
if item:
# Store the item's position in a new variable using item.pos:
item.x = item.pos.x
item.y = item.pos.y
# Store the X and Y coordinates using pos.x and pos.y:
# Move to the coordinates using moveXY() and the X and Y variables:
hero.moveXY(item.x, item.y)
pass
I see the same issue when I use a faster hero on this seed. The lightstone moves before your hero can pick up the next set of coordinates. Then your hero can’t find the lightstone. Switch to a slower hero and it works. Another thing I noticed, the faster hero has a weird XY coordinate on the position just before this. It is higher than it should be which might be why the lighstone moves sooner. You can see the angle that it creates.