[Adventurer] Pet Engineer

A Desert pet level! Here: Pet Engineer

Check it out and try to break it, so we can make it perfect for public release.

This is @Bryukh’s level, so he’ll fix it up.

4 Likes

I can’t get this to work. The pet just stands still in the middle. It won’t go left or right, even after I use pet.moveXY.

In the default code, I have:

var archer = pet.findNearestByType("archer");
var soldier = pet.findNearestByType("soldier");

but the pet doesn’t seem to recognize this method (findNearestByType)? So I changed it to:

var archer = pet.findNearest(pet.findByType("archer"));
var soldier = pet.findNearest(pet.findByType("soldier"));

I’m not sure if pet also has findByType method. After that doesn’t work, I switch to hero.findByType. But it also fails.

var archer = pet.findNearest(hero.findByType("archer"));
var soldier = pet.findNearest(hero.findByType("soldier"));

Also, it would be helpful if we can get the list of methods our pet can do. In the previous levels I think it depends on our glasses. If our glasses doesn’t have findNearestItem/findNearestEnemy, than the pet can’t use it too, am I correct?

Edit: I reload the level and it works with the default code (pet.findNearestByType). Sorry for the false alarm :smiley: but I still hope we can get the list of pet’s methods.

1 Like

It’s a pet’s method for items and units. pet.findNearestItem() will be deprecated I think.

It’s weird. I suppose it was some network error. Please, write me if it repeat.

1 Like
  • I was able to complete the level by a sword upgrade or armor upgrade without any additional code.
  • Using my default gear at that point in the game with complex code I can also complete the level.

So I would personally rank the level at medium difficulty and fun overall.

I submitted a patch for some grammar updates. Otherwise I can’t see anything else. Looks good.

1 Like

Yep. I know. As for many levels with combat. I tested it with course equipment.

1 Like

I lost until I specified that my hero should chase down only foes with a minimum x.pos and a maximum y.pos. Before that, he tried to guard everything (which is odd, since I’m using the Enchanted Lenses, which don’t see through walls).

1 Like

Maybe your hero sees enemies in the right side?

1 Like

He apparently sees and chases all enemies, no matter what side they appear on.

1 Like

Hm. It’s weird. Could you send me sessionID for that case?

1 Like

Sure thing. How do I do that?

1 Like

Open dev console in your browser and look for something like sessionID. But exactly for that level.

1 Like

Is this it?

|Zeus's Ray| Generated random seed 5455029322 of type submissionCount from sessionIDs [Bryukh took this] submissionCount 1

1 Like

Yep. It is.

Interesting. Thanks, I don’t understand how, but it looks like your hero see enemies through walls. I will make some research about it.

1 Like

Oh. Stupid stupid Bryukh. Sorry, fixed. I forgot to “switch on” vision system "wall checking’.

2 Likes

It works! Thanks much!

1 Like

i used okar stompfoot and deflector and guarded my side with only shield() :grinning:

3 Likes

I used distanceTo and only attack enemies that are 15 meters close.

2 Likes

Thanks for the tips! When I reopened this level I’m surprised it fails (it succeeded before). But then I see Anya is running back and forth between the left & right bottom gates, whereas she should be guarding the right bottom gates only.

1 Like

If she’s programmed to attack all enemies she sees, she could be chasing enemies she’s not supposed to attack. You could try adding requirements for enemy.pos before attacking.

2 Likes

Which glasses are you using?

1 Like