[Adventurer] Passing Through

The level Passing Through is ready for testing!

This level is intended to introduce the != operator. It takes place in the Forest, and comes before Useful Competitors.

2 Likes

My hero accidentally touch first mushroom when he go after pet. I think it because i have ring of speed and fast boots.
I fixed it using

while True:
    hero.wait(1)
1 Like

My hero skidding for a some distance after he stop moving

Also it possible to fix it in this way

            hero.moveXY(hero.pos.x, pet.pos.y)
            hero.moveXY(pet.pos.x, pet.pos.y)
1 Like

Thanks for the feedback. :slight_smile:

I made some changes… the pet should now always start to the right of the hero, instead of randomly somewhere near the hero, and the pet stays closer.

The skidding is caused by having the wait() in there. I suspect the change to the pet’s starting position means you won’t need the wait()?

1 Like

It seems all is ok now

1 Like

completed level without issue

added LUA patch

1 Like

have a problem in LUA
!= does not work:

while true do
local item = hero:findNearestItem()
if item then
if item.type != “gem” then
hero:moveXY(pet.pos.x, pet.pos.y)
else
hero:moveXY(item.pos.x, item.pos.y)
end
end
end

error:
then expected (to close if at 4:22) at 4:22

1 Like

You should use

~=

instead of

!=
1 Like