Kelvintaph burgler


#1

Hello I haven’t any ideas to do this level. Can you give me some advices?


#2

My best suggestion, read past coding levels to get some idea what you are dealing with, read the hints/comments. After this, it should become clearer, if nothing else, give it your best shot, then post your code >formatted properly< so we can try to help.


#3

I look in the forum and I understand that I must attack the yak. What is the yak type?
and the type of all the enemies please?


#4

The yaks type you can do “yak” for like else statement. i believe it’s type actually is yak.


#5

I can you give me a code where just the hero is moving and not diing? Then I can do something with my allies


#6

Yeah I can survive but I dont now what I must do with my allies


#7

Is it normal that my paladin not found the yak?

def Secondcommand():
    friends=hero.findFriends()
    for friend in friends:
        if friend.type=="paladin":
            yak=hero.findByType("yak",hero.findEnemies())[0]#the paladin find the yak 
            if yak:
                hero.command(paladin,"attack",yak)#the paladin never find some yak and do nothing
        else:
            hero.command(friend,"move",{"x":10,"y":50})
            if friend.pos.x==10 and friend.pos.y==50:
                return True
    return False

#8

yak=hero.findByType. This should be friend find by type, and friend.findEnemies, if is finding enemies that you can see, not the paladin. This could be the problem. And you might have to switch your hero.findEnemies and findbytype. So : hero.findenemies(hero.findbyType("yak")); like so.


#9

With python it’s not working
yak=self.findEnemies(hero.findByType(“yak”))[0] => that not works
And with yak=hero.findByType(“yak”,friend.findEnemies())[0] , the paladin don’t found anything!!


#10

yak=self.findEnemies(hero.findByType(“yak”))[0]
try changing this, same code, but change it to
yak = friend.findEnemies(friend.findByType(“yak”) and also, take away the extra parenthesis at the end of your self.findEnemies, that causes issues as well.
yak=hero.findByType(“yak”,friend.findEnemies())[0]
this ^ i’m not even entirely sure what you are trying to do here…
Also, you could try running a index, that way you check all the enemies around you, and check for type that way using an if statement.


#11

In the forum , I saw that you must attack the ice-yak and that he will kill the chieftain
Is that right?


#12

I’m going to assume so if you fond it in the forums, you can check the comments to ensure it was right, truthfully i don’t remember this level.


#13

I can help you remember
This is link for the level


#14

I know in what level I have problems!!


#15

it was not for you X95

it was for @xExaviorx :

so he can easily refresh his memory
you know its not so easy to find specific level on the map


#16

yes I know it’s very hard


#17

Okay, so i’m trying to figure out where your problem lies, it seemes honestly very upfront and simplistic, in explanation. Possibly not in code. However; he’s a brief run down, command your troops/friends to attack the ogres, they should be able to kill them, however odds are you are not going to get the bonus achievment. While doing this, your hero should dodge the “death-balls” that are flying at it, kind of like early on levels with the EvilStone. FindProjectiles could help with this. Also you need to get past the death-machine robots to that x, so how you do that while dodging comes down to you.If you wanted to find the type “ice-yak” you could do this multiple ways, using a friend.findbyType, or friend.findenemies, and running a index with it, to where if the enemy.type != “ice-yak” then you increment it until it does. Won’t give you the code, but after reading this you should have some idea of where you want to start.


#18

Where is this level?


#19

Can someone explain what he has do? Because I have no ideas


#20

Sigh, i just did. EvilStone is an item that is used in early on levels. Dodging the “blasts” from the machines is about equivalent.